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

Test trying to write to /tmp/random.bytes #1293

Closed
bjorn3 opened this issue Feb 26, 2023 · 3 comments · Fixed by #1294
Closed

Test trying to write to /tmp/random.bytes #1293

bjorn3 opened this issue Feb 26, 2023 · 3 comments · Fixed by #1294

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Feb 26, 2023

/tmp may not exist (for example on Windows), or /tmp/random.bytes may be owned by another user. This is causing cargo test --workspace to fail on Windows: https://github.com/bjorn3/rustc_codegen_cranelift/actions/runs/4275370282/jobs/7442671959

/// io::copy(&mut OsRng.read_adapter().take(100), &mut File::create("/tmp/random.bytes").unwrap()).unwrap();

@dhardy
Copy link
Member

dhardy commented Feb 26, 2023

From #1267 by @SUPERCILEX. Guess I should review doc-tests better; sorry.

Tests shouldn't really affect any files, so writing to a temporary buffer would make more sense.

@SUPERCILEX
Copy link
Contributor

Oops, forgot that stuff gets run. Should we just mark it as no_run? I don't see the value in actually executing that code since it doesn't check anything anyway.

@dhardy
Copy link
Member

dhardy commented Feb 26, 2023

That sounds fine.

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

Successfully merging a pull request may close this issue.

3 participants