Skip to contentSkip to conversation

proc: test /proc/uptime

PATCH New Alexey Dobriyan 1 participant 1 message Mar 17, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: test /proc/uptime

The only tests I could come up with for /proc/uptime are:
* test that values increase monotonically for 1 second,
* bounce around CPUs and test the same thing.

Avoid glibc like plague for affinity given patches like this:
https://marc.info/?l=linux-kernel&m=152130031912594&w=4

---

 tools/testing/selftests/proc/.gitignore        |    2 
 tools/testing/selftests/proc/Makefile          |    2 
 tools/testing/selftests/proc/proc-uptime-001.c |   45 ++++++++++++++
 tools/testing/selftests/proc/proc-uptime-002.c |   79 +++++++++++++++++++++++++
 tools/testing/selftests/proc/proc-uptime.h     |   74 +++++++++++++++++++++++
 5 files changed, 202 insertions(+)
tools/testing/selftests/proc/.gitignore +2 -0
@@ -4,4 +4,6 @@
 /proc-self-map-files-002
 /proc-self-syscall
 /proc-self-wchan
+/proc-uptime-001
+/proc-uptime-002
 /read
tools/testing/selftests/proc/Makefile +2 -0
@@ -7,6 +7,8 @@ TEST_GEN_PROGS += proc-self-map-files-001
 TEST_GEN_PROGS += proc-self-map-files-002
 TEST_GEN_PROGS += proc-self-syscall
 TEST_GEN_PROGS += proc-self-wchan
+TEST_GEN_PROGS += proc-uptime-001
+TEST_GEN_PROGS += proc-uptime-002
 TEST_GEN_PROGS += read
 
 include ../lib.mk

new file mode 100644

tools/testing/selftests/proc/proc-uptime-001.c new file +45 -0

45 lines not on this page · raw message

new file mode 100644

tools/testing/selftests/proc/proc-uptime-002.c new file +79 -0

79 lines not on this page · raw message

new file mode 100644

tools/testing/selftests/proc/proc-uptime.h new file +74 -0

74 lines not on this page · raw message