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

cmd/compile/internal/noder: TestUnifiedCompare fails with changes in dev.fuzz branch #48265

Open
jayconrod opened this issue Sep 8, 2021 · 2 comments
Assignees
Labels
NeedsFix Testing
Milestone

Comments

@jayconrod
Copy link
Contributor

@jayconrod jayconrod commented Sep 8, 2021

I noticed this when merging master into dev.fuzz, originally at CL 347232 PS1. See test log. The error is:

--- FAIL: TestUnifiedCompare (29.96s)
    --- FAIL: TestUnifiedCompare/linux/amd64 (29.95s)
        unified_test.go:121: running /workdir/go/bin/go list -e -export -json -gcflags=all=-d=unified=0 -d=inlfuncswithclosures=0 -d=unifiedquirks=1 -G=0 -- std
        unified_test.go:121: running /workdir/go/bin/go list -e -export -json -gcflags=all=-d=unified=1 -d=inlfuncswithclosures=0 -d=unifiedquirks=1 -G=0 -- std
        unified_test.go:95: package "testing/internal/testdeps": compile output differs
FAIL
FAIL	cmd/compile/internal/noder	29.971s

We use type aliases in testing/internal/testdeps to avoid an import cycle between testing and internal tests of internal/fuzz and the packages it depends on. That may be tripping something here.

Per discussion with @mdempsky, it sounds like this may be an overly strict test. We'll skip it on dev.fuzz for now, but we won't merge dev.fuzz into master before the test is fixed.

@jayconrod jayconrod added Testing NeedsFix labels Sep 8, 2021
@jayconrod jayconrod added this to the Go1.18 milestone Sep 8, 2021
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jan 29, 2022

@mdempsky This is in the 1.18 milestone; time to move to 1.19? Thanks.

As far as I can tell the test doesn't pass right now, but it doesn't seem to be due to fuzzing.

=== RUN   TestUnifiedCompare/linux/amd64
    unified_test.go:128: running /home/iant/go/bin/go list -e -export -json -gcflags=all=-d=unified=0 -d=inlfuncswithclosures=0 -d=unifiedquirks=1 -G=0 -- std
# constraints
../../../../constraints/constraints.go:13:2: syntax error: unexpected ~, expecting method or interface name
../../../../constraints/constraints.go:20:2: syntax error: unexpected ~, expecting method or interface name
../../../../constraints/constraints.go:27:9: syntax error: unexpected |, expecting semicolon or newline or }
../../../../constraints/constraints.go:34:2: syntax error: unexpected ~, expecting method or interface name
../../../../constraints/constraints.go:41:2: syntax error: unexpected ~, expecting method or interface name
../../../../constraints/constraints.go:49:10: syntax error: unexpected |, expecting semicolon or newline or }
    unified_test.go:149: exit status 2

@mdempsky mdempsky removed this from the Go1.18 milestone Jan 29, 2022
@mdempsky mdempsky added this to the Go1.19 milestone Jan 29, 2022
@mdempsky
Copy link
Member

@mdempsky mdempsky commented Jan 29, 2022

That failure looks like it's because std now includes package constraints, which can't be compiled with -G=0 (because it relies on generics).

I'm leaning towards just removing TestUnifiedCompare anyway. I feel like it's served its purpose of bootstrapping unified IR, and at this point preserving byte-for-byte identical output with -G=0 seems to slow down development more than help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix Testing
Projects
None yet
Development

No branches or pull requests

3 participants