From ea634090dce2f9a7fe62bae397b92d5940a0be0e Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 8 Sep 2019 16:15:35 +0200 Subject: [PATCH] test_helpers: ListFds: handle an exited process gracefully This used to dump a backtrace to the console which obscured what is going on. --- tests/test_helpers/mount_unmount.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_helpers/mount_unmount.go b/tests/test_helpers/mount_unmount.go index 30d1c0d..6a2b908 100644 --- a/tests/test_helpers/mount_unmount.go +++ b/tests/test_helpers/mount_unmount.go @@ -201,7 +201,8 @@ func ListFds(pid int) []string { } f, err := os.Open(dir) if err != nil { - log.Panic(err) + fmt.Printf("ListFds: %v\n", err) + return nil } defer f.Close() // Note: Readdirnames filters "." and ".."