From 081b8d19a6e2ea5d7dfdce03a3c5a90ed5dd9849 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 4 Dec 2023 22:26:59 -0500 Subject: [PATCH] Assert that the process is running before the Linux links test --- tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs index bdd0180e9c..576d025fef 100644 --- a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs +++ b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs @@ -680,7 +680,9 @@ namespace Tgstation.Server.Tests.Live.Instance var pid = proc.Id; var foundLivePath = false; var allPaths = new List(); - foreach (var fd in Directory.EnumerateFiles($"/proc/{pid}/fd")) + + Assert.IsFalse(proc.HasExited); + foreach (var fd in Directory.GetFiles($"/proc/{pid}/fd")) { var sb = new StringBuilder(UInt16.MaxValue); if (Syscall.readlink(fd, sb) == -1)