aboutsummaryrefslogtreecommitdiff
path: root/src/monkey/test_monkey_npe.sh
blob: c8fa2ceaa87e2b3c30bdae1c5e01355378d7c9ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
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"