You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: Require run-fail ui tests to have an exit code (SIGABRT not ok)
Normally a `run-fail` ui test shall not be terminated by a signal like
`SIGABRT`. So begin having that as a hard requirement.
Some of our current tests do terminate by a signal however. Introduce
and use `run-crash` for those tests.
TODO: Explain `run-fail-or-crash`.
Copy file name to clipboardExpand all lines: src/tools/compiletest/src/common.rs
+25-1Lines changed: 25 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -110,11 +110,35 @@ string_enum! {
110
110
}
111
111
}
112
112
113
+
string_enum!{
114
+
#[derive(Clone,Copy,PartialEq,Debug,Hash)]
115
+
pubenumRunResult{
116
+
Pass => "run-pass",
117
+
Fail => "run-fail",
118
+
Crash => "run-crash",
119
+
}
120
+
}
121
+
122
+
#[derive(Copy,Clone,Debug,PartialEq,PartialOrd)]
123
+
pubenumRunFailMode{
124
+
/// Running the program must make it exit with a regular failure exit code
125
+
/// in the range `1..=127`. If the program is terminated by e.g. a signal
126
+
/// the test will fail.
127
+
Fail,
128
+
/// Running the program must result in a crash, e.g. by `SIGABRT` or
129
+
/// `SIGSEGV` on Unix or on Windows by having an appropriate NTSTATUS high
130
+
/// bit in the exit code.
131
+
Crash,
132
+
/// Running the program must either fail or crash. Useful for e.g. sanitizer tests
133
+
/// since some sanitizer implementations exit the process with code 1 to indicate failure while others abort (crash) the process in the face of memory errors.
0 commit comments