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

Fix a quadradic duplication in json for multi-suggestions #45489

Merged
merged 3 commits into from
Oct 28, 2017

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Oct 24, 2017

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2017
@kennytm
Copy link
Member

kennytm commented Oct 24, 2017

Two test cases failed.
[00:55:21] ---- [compile-fail] compile-fail/issue-27842.rs stdout ----
[00:55:21]
[00:55:21] error: /checkout/src/test/compile-fail/issue-27842.rs:14: expected suggestion not found: let _ = tup.0
[00:55:21] thread 'main' panicked at 'Some tests failed', /checkout/src/tools/compiletest/src/main.rs:329:21
[00:55:21]
[00:55:21] error: 0 unexpected errors found, 1 expected errors not found
[00:55:21] status: exit code: 101
[00:55:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-27842.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-27842.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-27842.stage2-x86_64-unknown-linux-gnu.compile-fail.libaux" "-A" "unused"
[00:55:21] not found errors (from test file): [
[00:55:21] Error {
[00:55:21] line_num: 14,
[00:55:21] kind: Some(
[00:55:21] Suggestion
[00:55:21] ),
[00:55:21] msg: "let _ = tup.0"
[00:55:21] }
[00:55:21] ]
[00:55:21]
[00:55:21] thread '[compile-fail] compile-fail/issue-27842.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:1085:12
[00:55:21] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:55:21]
[00:55:21] ---- [compile-fail] compile-fail/missing-block-hint.rs stdout ----
[00:55:21]
[00:55:21] error: /checkout/src/test/compile-fail/missing-block-hint.rs:17: expected suggestion not found: { bar; }
[00:55:21]
[00:55:21] error: 0 unexpected errors found, 1 expected errors not found
[00:55:21] status: exit code: 101
[00:55:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/missing-block-hint.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/missing-block-hint.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/missing-block-hint.stage2-x86_64-unknown-linux-gnu.compile-fail.libaux" "-A" "unused"
[00:55:21] not found errors (from test file): [
[00:55:21] Error {
[00:55:21] line_num: 17,
[00:55:21] kind: Some(
[00:55:21] Suggestion
[00:55:21] ),
[00:55:21] msg: "{ bar; }"
[00:55:21] }
[00:55:21] ]
[00:55:21]
[00:55:21] thread '[compile-fail] compile-fail/missing-block-hint.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:1085:12
[00:55:21]
[00:55:21]
[00:55:21] failures:
[00:55:21] [compile-fail] compile-fail/issue-27842.rs
[00:55:21] [compile-fail] compile-fail/missing-block-hint.rs
[00:55:21]
[00:55:21] test result: FAILED. 2765 passed; 2 failed; 13 ignored; 0 measured; 0 filtered out

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 24, 2017
@oli-obk
Copy link
Contributor Author

oli-obk commented Oct 26, 2017

Fixed

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 26, 2017
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 27, 2017

📌 Commit 014100d has been approved by petrochenkov

@bors
Copy link
Contributor

bors commented Oct 28, 2017

⌛ Testing commit 014100d with merge 0b24eee...

bors added a commit that referenced this pull request Oct 28, 2017
Fix a quadradic duplication in json for multi-suggestions

r? @petrochenkov
@bors
Copy link
Contributor

bors commented Oct 28, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Oct 28, 2017

check x86_64-apple-darwin, the fix for #38878 affected UI test? Assuming spurious. @bors retry

[01:08:49] failures:
[01:08:49] 
[01:08:49] ---- [ui] ui/enum-size-variance.rs stdout ----
[01:08:49] 	normalized stderr:
[01:08:49] warning: enum variant is more than three times larger (32 bytes) than the next largest
[01:08:49]   --> $DIR/enum-size-variance.rs:28:5
[01:08:49]    |
[01:08:49] 28 |     L(i64, i64, i64, i64), //~ WARNING three times larger
[01:08:49]    |     ^^^^^^^^^^^^^^^^^^^^^
[01:08:49]    |
[01:08:49] note: lint level defined here
[01:08:49]   --> $DIR/enum-size-variance.rs:13:9
[01:08:49]    |
[01:08:49] 13 | #![warn(variant_size_differences)]
[01:08:49]    |         ^^^^^^^^^^^^^^^^^^^^^^^^
[01:08:49] 
[01:08:49] warning: looks like the linker segfaulted when we tried to call it, automatically retrying again
[01:08:49]   |
[01:08:49]   = note: "cc" "-m64" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.enum_size_variance0.rust-cgu.o" "-o" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.crate.allocator.rust-cgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/native/rust-test-helpers" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin.ui.libaux" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-l" "std-0e08cf54369b7bb9" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-959a484cb4105bfc.rlib" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m" "-Wl,-rpath,@loader_path/../../stage2/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-rpath,/Users/travis/build/rust-lang/rust/lib/rustlib/x86_64-apple-darwin/lib"
[01:08:49]   = note: ld: warning: directory not found for option '-L/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin.ui.libaux'
[01:08:49]           clang: error: unable to execute command: Segmentation fault: 11
[01:08:49]           clang: error: linker command failed due to signal (use -v to see invocation)
[01:08:49]           
[01:08:49] 
[01:08:49] 
[01:08:49] 
[01:08:49] expected stderr:
[01:08:49] warning: enum variant is more than three times larger (32 bytes) than the next largest
[01:08:49]   --> $DIR/enum-size-variance.rs:28:5
[01:08:49]    |
[01:08:49] 28 |     L(i64, i64, i64, i64), //~ WARNING three times larger
[01:08:49]    |     ^^^^^^^^^^^^^^^^^^^^^
[01:08:49]    |
[01:08:49] note: lint level defined here
[01:08:49]   --> $DIR/enum-size-variance.rs:13:9
[01:08:49]    |
[01:08:49] 13 | #![warn(variant_size_differences)]
[01:08:49]    |         ^^^^^^^^^^^^^^^^^^^^^^^^
[01:08:49] 
[01:08:49] 
[01:08:49] 
[01:08:49] diff of stderr:
[01:08:49] 
[01:08:49]  warning: enum variant is more than three times larger (32 bytes) than the next largest
[01:08:49]    --> $DIR/enum-size-variance.rs:28:5
[01:08:49]     |
[01:08:49]  28 |     L(i64, i64, i64, i64), //~ WARNING three times larger
[01:08:49]     |     ^^^^^^^^^^^^^^^^^^^^^
[01:08:49]     |
[01:08:49]  note: lint level defined here
[01:08:49]    --> $DIR/enum-size-variance.rs:13:9
[01:08:49]     |
[01:08:49]  13 | #![warn(variant_size_differences)]
[01:08:49]     |         ^^^^^^^^^^^^^^^^^^^^^^^^
[01:08:49]  
[01:08:49] +warning: looks like the linker segfaulted when we tried to call it, automatically retrying again
[01:08:49] +  |
[01:08:49] +  = note: "cc" "-m64" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.enum_size_variance0.rust-cgu.o" "-o" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.crate.allocator.rust-cgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/native/rust-test-helpers" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin.ui.libaux" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-l" "std-0e08cf54369b7bb9" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-959a484cb4105bfc.rlib" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m" "-Wl,-rpath,@loader_path/../../stage2/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-rpath,/Users/travis/build/rust-lang/rust/lib/rustlib/x86_64-apple-darwin/lib"
[01:08:49] +  = note: ld: warning: directory not found for option '-L/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin.ui.libaux'
[01:08:49] +          clang: error: unable to execute command: Segmentation fault: 11
[01:08:49] +          clang: error: linker command failed due to signal (use -v to see invocation)
[01:08:49] +          
[01:08:49] +
[01:08:49] 
[01:08:49] The actual stderr differed from the expected stderr.
[01:08:49] Actual stderr saved to /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stderr
[01:08:49] To update references, run this command from build directory:
[01:08:49] /Users/travis/build/rust-lang/rust/src/test/ui/update-references.sh '/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui' 'enum-size-variance.rs'
[01:08:49] 
[01:08:49] error: 1 errors occurred comparing output.
[01:08:49] status: exit code: 0
[01:08:49] command: "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/bin/rustc" "/Users/travis/build/rust-lang/rust/src/test/ui/enum-size-variance.rs" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui" "--target=x86_64-apple-darwin" "-C" "prefer-dynamic" "-o" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin" "-Crpath" "-O" "-Lnative=/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/native/rust-test-helpers" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin.ui.libaux" "-A" "unused"
[01:08:49] stdout:
[01:08:49] ------------------------------------------
[01:08:49] 
[01:08:49] ------------------------------------------
[01:08:49] stderr:
[01:08:49] ------------------------------------------
[01:08:49] warning: enum variant is more than three times larger (32 bytes) than the next largest
[01:08:49]   --> /Users/travis/build/rust-lang/rust/src/test/ui/enum-size-variance.rs:28:5
[01:08:49]    |
[01:08:49] 28 |     L(i64, i64, i64, i64), //~ WARNING three times larger
[01:08:49]    |     ^^^^^^^^^^^^^^^^^^^^^
[01:08:49]    |
[01:08:49] note: lint level defined here
[01:08:49]   --> /Users/travis/build/rust-lang/rust/src/test/ui/enum-size-variance.rs:13:9
[01:08:49]    |
[01:08:49] 13 | #![warn(variant_size_differences)]
[01:08:49]    |         ^^^^^^^^^^^^^^^^^^^^^^^^
[01:08:49] 
[01:08:49] warning: looks like the linker segfaulted when we tried to call it, automatically retrying again
[01:08:49]   |
[01:08:49]   = note: "cc" "-m64" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.enum_size_variance0.rust-cgu.o" "-o" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.crate.allocator.rust-cgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/native/rust-test-helpers" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin.ui.libaux" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-L" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-l" "std-0e08cf54369b7bb9" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-959a484cb4105bfc.rlib" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m" "-Wl,-rpath,@loader_path/../../stage2/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-rpath,/Users/travis/build/rust-lang/rust/lib/rustlib/x86_64-apple-darwin/lib"
[01:08:49]   = note: ld: warning: directory not found for option '-L/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/ui/enum-size-variance.stage2-x86_64-apple-darwin.ui.libaux'
[01:08:49]           clang: error: unable to execute command: Segmentation fault: 11
[01:08:49]           clang: error: linker command failed due to signal (use -v to see invocation)
[01:08:49]           
[01:08:49] 
[01:08:49] 
[01:08:49] ------------------------------------------
[01:08:49] 
[01:08:49] thread '[ui] ui/enum-size-variance.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2485:8
[01:08:49] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:08:49] 
[01:08:49] 
[01:08:49] failures:
[01:08:49]     [ui] ui/enum-size-variance.rs
[01:08:49] 
[01:08:49] test result: FAILED. 434 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out

