From: Jason Ish Date: Fri, 9 Jun 2017 16:11:02 +0000 (-0600) Subject: skip some tests when rust is enabled X-Git-Tag: suricata-6.0.4~581 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c832fe04db24bb6c2ee4e446070d1fd2ec793272;p=thirdparty%2Fsuricata-verify.git skip some tests when rust is enabled --- diff --git a/dns-udp-dns-log-unanswered/skip.sh b/dns-udp-dns-log-unanswered/skip.sh new file mode 100644 index 000000000..079d0c3d3 --- /dev/null +++ b/dns-udp-dns-log-unanswered/skip.sh @@ -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 diff --git a/dns-udp-unsolicited-response/README.md b/dns-udp-unsolicited-response/README.md index 5766a9e90..e202ff97b 100644 --- a/dns-udp-unsolicited-response/README.md +++ b/dns-udp-unsolicited-response/README.md @@ -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 index 000000000..d809eeda8 --- /dev/null +++ b/dns-udp-unsolicited-response/skip.sh @@ -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 c354c680d..25f79cb2f 100755 --- 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: