summaryrefslogtreecommitdiff
path: root/src/test/test-fileio.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-02-08 18:01:26 +0100
committerLennart Poettering <lennart@poettering.net>2023-02-17 14:27:58 +0100
commit6aa90884a093040ddb2dd656c1bf93892420c804 (patch)
tree78f8bf36e87f23b12b3cedf8a0af874abd3374b6 /src/test/test-fileio.c
parentceecf3d45d00a176dbdbeaec8e3179b635da6f1a (diff)
downloadsystemd-6aa90884a093040ddb2dd656c1bf93892420c804.tar.gz
process-util: add helper get_process_threads()
Let's add a proper helper for querying the number of threads in a process.
Diffstat (limited to 'src/test/test-fileio.c')
-rw-r--r--src/test/test-fileio.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index 9d9c719875..206444093b 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -337,14 +337,10 @@ TEST(executable_is_script) {
}
TEST(status_field) {
- _cleanup_free_ char *t = NULL, *p = NULL, *s = NULL, *z = NULL;
+ _cleanup_free_ char *p = NULL, *s = NULL, *z = NULL;
unsigned long long total = 0, buffers = 0;
int r;
- assert_se(get_proc_field("/proc/self/status", "Threads", WHITESPACE, &t) == 0);
- puts(t);
- assert_se(streq(t, "1"));
-
r = get_proc_field("/proc/meminfo", "MemTotal", WHITESPACE, &p);
if (r != -ENOENT) {
assert_se(r == 0);