aboutsummaryrefslogtreecommitdiff
path: root/pathologist/src/pathologist/test_monkey_npe.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pathologist/src/pathologist/test_monkey_npe.sh')
-rwxr-xr-xpathologist/src/pathologist/test_monkey_npe.sh13
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
2echo -n "Test Monkey with Bug - Null Pointer Exception -"
3gnunet-monkey -m text -d bug_null_pointer_exception.db -b bug_null_pointer_exception -o npe.out || (echo "Monkey Failed!" && exit 1)
4grep "Bug detected in file:bug_null_pointer_exception.c" npe.out > /dev/null || (echo "FAIL" && exit 1)
5grep "function:crashFunction" npe.out > /dev/null || (echo "FAIL" && exit 1)
6grep "line:14" npe.out > /dev/null || (echo "FAIL" && exit 1)
7grep "reason:(null)" npe.out > /dev/null || (echo "FAIL" && exit 1)
8grep "received signal:SIGSEGV" npe.out > /dev/null || (echo "FAIL" && exit 1)
9grep "Segmentation fault" npe.out > /dev/null || (echo "FAIL" && exit 1)
10grep " Details:" npe.out > /dev/null || (echo "FAIL" && exit 1)
11grep " Expression:crashStruct is NULL" npe.out > /dev/null || (echo "FAIL" && exit 1)
12rm -f npe.out
13echo "PASS"