History log of /linux-master/tools/testing/selftests/timens/procfs.c
Revision Date Author Comments
# 7527c038 09-Dec-2021 Shuah Khan <skhan@linuxfoundation.org>

selftests/timens: remove ARRAY_SIZE define from individual tests

ARRAY_SIZE is defined in several selftests. Remove definitions from
individual test files and include header file for the define instead.
ARRAY_SIZE define is added in a separate patch to prepare for this
change.

Remove ARRAY_SIZE from timens tests and pickup the one defined in
kselftest.h.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 716e343f 27-Oct-2020 Michael Weiß <michael.weiss@aisec.fraunhofer.de>

selftests/timens: added selftest for /proc/stat btime

Test that btime value of /proc/stat is as expected in the time namespace
using a simple parser to get btime from /proc/stat.

Signed-off-by: Michael Weiß <michael.weiss@aisec.fraunhofer.de>
Reviewed-by: Andrei Vagin <avagin@gmail.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20201027204258.7869-4-michael.weiss@aisec.fraunhofer.de


# 785c4e83 05-Mar-2020 YueHaibing <yuehaibing@huawei.com>

selftests/timens: Remove duplicated include <time.h>

Remove duplicated include.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 9d1f5a8c 11-Nov-2019 Dmitry Safonov <0x7f454c46@gmail.com>

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