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

const forget tests #69645

Merged
merged 3 commits into from
Mar 11, 2020
Merged

const forget tests #69645

merged 3 commits into from
Mar 11, 2020

Conversation

DutchGhost
Copy link
Contributor

Adds tests for #69617

@rust-highfive
Copy link
Collaborator

r? @withoutboats

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 2, 2020
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-02T20:07:46.2401610Z ========================== Starting Command Output ===========================
2020-03-02T20:07:46.2405761Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/941d5007-d83f-4014-a60a-2451b3e7563d.sh
2020-03-02T20:07:46.2406220Z 
2020-03-02T20:07:46.2410843Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-02T20:07:46.2433527Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69645/merge to s
2020-03-02T20:07:46.2439348Z Task         : Get sources
2020-03-02T20:07:46.2439642Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-02T20:07:46.2440077Z Version      : 1.0.0
2020-03-02T20:07:46.2440291Z Author       : Microsoft
---
2020-03-02T20:07:47.2294020Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-02T20:07:47.2299528Z ##[command]git config gc.auto 0
2020-03-02T20:07:47.2303221Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-02T20:07:47.2313725Z ##[command]git config --get-all http.proxy
2020-03-02T20:07:47.2320028Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69645/merge:refs/remotes/pull/69645/merge

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-02T20:41:35.2739657Z ========================== Starting Command Output ===========================
2020-03-02T20:41:35.2742215Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/6a6e3c68-ee58-43ab-9817-d87d38363fa2.sh
2020-03-02T20:41:35.2742491Z 
2020-03-02T20:41:35.2745656Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-02T20:41:35.2765004Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69645/merge to s
2020-03-02T20:41:35.2768750Z Task         : Get sources
2020-03-02T20:41:35.2769073Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-02T20:41:35.2769386Z Version      : 1.0.0
2020-03-02T20:41:35.2769595Z Author       : Microsoft
---
2020-03-02T20:41:36.2678725Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-02T20:41:36.2684859Z ##[command]git config gc.auto 0
2020-03-02T20:41:36.2689292Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-02T20:41:36.2693281Z ##[command]git config --get-all http.proxy
2020-03-02T20:41:36.2700145Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69645/merge:refs/remotes/pull/69645/merge
---
2020-03-02T21:44:48.6275770Z .................................................................................................... 1700/9741
2020-03-02T21:44:53.1015703Z .................................................................................................... 1800/9741
2020-03-02T21:45:04.8570571Z ......................................................................i............................. 1900/9741
2020-03-02T21:45:11.2210200Z .................................................................................................... 2000/9741
2020-03-02T21:45:26.5328381Z ............................................................iiiii................................... 2100/9741
2020-03-02T21:45:37.2067180Z .................................................................................................... 2300/9741
2020-03-02T21:45:39.4405600Z .................................................................................................... 2400/9741
2020-03-02T21:45:42.4238553Z .................................................................................................... 2500/9741
2020-03-02T21:46:02.8771309Z .................................................................................................... 2600/9741
---
2020-03-02T21:48:45.8179249Z .....................i...............i.............................................................. 5000/9741
2020-03-02T21:48:55.9049869Z .................................................................................................... 5100/9741
2020-03-02T21:49:01.8497861Z ................................................................i................................... 5200/9741
2020-03-02T21:49:08.6914337Z .................................................................................................... 5300/9741
2020-03-02T21:49:17.8680174Z ...........................................ii.ii........i...i....................................... 5400/9741
2020-03-02T21:49:26.3140357Z .................................................................................................... 5600/9741
2020-03-02T21:49:36.2104085Z .................................................................................................... 5700/9741
2020-03-02T21:49:43.3919020Z ..................................i................................................................. 5800/9741
2020-03-02T21:49:49.4260255Z .................................................................................................... 5900/9741
2020-03-02T21:49:49.4260255Z .................................................................................................... 5900/9741
2020-03-02T21:50:00.3051042Z .................................................................................................... 6000/9741
2020-03-02T21:50:10.6650547Z ..........................ii...i..ii...........i.................................................... 6100/9741
2020-03-02T21:50:27.7994280Z .................................................................................................... 6300/9741
2020-03-02T21:50:31.3899641Z .................................................................................................... 6400/9741
2020-03-02T21:50:31.3899641Z .................................................................................................... 6400/9741
2020-03-02T21:50:38.1872375Z .........................................................i..ii...................................... 6500/9741
2020-03-02T21:51:05.9131881Z .................................................................................................... 6700/9741
2020-03-02T21:51:08.3500544Z .................................................i.................................................. 6800/9741
2020-03-02T21:51:10.5006438Z .................................................................................................... 6900/9741
2020-03-02T21:51:12.6539503Z ...............................................................................i.................... 7000/9741
---
2020-03-02T21:52:53.0508879Z .................................................................................................... 7700/9741
2020-03-02T21:52:57.6136827Z .................................................................................................... 7800/9741
2020-03-02T21:53:02.9263778Z .................................................................................................... 7900/9741
2020-03-02T21:53:10.8079119Z .........................i.......................................................................... 8000/9741
2020-03-02T21:53:19.1820316Z ..........................................................................iiiiiii.i................. 8100/9741
2020-03-02T21:53:35.0190131Z ...............i......i............................................................................. 8300/9741
2020-03-02T21:53:40.2534177Z .................................................................................................... 8400/9741
2020-03-02T21:53:53.1093443Z .................................................................................................... 8500/9741
2020-03-02T21:54:02.8735619Z .................................................................................................... 8600/9741
---
2020-03-02T21:56:25.5426102Z  finished in 7.179
2020-03-02T21:56:25.5627499Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-02T21:56:25.7628384Z 
2020-03-02T21:56:25.7628868Z running 178 tests
2020-03-02T21:56:28.8489641Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-03-02T21:56:31.1510349Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-03-02T21:56:31.1513669Z 
2020-03-02T21:56:31.1520433Z  finished in 5.589
2020-03-02T21:56:31.1735420Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-02T21:56:31.3413735Z 
---
2020-03-02T21:56:33.3068336Z  finished in 2.132
2020-03-02T21:56:33.3269690Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-02T21:56:33.4872107Z 
2020-03-02T21:56:33.4872934Z running 9 tests
2020-03-02T21:56:33.4874167Z iiiiiiiii
2020-03-02T21:56:33.4877363Z 
2020-03-02T21:56:33.4877791Z  finished in 0.160
2020-03-02T21:56:33.5084723Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-02T21:56:33.7031972Z 
---
2020-03-02T21:56:53.8515242Z  finished in 20.343
2020-03-02T21:56:53.8755367Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-02T21:56:54.0675520Z 
2020-03-02T21:56:54.0676877Z running 116 tests
2020-03-02T21:57:08.3297182Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-03-02T21:57:10.2987627Z ....iiii.....ii.
2020-03-02T21:57:10.2990621Z 
2020-03-02T21:57:10.2993856Z  finished in 16.424
2020-03-02T21:57:10.3000138Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-02T21:57:10.3001112Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-03-02T22:09:14.7882602Z    Compiling core v0.0.0 (/checkout/src/libcore)
2020-03-02T22:09:29.4609644Z error: variable does not need to be mutable
2020-03-02T22:09:29.4611730Z    --> src/libcore/../libcore/tests/mem.rs:143:34
2020-03-02T22:09:29.4612619Z     |
2020-03-02T22:09:29.4613549Z 143 |     const fn const_forget_box<T>(mut x: Box<T>) {
2020-03-02T22:09:29.4615913Z     |                                  |
2020-03-02T22:09:29.4616994Z     |                                  help: remove this `mut`
2020-03-02T22:09:29.4617840Z     |
2020-03-02T22:09:29.4618718Z     = note: `-D unused-mut` implied by `-D warnings`
---
2020-03-02T22:09:32.9732867Z   local time: Mon Mar  2 22:09:32 UTC 2020
2020-03-02T22:09:33.5132542Z   network time: Mon, 02 Mar 2020 22:09:33 GMT
2020-03-02T22:09:33.5139427Z == end clock drift check ==
2020-03-02T22:09:34.0072598Z 
2020-03-02T22:09:34.0150445Z ##[error]Bash exited with code '1'.
2020-03-02T22:09:34.0166783Z ##[section]Finishing: Run build
2020-03-02T22:09:34.0231964Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69645/merge to s
2020-03-02T22:09:34.0237885Z Task         : Get sources
2020-03-02T22:09:34.0238239Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-02T22:09:34.0238564Z Version      : 1.0.0
2020-03-02T22:09:34.0238812Z Author       : Microsoft
2020-03-02T22:09:34.0238812Z Author       : Microsoft
2020-03-02T22:09:34.0239181Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-02T22:09:34.0239599Z ==============================================================================
2020-03-02T22:09:34.3737627Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-02T22:09:34.3784152Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69645/merge to s
2020-03-02T22:09:34.3874632Z Cleaning up task key
2020-03-02T22:09:34.3879423Z Start cleaning up orphan processes.
2020-03-02T22:09:34.4054214Z Terminate orphan process: pid (4084) (python)
2020-03-02T22:09:34.4298069Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

Copy link

@Dylan-DPC-zz Dylan-DPC-zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors r+ rollup

@JohnTitor
Copy link
Member

bors doesn't listen to review comments, r+ on behalf of Dylan :)
@bors r=Dylan-DPC rollup=always

@bors
Copy link
Contributor

bors commented Mar 11, 2020

📌 Commit a674e1c has been approved by Dylan-DPC

@bors
Copy link
Contributor

bors commented Mar 11, 2020

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@bors bors 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 Mar 11, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 11, 2020
bors added a commit that referenced this pull request Mar 11, 2020
Rollup of 10 pull requests

Successful merges:

 - #66059 (mem::zeroed/uninit: panic on types that do not permit zero-initialization)
 - #69373 (Stabilize const for integer {to,from}_{be,le,ne}_bytes methods)
 - #69591 (Use TypeRelating for instantiating query responses)
 - #69625 (Implement nth, last, and count for iter::Copied)
 - #69645 (const forget tests)
 - #69766 (Make Point `Copy` in arithmetic documentation)
 - #69825 (make `mem::discriminant` const)
 - #69859 (fix #62456)
 - #69891 (Exhaustiveness checking, `Matrix::push`: recursively expand or-patterns)
 - #69896 (parse: Tweak the function parameter edition check)

Failed merges:

r? @ghost
@bors bors merged commit ae12272 into rust-lang:master Mar 11, 2020

// Call the forget_box at runtime,
// as we can't const-construct a box yet.
const_forget_box(Box::new(0i32));
Copy link
Member

@RalfJung RalfJung Mar 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test fails in Miri due to a memory leak: it complains that there is a (run-time!) allocation that did not get freed, and that allocation is the Box being created here.

It almost looks like that is deliberate? Do we really want a leaking test in the test suite? Cc @oli-obk

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't entirely see the point of calling this function at run-time, as it tests nothing about CTFE. Sure, you can't test it at compile-time, but testing at run-time instead makes no sense, it just tests the entirely wrong thing. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh woops, I'm sory, I didn't thought of this failing miri. (Why did the CI still succeed, btw? no miri test?)
The runtime call was more like a 'Proof' it still works at runtime. It can be removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to CI budget constraints, running Miri on the libcore test suite is a separate project. That's why CI here did not fail.

It can be removed.

I would prefer that. Can you submit a PR?

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.

7 participants