aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/timens/procfs.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-12-10selftests/timens: remove ARRAY_SIZE define from individual testsShuah Khan1-2/+0
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>
2020-11-03selftests/timens: added selftest for /proc/stat btimeMichael Weiß1-1/+57
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
2020-03-13selftests/timens: Remove duplicated include <time.h>YueHaibing1-1/+0
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>
2020-01-14selftests/timens: Add procfs selftestDmitry Safonov1-0/+144
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