selftests/proc: Assert clock_gettime(CLOCK_BOOTTIME) VS /proc/uptime monotonicity
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 22 Feb 2023 14:46:49 +0000 (15:46 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Apr 2023 14:35:13 +0000 (16:35 +0200)
commit263dda24fff0957f6b0a9abde2809122f7f0fad8
tree2d76091360f6c2b0811ecc14baefc4d00b8775b3
parent270b2a679ea7be1ee2d84ea67751fb1ab15bcb20
selftests/proc: Assert clock_gettime(CLOCK_BOOTTIME) VS /proc/uptime monotonicity

The first field of /proc/uptime relies on the CLOCK_BOOTTIME clock which
can also be fetched from clock_gettime() API.

Improve the test coverage while verifying the monotonicity of
CLOCK_BOOTTIME accross both interfaces.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230222144649.624380-9-frederic@kernel.org
tools/testing/selftests/proc/proc-uptime-001.c
tools/testing/selftests/proc/proc-uptime-002.c
tools/testing/selftests/proc/proc-uptime.h