Skip to content

Commit be81602

Browse files
authored
Merge pull request #5782 from samueltardieu/issue-5777
fuzz: reset the exit code global variable after every test
2 parents d07a2f0 + c23dbd3 commit be81602

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fuzz/fuzz_targets/fuzz_common.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ where
125125
let out = s.spawn(|| read_from_fd(pipe_stdout_fds[0]));
126126
let err = s.spawn(|| read_from_fd(pipe_stderr_fds[0]));
127127
let status = uumain_function(args.to_owned().into_iter());
128+
// Reset the exit code global variable in case we run another test after this one
129+
// See https://github.com/uutils/coreutils/issues/5777
130+
uucore::error::set_exit_code(0);
128131
io::stdout().flush().unwrap();
129132
io::stderr().flush().unwrap();
130133
unsafe {

0 commit comments

Comments
 (0)