@bors
Copy link
Contributor

bors commented Oct 28, 2017

⌛ Testing commit 014100d with merge 2e6a1a9...

bors added a commit that referenced this pull request Oct 28, 2017
Fix a quadradic duplication in json for multi-suggestions

r? @petrochenkov
@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 28, 2017
@bors
Copy link
Contributor

bors commented Oct 28, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing 2e6a1a9 to master...

@bors bors merged commit 014100d into rust-lang:master Oct 28, 2017
@oli-obk oli-obk deleted the json_diagnostics branch November 3, 2017 12:39
kennytm added a commit to kennytm/rust that referenced this pull request Nov 5, 2017
kennytm added a commit to kennytm/rust that referenced this pull request Nov 10, 2017
…crichton

Miscellaneous changes for CI, Docker and compiletest.

This PR contains 7 independent commits that improves interaction with CI, Docker and compiletest.

1. a4e5c91 — Forces a newline every 100 dots when testing in quiet mode. Prevents spurious timeouts when abusing the CI to test Android jobs.

2. 1b5aaf2 — Use vault.centos.org for dist-powerpc64le-linux, see rust-lang#45744.

3. 33400fb — Modify `src/ci/docker/run.sh` so that the docker images can be run from Docker Toolbox for Windows on Windows 7. I haven't checked the behavior of the newer Docker for Windows on Windows 10. Also, "can run" does not mean all the test can pass successfully (the UDP tests failed last time I checked)

