Extend WslWaitForLinuxProcess test coverage (#13366)

This commit is contained in:
Blue 2025-08-12 12:29:16 -07:00 committed by Blue
parent 28bcfe39d6
commit e9b36a1aac

View File

@ -374,6 +374,15 @@ class LSWTests
VERIFY_SUCCEEDED(WslWaitForLinuxProcess(vm.get(), pid, 1000, &result)); VERIFY_SUCCEEDED(WslWaitForLinuxProcess(vm.get(), pid, 1000, &result));
VERIFY_ARE_EQUAL(result.State, ProcessStateRunning); VERIFY_ARE_EQUAL(result.State, ProcessStateRunning);
// Verify that the process can still be waited for
result = {};
VERIFY_SUCCEEDED(WslWaitForLinuxProcess(vm.get(), pid, 1000, &result));
VERIFY_ARE_EQUAL(result.State, ProcessStateRunning);
result = {};
VERIFY_SUCCEEDED(WslWaitForLinuxProcess(vm.get(), pid, 0, &result));
VERIFY_ARE_EQUAL(result.State, ProcessStateRunning);
// Verify that it can be killed. // Verify that it can be killed.
VERIFY_SUCCEEDED(WslSignalLinuxProcess(vm.get(), pid, 9)); VERIFY_SUCCEEDED(WslSignalLinuxProcess(vm.get(), pid, 9));