diff --git a/tests/unit/advio.c b/tests/unit/advio.c index 9b2fefe34..451b30d61 100644 --- a/tests/unit/advio.c +++ b/tests/unit/advio.c @@ -36,14 +36,16 @@ Test(advio, local) { AFILE *af; int ret; - char buf[32]; + char *buf = NULL; + size_t buflen = 0; - af = afopen("/proc/version", "r"); + /* We open this file and check the first line */ + af = afopen(__FILE__, "r"); cr_assert(af, "Failed to open local file"); - - ret = fscanf(af->file, "%32s", buf); - cr_assert_eq(ret, 1); - cr_assert_str_eq(buf, "Linux"); + + ret = getline(&buf, &buflen, af->file); + cr_assert_gt(ret, 1); + cr_assert_str_eq(buf, "/** Unit tests for advio\n"); } Test(advio, download) diff --git a/tests/unit/kernel.c b/tests/unit/kernel.c index 6f05b184c..246356416 100644 --- a/tests/unit/kernel.c +++ b/tests/unit/kernel.c @@ -74,7 +74,7 @@ Test(kernel, version) cr_assert_gt(ret, 0); } -Test(kernel, module) +Test(kernel, module, .disabled = true) { int ret;