4. d517668 — Don't emit a real warning the linker segfault, which affects UI tests like rust-lang#45489 (comment). Log it instead.

5. 51e2247 — During run-pass, trim the output if stdout/stderr exceeds 416 KB (top 160 KB + bottom 256 KB). This is an attempt to avoid spurious failures like rust-lang#45384 (comment)

6. 9cfdaba — Force `gem update --system` before deploy. This is an attempt to prevent spurious error rust-lang#44159.

7. eee10cc — Tries to print the crash log on macOS on failure. This is an attempt to debug rust-lang#45230.
djrenren pushed a commit to djrenren/compiletest that referenced this pull request Aug 26, 2019
Miscellaneous changes for CI, Docker and compiletest.

This PR contains 7 independent commits that improves interaction with CI, Docker and compiletest.

1. a4e5c91cb8 — Forces a newline every 100 dots when testing in quiet mode. Prevents spurious timeouts when abusing the CI to test Android jobs.

2. 1b5aaf22e8 — Use vault.centos.org for dist-powerpc64le-linux, see #45744.

3. 33400fbbcd — Modify `src/ci/docker/run.sh` so that the docker images can be run from Docker Toolbox for Windows on Windows 7. I haven't checked the behavior of the newer Docker for Windows on Windows 10. Also, "can run" does not mean all the test can pass successfully (the UDP tests failed last time I checked)

4. d517668a08 — Don't emit a real warning the linker segfault, which affects UI tests like rust-lang/rust#45489 (comment). Log it instead.

5. 51e2247948 — During run-pass, trim the output if stdout/stderr exceeds 416 KB (top 160 KB + bottom 256 KB). This is an attempt to avoid spurious failures like rust-lang/rust#45384 (comment)

6. 9cfdabaf3c — Force `gem update --system` before deploy. This is an attempt to prevent spurious error #44159.

7. eee10cc482 — Tries to print the crash log on macOS on failure. This is an attempt to debug #45230.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants