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

x/tools/internal/lsp/diff/difftest: TestVerifyUnified consistently failing on Illumos #38414

Closed
bcmills opened this issue Apr 13, 2020 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-illumos Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Apr 13, 2020

TestVerifyUnified has been failing on the illumos-amd64 builder ever since its name was fixed in CL 222248 (CC @findleyr, @ianthehat)

https://build.golang.org/log/44466469f672f827073a365fe5ba62d38b5227bb

--- FAIL: TestVerifyUnified (0.16s)
    --- FAIL: TestVerifyUnified/empty (0.02s)
        difftest_test.go:25: diff output did not have file prefix:
            No differences encountered
            
    --- FAIL: TestVerifyUnified/no_diff (0.02s)
        difftest_test.go:25: diff output did not have file prefix:
            No differences encountered
            
    --- FAIL: TestVerifyUnified/replace_all (0.01s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-fruit\n+cheese\n"
            diff -u:
            "--- from\n+++ to\n@@ -1,1 +1,1 @@\n-fruit\n+cheese\n"
    --- FAIL: TestVerifyUnified/insert_rune (0.01s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-gord\n+gourd\n"
            diff -u:
            "--- from\n+++ to\n@@ -1,1 +1,1 @@\n-gord\n+gourd\n"
    --- FAIL: TestVerifyUnified/delete_rune (0.01s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-groat\n+goat\n"
            diff -u:
            "--- from\n+++ to\n@@ -1,1 +1,1 @@\n-groat\n+goat\n"
    --- FAIL: TestVerifyUnified/replace_rune (0.01s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-loud\n+lord\n"
            diff -u:
            "--- from\n+++ to\n@@ -1,1 +1,1 @@\n-loud\n+lord\n"
    --- FAIL: TestVerifyUnified/replace_partials (0.01s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-blanket\n+bunker\n"
            diff -u:
            "--- from\n+++ to\n@@ -1,1 +1,1 @@\n-blanket\n+bunker\n"
    --- FAIL: TestVerifyUnified/replace_no_newline (0.02s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+B\n\\ No newline at end of file\n"
            diff -u:
            "--- from\n+++ to\n--- /var/tmp/workdir-host-illumos-amd64-jclulow/tmp/myers.in629328991\tMon Apr 13 02:23:12 2020\n+++ /var/tmp/workdir-host-illumos-amd64-jclulow/tmp/myers.in919088690\tMon Apr 13 02:23:12 2020\n@@ -1,1 +1,1 @@\n-A\n+B\n"
    --- FAIL: TestVerifyUnified/add_end (0.02s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+AB\n\\ No newline at end of file\n"
            diff -u:
            "--- from\n+++ to\n--- /var/tmp/workdir-host-illumos-amd64-jclulow/tmp/myers.in239627753\tMon Apr 13 02:23:12 2020\n+++ /var/tmp/workdir-host-illumos-amd64-jclulow/tmp/myers.in211122228\tMon Apr 13 02:23:12 2020\n@@ -1,1 +1,1 @@\n-A\n+AB\n"
    --- FAIL: TestVerifyUnified/add_newline (0.02s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+A\n"
            diff -u:
            "--- from\n+++ to\n+++ /var/tmp/workdir-host-illumos-amd64-jclulow/tmp/myers.in953957766\tMon Apr 13 02:23:12 2020\n@@ -1,1 +1,1 @@\n-A\n+A\n"
FAIL
FAIL	golang.org/x/tools/internal/lsp/diff/difftest	0.269s
@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-illumos labels Apr 13, 2020
@gopherbot gopherbot added this to the Unreleased milestone Apr 13, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Apr 13, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.5.0 Apr 13, 2020
@gopherbot
Copy link

Change https://golang.org/cl/228199 mentions this issue: internal/lsp/diff/difftest: ignore for GOOS=illumos

gopherbot pushed a commit to golang/tools that referenced this issue Apr 14, 2020
illumos has a different copy of the `diff` executable, causing this test
to fail. Ignore it for this GOOS.

Updates golang/go#38414

Change-Id: I45ec5fcd9fd332977349bb6ba33d9ed09417a023
Reviewed-on: https://go-review.googlesource.com/c/tools/+/228199
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@findleyr
Copy link
Contributor

illumos builds are succeeding now, though a better fix might be to capture the expected output in difftest rather than rely on the output of an external program (diff -u).

But I don't think we're likely to make that change now, so I'm closing this bug as fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-illumos Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants