We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2ec40b commit bcb9c23Copy full SHA for bcb9c23
src/test/ui-fulldeps/issues-81357-unsound-file-methods.rs renamed to src/test/ui-fulldeps/issue-81357-unsound-file-methods.rs
@@ -55,10 +55,9 @@ fn main() {
55
let b = buf[0]; // capture buf[0]
56
thread::sleep(Duration::from_millis(200));
57
58
- // In this test, success is indicated by failing.
59
- if buf[0] == b {
60
- panic!("Success!");
61
- }
+ // Check the buffer hasn't been written to after read.
+ dbg!(buf[0], b);
+ assert_eq!(buf[0], b);
62
}
63
64
})
@@ -71,6 +70,12 @@ fn main() {
71
70
let _ = server.write(b"x");
72
thread::sleep(Duration::from_millis(100));
73
let _ = server.write(b"y");
74
- let _ = t1.join();
75
- let _ = t2.join();
+
+ // This is run fail because we need to test for the `abort`.
+ // That failing to run is the success case.
76
+ if t1.join().is_err() || t2.join().is_err() {
77
+ return;
78
+ } else {
79
+ panic!("success");
80
+ }
81
0 commit comments