Skip to content

Commit

Permalink
Crash: Add a "Test All Crash Types" option
Browse files Browse the repository at this point in the history
Add an option "-A", that will run all of the crash types in the crash
program. In this mode, all crash tests are run in a child process so
that the crash program does not crash.

Crash uses the return status of the child process to ascertain whether
the crash happened as expected.
  • Loading branch information
shannonbooth authored and awesomekling committed Dec 31, 2019
1 parent 74a18c8 commit d0f9906
Show file tree
Hide file tree
Showing 2 changed files with 226 additions and 103 deletions.
2 changes: 2 additions & 0 deletions Base/usr/share/man/man1/crash.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ kinds of crashes.

## Options

* `-A`: Test that all of the following crashes crash as intended.
* `-s`: Perform a segmentation violation by dereferencing an invalid pointer.
* `-d`: Perform a division by zero.
* `-i`: Execute an illegal CPU instruction.
Expand All @@ -36,5 +37,6 @@ kinds of crashes.

```sh
$ crash -F
Testing: "Write to freed memory"
Shell: crash(33) exitied due to signal "Segmentation violation"
```
Loading

0 comments on commit d0f9906

Please sign in to comment.