Commit 255ab741 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys Committed by Han-Wen Nienhuys

fs: kill subprocess before tearing down test

Change-Id: Ie0208ec43f50910201b8ff97f639ad55fbd319a3
parent d2138350
......@@ -585,12 +585,19 @@ func TestFsstress(t *testing.T) {
if err != nil {
t.Fatal(err)
}
wg.Add(1)
go func() {
cmd.Wait()
wg.Done()
}()
defer cmd.Process.Kill()
// Run the test for 1 second. If it deadlocks, it usually does within 20ms.
time.Sleep(1 * time.Second)
cancel()
cmd.Process.Kill()
// waitTimeout waits for the waitgroup for the specified max timeout.
// Returns true if waiting timed out.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment