bool mntns;
bool pidns;
bool userns;
+ bool no_timeout;
char *uid_map;
char *gid_map;
int loop;
exit(ret);
}
- timer_pid = fork();
- if (timer_pid < 0) {
- return TEST_ERR;
- } else if (timer_pid == 0) {
- sleep(t->timeout);
- exit(1);
+ if (!kdbus_args->no_timeout) {
+ timer_pid = fork();
+ if (timer_pid < 0) {
+ return TEST_ERR;
+ } else if (timer_pid == 0) {
+ sleep(t->timeout);
+ exit(1);
+ }
}
result = -1;
if (result >= 0)
break;
result = !WIFEXITED(ret) || WEXITSTATUS(ret) ? TEST_ERR + (timer_pid==wpid) : TEST_OK;
+ if (kdbus_args->no_timeout)
+ break;
kill(wpid ^ pid ^ timer_pid, SIGKILL);
}
{ "list", no_argument, NULL, 'l' },
{ "module", required_argument, NULL, 'm' },
{ "tap", no_argument, NULL, 'a' },
+ { "notimeout", no_argument, NULL, 'n' },
{ "mntns", no_argument, NULL, ARG_MNTNS },
{ "pidns", no_argument, NULL, ARG_PIDNS },
{ "userns", no_argument, NULL, ARG_USERNS },
bool gotT = 0;
- while ((t = getopt_long(argc, argv, "hxftm:R:b:w:a:l", options, NULL)) >= 0) {
+ while ((t = getopt_long(argc, argv, "xhtflnm:R:b:w:a:", options, NULL)) >= 0) {
switch (t) {
case 'x':
kdbus_args.loop = 1;
kdbus_args.tap_output = 1;
break;
+ case 'n':
+ kdbus_args.no_timeout = 1;
+ break;
+
case 'l':
{
unsigned i = 0;