diff options
author | Daniel Mack <github@zonque.org> | 2015-09-30 16:35:49 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-09-30 16:35:49 +0200 |
commit | a19c7a4a4b773e25671a5fa874e7c421685d1bde (patch) | |
tree | 3b7e20eb79359b4f3579870beb279df35ae207cd /src/test/test-fileio.c | |
parent | 6e8337580862037d0639961cb51ef82270c1a30f (diff) | |
parent | f2d28e80bc6260c90396e9fc798d559775dbde23 (diff) |
Merge pull request #1415 from aakoskin/bootchart-v2
[v2] bootchart: don't fail if "model name" is missing from cpuinfo
Diffstat (limited to 'src/test/test-fileio.c')
-rw-r--r-- | src/test/test-fileio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c index be3a87958f..ad547822e7 100644 --- a/src/test/test-fileio.c +++ b/src/test/test-fileio.c @@ -241,18 +241,18 @@ static void test_status_field(void) { unsigned long long total = 0, buffers = 0; int r; - assert_se(get_status_field("/proc/self/status", "\nThreads:", &t) == 0); + assert_se(get_proc_field("/proc/self/status", "Threads", WHITESPACE, &t) == 0); puts(t); assert_se(streq(t, "1")); - r = get_status_field("/proc/meminfo", "MemTotal:", &p); + r = get_proc_field("/proc/meminfo", "MemTotal", WHITESPACE, &p); if (r != -ENOENT) { assert_se(r == 0); puts(p); assert_se(safe_atollu(p, &total) == 0); } - r = get_status_field("/proc/meminfo", "\nBuffers:", &s); + r = get_proc_field("/proc/meminfo", "Buffers", WHITESPACE, &s); if (r != -ENOENT) { assert_se(r == 0); puts(s); @@ -263,7 +263,7 @@ static void test_status_field(void) { assert_se(buffers < total); /* Seccomp should be a good test for field full of zeros. */ - r = get_status_field("/proc/meminfo", "\nSeccomp:", &z); + r = get_proc_field("/proc/meminfo", "Seccomp", WHITESPACE, &z); if (r != -ENOENT) { assert_se(r == 0); puts(z); |