]> Cypherpunks repositories - gostls13.git/commitdiff
os: skip TestExecutableDeleted on plan9
authorRichard Miller <miller.research@gmail.com>
Tue, 4 May 2021 16:43:26 +0000 (17:43 +0100)
committerDavid du Colombier <0intro@gmail.com>
Tue, 4 May 2021 18:47:19 +0000 (18:47 +0000)
This test deletes the running executable file, which is not safe
on Plan 9. The test was working by accident prior to commit 02ab8d1,
which must have changed the page reference ordering just enough to
cause a new demand page-in after deletion of the file.

Fixes #45941

Change-Id: Ic13d8032c21cee603e3afc3c5c4da6093fc37bf4
Reviewed-on: https://go-review.googlesource.com/c/go/+/316829
Reviewed-by: David du Colombier <0intro@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Trust: David du Colombier <0intro@gmail.com>
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/os/executable_test.go

index 9ff632714932cfa2ba7318ab42c07d6c84305810..719d6a61c3f6a333755be261fdeddfb85a1d38ae 100644 (file)
@@ -90,8 +90,8 @@ func init() {
 func TestExecutableDeleted(t *testing.T) {
        testenv.MustHaveExec(t)
        switch runtime.GOOS {
-       case "windows":
-               t.Skip("windows does not support deleting running binary")
+       case "windows", "plan9":
+               t.Skipf("%v does not support deleting running binary", runtime.GOOS)
        case "openbsd", "freebsd", "aix":
                t.Skipf("%v does not support reading deleted binary name", runtime.GOOS)
        }