Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/coverage: TestCoverageApis/emitToNonexistentDir fails on plan9 #55983

Closed
millerresearch opened this issue Oct 1, 2022 · 1 comment
Closed
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9 Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@millerresearch
Copy link
Contributor

millerresearch commented Oct 1, 2022

CL 436236 broke testing on Plan 9 by enabling coverage tests which were not previously being run by default. Failure looks like this:

--- FAIL: TestCoverageApis (121.79s)
    emitdata_test.go:42: harness path is /tmp/TestCoverageApis2970001122/001/build/harness.exe
    --- FAIL: TestCoverageApis/emitToNonexistentDir (0.23s)
        emitdata_test.go:144: running: /tmp/TestCoverageApis2970001122/001/build/harness.exe -tp emitToNonexistentDir -o /tmp/TestCoverageApis2970001122/001/emitToNonexistentDir-edir-y with rdir=/tmp/TestCoverageApis2970001122/001/emitToNonexistentDir-rdir-y and GOCOVERDIR=false
        emitdata_test.go:268: warning: GOCOVERDIR not set, no coverage data emitted
            emitToNonexistentDir: meta data emit to bad dir: got error:
              output directory "/tmp/TestCoverageApis2970001122/001/emitToNonexistentDir-edir-y_MANGLED" inaccessible (err: stat /tmp/TestCoverageApis2970001122/001/emitToNonexistentDir-edir-y_MANGLED: '.../TestCoverageApis2970001122/001/emitToNonexistentDir-edir-y_MANGLED' does not exist); no coverage data written
            wanted error with one of:
              [no such file or directory system cannot find the file specified]
        emitdata_test.go:269: running 'harness -tp emitToNonexistentDir': exit status: 'harness.exe 33405: 1'
FAIL
FAIL	runtime/coverage	230.966s

The cause is that the "want" strings to indicate a nonexistent directory only allow for linux-ish (sic) and windows error messages. The fix is to add the equivalent error string for Plan 9.

@gopherbot
Copy link

gopherbot commented Oct 1, 2022

Change https://go.dev/cl/437557 mentions this issue: runtime/coverage: recognise Plan 9 error message in emitToNonexistentDir

@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 2, 2022
@dmitshur dmitshur added this to the Go1.20 milestone Oct 2, 2022
@dmitshur dmitshur added the Testing An issue that has been verified to require only test changes, not just a test failure. label Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9 Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants