mirror of
https://github.com/utoni/nDPId.git
synced 2026-05-06 03:45:27 +00:00
Fixed CMake global CFLAGS misuse which can cause xcompile errors.
nDPIsrvd-captured supports skipping flows w/o any layer 4 payload. * libndpi update * run_tests does not generate any *.out files for fuzz-*.pcap anymore and does not fail if nDPId-test exits with value 1 (most likely caused by a libpcap failure) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
parent
9ffaeef24d
commit
db39772aa7
15 changed files with 61 additions and 2336 deletions
|
|
@ -82,7 +82,7 @@ if [ $? -ne 1 ]; then
|
|||
exit 7
|
||||
fi
|
||||
|
||||
for pcap_file in $(ls *.pcap *.pcapng *.cap); do
|
||||
find . -printf '%f\n' -iname '*.pcap' -o -iname '*.pcapng' -o -iname '*.cap' | while read pcap_file; do
|
||||
if file "${pcap_file}" | grep -qoE ':\s(pcap|pcap-ng) capture file'; then
|
||||
true # pass
|
||||
else
|
||||
|
|
@ -94,13 +94,27 @@ for pcap_file in $(ls *.pcap *.pcapng *.cap); do
|
|||
printf '%s\n' "-- OUT: ${MYDIR}/results/${pcap_file}.out" \
|
||||
>>"/tmp/nDPId-test-stderr/${pcap_file}.out"
|
||||
|
||||
printf "%-${LINE_SPACES}s\t" "${pcap_file}"
|
||||
|
||||
${nDPId_test_EXEC} "${pcap_file}" \
|
||||
>"${MYDIR}/results/${pcap_file}.out.new" \
|
||||
2>>"/tmp/nDPId-test-stderr/${pcap_file}.out"
|
||||
nDPId_test_RETVAL=$?
|
||||
|
||||
printf "%-${LINE_SPACES}s\t" "${pcap_file}"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
if [[ ${pcap_file} == fuzz-* ]]; then
|
||||
if [ ${nDPId_test_RETVAL} -eq 0 ]; then
|
||||
printf '%s\n' '[OK]'
|
||||
elif [ ${nDPId_test_RETVAL} -eq 1 ]; then
|
||||
# fuzzed PCAPs with a return value of 1 indicates that libpcap failed
|
||||
printf '%s\n' '[FAIL][IGNORED]'
|
||||
else
|
||||
# may be a valid sanitizer/other failure
|
||||
printf '%s\n' '[FAIL]'
|
||||
printf '%s\n' '----------------------------------------'
|
||||
printf '%s\n' "-- STDERR of ${pcap_file}: /tmp/nDPId-test-stderr/${pcap_file}.out"
|
||||
cat "/tmp/nDPId-test-stderr/${pcap_file}.out"
|
||||
fi
|
||||
elif [ ${nDPId_test_RETVAL} -eq 0 ]; then
|
||||
if [ ! -r "${MYDIR}/results/${pcap_file}.out" ]; then
|
||||
printf '%s\n' '[NEW]'
|
||||
mv -v "${MYDIR}/results/${pcap_file}.out.new" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue