Commit Graph
4 Commits
Author SHA1 Message Date
Thomas Weißschuh 84b8d6c908 selftests/timens: Print TAP headers
The TAP specification requires that the output begins with a header line.
These headers lines are missing in the timens tests.

Print such a line.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Thomas Weißschuh <[email protected]>
Reviewed-by: Muhammad Usama Anjum <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
2025-05-09 13:12:43 -06:00
John Hubbard f76f9bc616 selftest/timerns: fix clang build failures for abs() calls
When building with clang, via:

    make LLVM=1 -C tools/testing/selftests

...clang warns about mismatches between the expected and required
integer length being supplied to abs(3).

Fix this by using the correct variant of abs(3): labs(3) or llabs(3), in
these cases.

Reviewed-by: Dmitry Safonov <[email protected]>
Reviewed-by: Muhammad Usama Anjum <[email protected]>
Signed-off-by: John Hubbard <[email protected]>
Acked-by: Andrei Vagin <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
2024-07-05 13:21:48 -06:00
YueHaibing 785c4e834f selftests/timens: Remove duplicated include <time.h>
Remove duplicated include.

Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Dmitry Safonov <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
2020-03-13 13:30:32 -06:00
Andrei Vagin a750c7474a selftests/timens: Check for right timens offsets after fork and exec
Output on success:
 1..1
 ok 1 exec
 # Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0

Output on failure:
 1..1
 not ok 1 36016 16
 Bail out!

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

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

Co-developed-by: Dmitry Safonov <[email protected]>
Signed-off-by: Andrei Vagin <[email protected]>
Signed-off-by: Dmitry Safonov <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
2020-01-14 12:21:02 +01:00