mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-20 05:23:43 +00:00
fix qemu sigunaction tests
This commit is contained in:
@ -12,19 +12,19 @@
|
|||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
.POSIX:
|
|
||||||
|
|
||||||
_UNIQ=_QINU_
|
TARGETS=unsigaction.so unsigaction32.so unsigaction64.so
|
||||||
|
|
||||||
TARGETCANDIDATES=unsigaction.so
|
|
||||||
_TARGETS=$(_UNIQ)$(AFL_NO_X86)$(_UNIQ)
|
|
||||||
__TARGETS=$(_TARGETS:$(_UNIQ)1$(_UNIQ)=)
|
|
||||||
TARGETS=$(__TARGETS:$(_UNIQ)$(_UNIQ)=$(TARGETCANDIDATES))
|
|
||||||
|
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
|
||||||
unsigaction.so: unsigaction.c
|
unsigaction.so: unsigaction.c
|
||||||
@if $(CC) -fPIC -shared unsigaction.c -o unsigaction.so 2>/dev/null ; then echo "unsigaction build success"; else echo "unsigaction build failure (that's fine)"; fi
|
@if $(CC) -fPIC -shared unsigaction.c -o unsigaction.so 2>/dev/null ; then echo "unsigaction build success"; else echo "unsigaction build failure (that's fine)"; fi
|
||||||
|
|
||||||
|
unsigaction32.so: unsigaction.c
|
||||||
|
@if $(CC) -fPIC -m32 -shared unsigaction.c -o unsigaction32.so 2>/dev/null ; then echo "unsigaction32 build success"; else echo "unsigaction32 build failure (that's fine)"; fi
|
||||||
|
|
||||||
|
unsigaction64.so: unsigaction.c
|
||||||
|
@if $(CC) -fPIC -m64 -shared unsigaction.c -o unsigaction64.so 2>/dev/null ; then echo "unsigaction64 build success"; else echo "unsigaction64 build failure (that's fine)"; fi
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f unsigaction.so
|
rm -f unsigaction.so
|
||||||
|
@ -165,11 +165,8 @@ test -e ../afl-qemu-trace && {
|
|||||||
CODE=1
|
CODE=1
|
||||||
}
|
}
|
||||||
} || {
|
} || {
|
||||||
echo CUT------------------------------------------------------------------CUT
|
$ECHO "$YELLOW[-] cannot compile test program (32 bit) for unsigaction library"
|
||||||
cat errors
|
INCOMPLETE=1
|
||||||
echo CUT------------------------------------------------------------------CUT
|
|
||||||
$ECHO "$RED[!] cannot compile test program (32 bit) for unsigaction library"
|
|
||||||
CODE=1
|
|
||||||
}
|
}
|
||||||
} || {
|
} || {
|
||||||
$ECHO "$YELLOW[-] we cannot test qemu_mode unsigaction library (32 bit) because it is not present"
|
$ECHO "$YELLOW[-] we cannot test qemu_mode unsigaction library (32 bit) because it is not present"
|
||||||
@ -194,11 +191,8 @@ test -e ../afl-qemu-trace && {
|
|||||||
}
|
}
|
||||||
unset LD_PRELOAD
|
unset LD_PRELOAD
|
||||||
} || {
|
} || {
|
||||||
echo CUT------------------------------------------------------------------CUT
|
$ECHO "$YELLOW[-] cannot compile test program (64 bit) for unsigaction library"
|
||||||
cat errors
|
INCOMPLETE=1
|
||||||
echo CUT------------------------------------------------------------------CUT
|
|
||||||
$ECHO "$RED[!] cannot compile test program (64 bit) for unsigaction library"
|
|
||||||
CODE=1
|
|
||||||
}
|
}
|
||||||
} || {
|
} || {
|
||||||
$ECHO "$YELLOW[-] we cannot test qemu_mode unsigaction library (64 bit) because it is not present"
|
$ECHO "$YELLOW[-] we cannot test qemu_mode unsigaction library (64 bit) because it is not present"
|
||||||
|
@ -217,7 +217,9 @@ cd ../samples/python_simple || echo "Cannot cd"
|
|||||||
|
|
||||||
# Run afl-showmap on the sample application. If anything comes out then it must have worked!
|
# Run afl-showmap on the sample application. If anything comes out then it must have worked!
|
||||||
unset AFL_INST_RATIO
|
unset AFL_INST_RATIO
|
||||||
echo 0 | ../../../afl-showmap -U -m none -t 2000 -q -o ./.test-instr0 -- $PYTHONBIN ./simple_test_harness.py ./sample_inputs/sample1.bin || echo "Showmap"
|
pwd
|
||||||
|
echo "echo 0 | ../../../afl-showmap -U -m none -t 2000 -o ./.test-instr0 -- $PYTHONBIN ./simple_test_harness.py ./sample_inputs/sample1.bin"
|
||||||
|
echo 0 | ../../../afl-showmap -U -m none -t 2000 -o ./.test-instr0 -- $PYTHONBIN ./simple_test_harness.py ./sample_inputs/sample1.bin || echo "Showmap"
|
||||||
|
|
||||||
if [ -s ./.test-instr0 ]
|
if [ -s ./.test-instr0 ]
|
||||||
then
|
then
|
||||||
|
Reference in New Issue
Block a user