WiP
[oweals/gnunet.git] / src / monkey / test_monkey_npe.sh
index ef611f8fb781624d683e45ff647d2775b6d0bfec..c8fa2ceaa87e2b3c30bdae1c5e01355378d7c9ef 100755 (executable)
@@ -1,5 +1,11 @@
 #!/bin/sh
-./gnunet-monkey --output=npe.out ./bug_null_pointer_exception && exit 1
-grep "null pointer exception on line bug_null_pointer_exception.c:12" npe.out  > /dev/null || exit 2
-grep "expression \`nullString\' is NULL" npe.out  > /dev/null || exit 2
+echo -n "Test Monkey with Bug - Null Pointer Exception -"
+gnunet-monkey --mode text --binary bug_null_pointer_exception --output npe.out && exit 0
+grep "Bug detected in file:bug_null_pointer_exception.c" npe.out > /dev/null || exit 1
+grep "function:crashFunction" npe.out > /dev/null || exit 1
+grep "line:8" npe.out > /dev/null || exit 1
+grep "reason:Signal received" npe.out > /dev/null || exit 1
+grep "received signal:EXC_BAD_ACCESS" npe.out > /dev/null || exit 1
+grep "Could not access memory" npe.out > /dev/null || exit 1
 rm -f npe.out
+echo "PASS"
\ No newline at end of file