selftests/timens: Add procfs selftest
authorDmitry Safonov <dima@arista.com>
Tue, 12 Nov 2019 01:27:20 +0000 (01:27 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 14 Jan 2020 11:21:01 +0000 (12:21 +0100)
commit9d1f5a8c9dadad29f72e40a409239d7b71cf3037
tree83c00f19850eda18d2b26e8900f9c6b7eefe4ac6
parent46e003433f8946283c3bfec1be854ca87b5ba402
selftests/timens: Add procfs selftest

Check that /proc/uptime is correct inside a new time namespace.

Output on success:
 1..1
 ok 1 Passed for /proc/uptime
 # Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0

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: Andrei Vagin <avagin@gmail.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-32-dima@arista.com
tools/testing/selftests/timens/.gitignore
tools/testing/selftests/timens/Makefile
tools/testing/selftests/timens/procfs.c [new file with mode: 0644]