proc: test last field of /proc/loadavg
Subsystems (2)
PATCH 1/1 proc: test last field of /proc/loadavg
Test fork counter formerly known as ->last_pid, the only part of /proc/loadavg which can be tested.
Testing in init pid namespace is not reliable because of background activity.
Signed-off-by Alexey Dobriyan <[email protected]>
---
tools/testing/selftests/proc/.gitignore | 1 tools/testing/selftests/proc/Makefile | 1 tools/testing/selftests/proc/proc-loadavg-001.c | 83 ++++++++++++++++++++++++ 3 files changed, 85 insertions(+)
tools/testing/selftests/proc/.gitignore +1 -0
@@ -1,3 +1,4 @@ +/proc-loadavg-001 /proc-self-map-files-001 /proc-self-map-files-002 /proc-self-syscall
tools/testing/selftests/proc/Makefile +1 -0
@@ -1,6 +1,7 @@ CFLAGS += -Wall -O2 TEST_GEN_PROGS := +TEST_GEN_PROGS += proc-loadavg-001 TEST_GEN_PROGS += proc-self-map-files-001 TEST_GEN_PROGS += proc-self-map-files-002 TEST_GEN_PROGS += proc-self-syscall
new file mode 100644
tools/testing/selftests/proc/proc-loadavg-001.c new file +83 -0
83 lines not on this page · raw message