]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/timens: Add a test for clock_nanosleep()
authorAndrei Vagin <avagin@gmail.com>
Tue, 12 Nov 2019 01:27:19 +0000 (01:27 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 14 Jan 2020 11:21:01 +0000 (12:21 +0100)
commitd466a474ddebdd013d4befe3b7efcaba7f845551
treefd4352b1c77994ca0074b1baf5d364a76107e50b
parentd3e9bd5fd0cfa7374006bb826e872eeb1f3fa094
selftests/timens: Add a test for clock_nanosleep()

Check that clock_nanosleep() takes into account clock offsets.

Output on success:
 1..4
 ok 1 clockid: 1 abs:0
 ok 2 clockid: 1 abs:1
 ok 3 clockid: 9 abs:0
 ok 4 clockid: 9 abs:1

Output with lack of permissions:
 1..4
 not ok 1 # SKIP need to run as root

Output without support of time namespaces:
 1..4
 not ok 1 # SKIP Time namespaces are not supported

Co-developed-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191112012724.250792-31-dima@arista.com
tools/testing/selftests/timens/.gitignore
tools/testing/selftests/timens/Makefile
tools/testing/selftests/timens/clock_nanosleep.c [new file with mode: 0644]