selftests/clone3: test clone3 with CLONE_NEWTIME
authorTobias Klauser <tklauser@distanz.ch>
Wed, 8 Mar 2023 10:53:20 +0000 (11:53 +0100)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Wed, 8 Mar 2023 11:31:35 +0000 (12:31 +0100)
Verify that clone3 can be called successfully with CLONE_NEWTIME in
flags.

Cc: Andrey Vagin <avagin@openvz.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
tools/testing/selftests/clone3/clone3.c

index cd45821..4fce46a 100644 (file)
@@ -195,5 +195,8 @@ int main(int argc, char *argv[])
        test_clone3(CLONE_NEWPID, getpagesize() + 8, -E2BIG,
                        CLONE3_ARGS_NO_TEST);
 
+       /* Do a clone3() in a new time namespace */
+       test_clone3(CLONE_NEWTIME, 0, 0, CLONE3_ARGS_NO_TEST);
+
        return !ksft_get_fail_cnt() ? ksft_exit_pass() : ksft_exit_fail();
 }