History log of /linux-master/tools/testing/selftests/timens/clock_nanosleep.c
Revision Date Author Comments
# 558ae035 21-May-2020 Andrei Vagin <avagin@gmail.com>

selftests/timens: handle a case when alarm clocks are not supported

This can happen if a testing node doesn't have RTC (real time clock)
hardware or it doesn't support alarms.

Fixes: 61c57676035d ("selftests/timens: Add Time Namespace test for supported clocks")
Acked-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reported-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 46e00343 11-Nov-2019 Andrei Vagin <avagin@gmail.com>

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