History log of /linux-master/tools/testing/selftests/timens/timerfd.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>


# 11873de3 11-Nov-2019 Andrei Vagin <avagin@gmail.com>

selftests/timens: Add a test for timerfd

Check that timerfd_create() takes into account clock offsets.

Output on success:
1..3
ok 1 clockid=7
ok 2 clockid=1
ok 3 clockid=9
# Pass 3 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0

Output on failure:
1..3
not ok 1 clockid: 7 elapsed: 0
not ok 2 clockid: 1 elapsed: 0
not ok 3 clockid: 9 elapsed: 0
Bail out!

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

Output without support of time namespaces:
1..3
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-30-dima@arista.com