aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-07-08 22:47:18 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-07-08 22:52:24 +0200
commit7004c9c8a8b3c88c1952ede3b2da89bd0fb0855f (patch)
tree06c0f561a488b46a71ae06580c0456093f3a5419 /pkg
parentfb2fc0f4dc2516a06b59913b7a5cf4472024b6c8 (diff)
executor: tweaks for better 9p testing
See the added comments.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/csource/linux_common.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/csource/linux_common.go b/pkg/csource/linux_common.go
index b2431c4fe..35a652b49 100644
--- a/pkg/csource/linux_common.go
+++ b/pkg/csource/linux_common.go
@@ -2872,6 +2872,9 @@ retry:
continue;
char filename[FILENAME_MAX];
snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
+ while (umount2(filename, MNT_DETACH) == 0) {
+ debug("umount(%s)\n", filename);
+ }
struct stat st;
if (lstat(filename, &st))
exitf("lstat(%s) failed", filename);
@@ -3063,6 +3066,9 @@ static void loop()
#endif
execute_one();
debug("worker exiting\n");
+ int fd;
+ for (fd = 3; fd < 30; fd++)
+ close(fd);
doexit(0);
}
debug("spawned worker pid %d\n", pid);
@@ -3087,10 +3093,10 @@ static void loop()
executed_calls = now_executed;
last_executed = now;
}
- if ((now - start < 3 * 1000) && (now - start < 1000 || now - last_executed < 500))
+ if ((now - start < 5 * 1000) && (now - start < 3000 || now - last_executed < 1000))
continue;
#else
- if (current_time_ms() - start < 3 * 1000)
+ if (current_time_ms() - start < 5 * 1000)
continue;
#endif
debug("waitpid(%d)=%d\n", pid, res);