1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Copyright (c) 2009 FUJITSU LIMITED 4 * Author: Li Zefan <lizf@cn.fujitsu.com> 5 */ 6 7 #define _GNU_SOURCE 8 9 #include <sched.h> 10 #include <stdlib.h> 11 #include <unistd.h> 12 #include "test.h" 13 14 #define DEFAULT_USEC 30000 15 foo(void * arg)16int foo(void __attribute__ ((unused)) * arg) 17 { 18 return 0; 19 } 20 main(int argc,char ** argv)21int main(int argc, char **argv) 22 { 23 int usec; 24 25 if (argc == 2) 26 usec = atoi(argv[1]); 27 else 28 usec = DEFAULT_USEC; 29 30 while (1) { 31 usleep(usec); 32 ltp_clone_quick(CLONE_NEWNS, foo, NULL); 33 } 34 35 tst_exit(); 36 } 37