1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00

Crash: Add a "Test All Crash Types" option

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.
This commit is contained in:
Shannon Booth 2019-12-30 15:07:57 +13:00 committed by Andreas Kling
parent 74a18c86c9
commit d0f9906c17
2 changed files with 225 additions and 102 deletions

View file

@ -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.
@ -36,5 +37,6 @@ kinds of crashes.
```sh
$ crash -F
Testing: "Write to freed memory"
Shell: crash(33) exitied due to signal "Segmentation violation"
```