diff options
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/testsuite/testsuite.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/internal/testsuite/testsuite.go b/internal/testsuite/testsuite.go index e6bc3a49..32d5e1ba 100644 --- a/internal/testsuite/testsuite.go +++ b/internal/testsuite/testsuite.go @@ -797,8 +797,13 @@ func StartHakurei( processCommand(cmd) } + var onDoneReached atomic.Bool done := MustStart(cmd) - wg.Go(func() { _err := <-done; onDone(_err, output.String()) }) + wg.Go(func() { + _err := <-done + onDoneReached.Store(true) + onDone(_err, output.String()) + }) if err = errors.Join( _notify.Close(), @@ -874,6 +879,13 @@ func StartHakurei( var stat syscall.Stat_t pid = MustScanFor(func() { + if onDoneReached.Load() { + log.Fatalf( + "%s terminated while scanning\n%s", + c.Container.Hostname, + output.String(), + ) + } log.Printf( "still scanning for %s, output:\n%s", c.Container.Hostname, |
