Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: handle exiting via signal as a failure regardless of assertCmd …
…type Currently, assertCmdFalse only checks that a command exited with a nonzero return code, but not WHY it returned nonzero. That means, this assert is perfectly happy with a command exiting with SIGSEGV, passing the test. This commit changes two things: 1. check for exit via a signal 2. force ASAN to abort on error, causing an exit via SIGABRT This way, SIGSEGVs should be caught on assertCmdFalse cases, meaning that we should be asserting that our command handles invalid input correctly instead of crashing. ASAN needs to specifically be configured to abort, otherwise it will return a nonzero return code that might just be picked up as a "correct error" by mistake. Signed-off-by: Eric Richter <erichte@linux.ibm.com>
- Loading branch information