diff options
Diffstat (limited to 'pathologist/src/pathologist/test_monkey_npe.sh')
-rwxr-xr-x | pathologist/src/pathologist/test_monkey_npe.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pathologist/src/pathologist/test_monkey_npe.sh b/pathologist/src/pathologist/test_monkey_npe.sh new file mode 100755 index 0000000..5f3d528 --- /dev/null +++ b/pathologist/src/pathologist/test_monkey_npe.sh | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | echo -n "Test Monkey with Bug - Null Pointer Exception -" | ||
3 | gnunet-monkey -m text -d bug_null_pointer_exception.db -b bug_null_pointer_exception -o npe.out || (echo "Monkey Failed!" && exit 1) | ||
4 | grep "Bug detected in file:bug_null_pointer_exception.c" npe.out > /dev/null || (echo "FAIL" && exit 1) | ||
5 | grep "function:crashFunction" npe.out > /dev/null || (echo "FAIL" && exit 1) | ||
6 | grep "line:14" npe.out > /dev/null || (echo "FAIL" && exit 1) | ||
7 | grep "reason:(null)" npe.out > /dev/null || (echo "FAIL" && exit 1) | ||
8 | grep "received signal:SIGSEGV" npe.out > /dev/null || (echo "FAIL" && exit 1) | ||
9 | grep "Segmentation fault" npe.out > /dev/null || (echo "FAIL" && exit 1) | ||
10 | grep " Details:" npe.out > /dev/null || (echo "FAIL" && exit 1) | ||
11 | grep " Expression:crashStruct is NULL" npe.out > /dev/null || (echo "FAIL" && exit 1) | ||
12 | rm -f npe.out | ||
13 | echo "PASS" | ||