]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
mac fixups
authorJason Ish <ish@unx.ca>
Fri, 7 Apr 2017 21:48:46 +0000 (15:48 -0600)
committerJason Ish <ish@unx.ca>
Mon, 1 May 2017 21:36:43 +0000 (15:36 -0600)
proto-mismatch-http-ssh/check.sh
run.sh
test-config-empty-rule-file/run.sh

index 252d1bf294ffd6879e1b52f35c3ea9800cb9bb39..5f1cc4e9166442ef202f7db3cdb244382913fec2 100755 (executable)
@@ -4,14 +4,18 @@ failed=no
 
 # We should get a "SURICATA Applayer Mismatch protocol both
 # directions" alert.
-n=$(cat output/eve.json | jq -c 'select(.alert.signature_id == 2260000)' | wc -l)
+n=$(cat output/eve.json | \
+       jq -c 'select(.alert.signature_id == 2260000)' | \
+       wc -l | xargs)
 if [ "$n" != 1 ]; then
     echo "expected 1 event with SID 2260000"
     failed=yes
 fi
 
 # We should have a flow event with app_proto = http and app_proto_tc = ssh.
-n=$(cat output/eve.json | jq -c 'select(.event_type == "flow") | select(.app_proto == "http") | select(.app_proto_tc == "ssh")' | wc -l)
+n=$(cat output/eve.json | \
+       jq -c 'select(.event_type == "flow") | select(.app_proto == "http") | select(.app_proto_tc == "ssh")' | \
+       wc -l | xargs)
 if [ "$n" != 1 ]; then
     echo "expected 1 event with app_proto http and app_proto_tc ssh"
     failed=yes
diff --git a/run.sh b/run.sh
index 388f117259545eb73f3163d7d49151922fdece30..025bf72ad22eca1c063c74e1257f32c0d6581ebd 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -69,7 +69,14 @@ if [ -e "${prefix}/private" ]; then
     tests="${tests} ${private}"
 fi
 
-export ASAN_OPTIONS="detect_leaks=${DETECT_LEAKS:=1},disable_core=1"
+case $(uname) in
+    Darwin)
+       true
+       ;;
+    *)
+       export ASAN_OPTIONS="detect_leaks=${DETECT_LEAKS:=1},disable_core=1"
+       ;;
+esac
 export LSAN_OPTIONS="suppressions=qa/lsan.suppress"
 
 run_test() {
index 262028098c310567c1dd7257f6c12979f5858e32..056a47b62f0f3465f24016b5ee8da56148278457 100755 (executable)
@@ -1,8 +1,9 @@
 #! /bin/sh
 
 run() {
+    mkdir -p ${TEST_DIR}/output
     if ! ./src/suricata -T -c ${TEST_DIR}/suricata.yaml -vvv \
-        --set default-rule-path="${TEST_DIR}"; then
+        -l ${TEST_DIR}/output --set default-rule-path="${TEST_DIR}"; then
        exit 1
     fi
 }