]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
skip some tests when rust is enabled
authorJason Ish <ish@unx.ca>
Fri, 9 Jun 2017 16:11:02 +0000 (10:11 -0600)
committerJason Ish <ish@unx.ca>
Fri, 9 Jun 2017 16:11:02 +0000 (10:11 -0600)
dns-udp-dns-log-unanswered/skip.sh [new file with mode: 0644]
dns-udp-unsolicited-response/README.md
dns-udp-unsolicited-response/skip.sh [new file with mode: 0644]
run.py

diff --git a/dns-udp-dns-log-unanswered/skip.sh b/dns-udp-dns-log-unanswered/skip.sh
new file mode 100644 (file)
index 0000000..079d0c3
--- /dev/null
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+# Skip this test if Rust is enabled. Rust does not handle the non-eve
+# DNS log.
+if ./src/suricata --build-info | grep Rust | grep -q yes; then
+    exit 0
+fi
+
+exit 1
index 5766a9e901a3074f72cb9f924fae06bd9883f0b1..e202ff97bdc9820ce07e1bc6cf8aa298cc480e38 100644 (file)
@@ -6,3 +6,6 @@ Test the following sequence of DNS messages on a flow:
 
 Check that all 3 DNS message are logged, and that an unsolicted dns
 response event is logged.
+
+NOTE: Unsolicited responses do not exist with the Rust DNS parser as
+it doesn't correlate responses with requests.
diff --git a/dns-udp-unsolicited-response/skip.sh b/dns-udp-unsolicited-response/skip.sh
new file mode 100644 (file)
index 0000000..d809eed
--- /dev/null
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+# Skip this test if Rust is enabled.
+if ./src/suricata --build-info | grep Rust | grep -q yes; then
+    exit 0
+fi
+
+exit 1
diff --git a/run.py b/run.py
index c354c680def20dccd558d36dce62dcd6b14aa787..25f79cb2f262292cc8fd28cf21a25bd3ef48543a 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -139,6 +139,12 @@ def check_skip(directory):
     if os.path.exists(os.path.join(directory, "skip")):
         return (True, None)
 
+    if os.path.exists(os.path.join(directory, "skip.sh")):
+        rc = subprocess.call([
+            "/bin/sh", os.path.join(directory, "skip.sh")])
+        if rc == 0:
+            return True, None
+
     if directory.find("lua") > -1:
         if not check_for_lua():
             return (True, "lua not available")
@@ -193,7 +199,15 @@ def main():
             # If a test matches a pattern, we do not skip it.
             for pattern in args.patterns:
                 if name.find(pattern) > -1:
-                    do_test = True
+                    skip, reason = check_skip(dirpath)
+                    if skip:
+                        skipped += 1
+                        if reason:
+                            print("===> %s: SKIPPED: %s" % (name, reason))
+                        else:
+                            print("===> %s: SKIPPED" % (name))
+                    else:
+                        do_test = True
                     break
 
         if do_test: