chiark / gitweb /
test-fileio: assume that Buffers may be missing
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 17 Sep 2013 20:50:49 +0000 (15:50 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 17 Sep 2013 20:50:49 +0000 (15:50 -0500)
src/test/test-fileio.c

index 3511f3a..525354b 100644 (file)
@@ -245,7 +245,10 @@ static void test_status_field(void) {
         puts(p);
         assert_se(safe_atollu(p, &total) == 0);
 
         puts(p);
         assert_se(safe_atollu(p, &total) == 0);
 
-        assert_se(get_status_field("/proc/meminfo", "\nBuffers:", &s) == 0);
+        r = get_status_field("/proc/meminfo", "\nBuffers:", &s);
+        if (r == -ENOENT)
+                return;
+        assert(r == 0);
         puts(s);
         assert_se(safe_atollu(s, &buffers) == 0);
 
         puts(s);
         assert_se(safe_atollu(s, &buffers) == 0);