Date: Tue, 18 May 2021 12:18:45 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 2b8399210bb0 - stable/13 - tests: Only log critical errors from scapy Message-ID: <202105181218.14ICIjSC051796@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2b8399210bb00c868b4cce86d86fc68a5a0a9121 commit 2b8399210bb00c868b4cce86d86fc68a5a0a9121 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-05-12 17:13:40 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-05-18 10:00:38 +0000 tests: Only log critical errors from scapy Since 2.4.5 scapy started issuing warnings about a few different configurations during our tests. These are harmless, but they generate stderr output, which upsets atf_check. Configure scapy to only log critical errors (and thus not warnings) to fix these tests. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit a26e895f3d803cc1f4ee1c2b33c61330998808b9) --- tests/sys/common/divert.py | 2 ++ tests/sys/common/sender.py | 2 ++ tests/sys/net/stp.py | 2 ++ tests/sys/netinet6/exthdr.py | 2 ++ tests/sys/netinet6/frag6/frag6_01.py | 2 ++ tests/sys/netinet6/frag6/frag6_02.py | 2 ++ tests/sys/netinet6/frag6/frag6_03.py | 2 ++ tests/sys/netinet6/frag6/frag6_04.py | 2 ++ tests/sys/netinet6/frag6/frag6_05.py | 2 ++ tests/sys/netinet6/frag6/frag6_06.py | 2 ++ tests/sys/netinet6/frag6/frag6_07.py | 2 ++ tests/sys/netinet6/frag6/frag6_08.py | 2 ++ tests/sys/netinet6/frag6/frag6_09.py | 2 ++ tests/sys/netinet6/frag6/frag6_10.py | 2 ++ tests/sys/netinet6/frag6/frag6_11.py | 2 ++ tests/sys/netinet6/frag6/frag6_12.py | 2 ++ tests/sys/netinet6/frag6/frag6_13.py | 2 ++ tests/sys/netinet6/frag6/frag6_14.py | 2 ++ tests/sys/netinet6/frag6/frag6_15.py | 2 ++ tests/sys/netinet6/frag6/frag6_16.py | 2 ++ tests/sys/netinet6/frag6/frag6_17.py | 2 ++ tests/sys/netinet6/frag6/frag6_18.py | 2 ++ tests/sys/netinet6/frag6/frag6_19.py | 2 ++ tests/sys/netinet6/frag6/frag6_20.py | 2 ++ tests/sys/netinet6/frag6/sniffer.py | 2 ++ tests/sys/netinet6/mld.py | 2 ++ tests/sys/netinet6/redirect.py | 2 ++ tests/sys/netinet6/scapyi386.py | 2 ++ tests/sys/netpfil/common/pft_ping.py | 2 ++ tests/sys/netpfil/pf/CVE-2019-5597.py | 2 ++ tests/sys/netpfil/pf/CVE-2019-5598.py | 2 ++ 31 files changed, 62 insertions(+) diff --git a/tests/sys/common/divert.py b/tests/sys/common/divert.py index 1861f87402ad..f23fbe857cbb 100755 --- a/tests/sys/common/divert.py +++ b/tests/sys/common/divert.py @@ -30,6 +30,8 @@ import socket +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sc import argparse diff --git a/tests/sys/common/sender.py b/tests/sys/common/sender.py index 483210e54fcb..2ff699a8ef6d 100755 --- a/tests/sys/common/sender.py +++ b/tests/sys/common/sender.py @@ -31,6 +31,8 @@ from functools import partial import socket +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sc import argparse import time diff --git a/tests/sys/net/stp.py b/tests/sys/net/stp.py index 4c4c0af4c728..3e7d011efdd1 100644 --- a/tests/sys/net/stp.py +++ b/tests/sys/net/stp.py @@ -27,6 +27,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import sys import os diff --git a/tests/sys/netinet6/exthdr.py b/tests/sys/netinet6/exthdr.py index 7c09f44c5b58..52739a9cfa11 100644 --- a/tests/sys/netinet6/exthdr.py +++ b/tests/sys/netinet6/exthdr.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_01.py b/tests/sys/netinet6/frag6/frag6_01.py index 5a6b327337c6..efa99ce65759 100644 --- a/tests/sys/netinet6/frag6/frag6_01.py +++ b/tests/sys/netinet6/frag6/frag6_01.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_02.py b/tests/sys/netinet6/frag6/frag6_02.py index 945b428c3dac..794801b4a819 100644 --- a/tests/sys/netinet6/frag6/frag6_02.py +++ b/tests/sys/netinet6/frag6/frag6_02.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_03.py b/tests/sys/netinet6/frag6/frag6_03.py index 341de7915bd8..434dfe554a5a 100644 --- a/tests/sys/netinet6/frag6/frag6_03.py +++ b/tests/sys/netinet6/frag6/frag6_03.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_04.py b/tests/sys/netinet6/frag6/frag6_04.py index 6c35d4858ccb..8f0a20e003da 100644 --- a/tests/sys/netinet6/frag6/frag6_04.py +++ b/tests/sys/netinet6/frag6/frag6_04.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_05.py b/tests/sys/netinet6/frag6/frag6_05.py index d67c35581bbf..f9bc947d5465 100644 --- a/tests/sys/netinet6/frag6/frag6_05.py +++ b/tests/sys/netinet6/frag6/frag6_05.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_06.py b/tests/sys/netinet6/frag6/frag6_06.py index 42c8b02042cd..ca4e9b1a5ca0 100644 --- a/tests/sys/netinet6/frag6/frag6_06.py +++ b/tests/sys/netinet6/frag6/frag6_06.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_07.py b/tests/sys/netinet6/frag6/frag6_07.py index c84a783137d3..231f49eac2e0 100644 --- a/tests/sys/netinet6/frag6/frag6_07.py +++ b/tests/sys/netinet6/frag6/frag6_07.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_08.py b/tests/sys/netinet6/frag6/frag6_08.py index fa17e1e5c774..25f57f702e71 100644 --- a/tests/sys/netinet6/frag6/frag6_08.py +++ b/tests/sys/netinet6/frag6/frag6_08.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_09.py b/tests/sys/netinet6/frag6/frag6_09.py index 6e9771bc7d58..63ec646e1175 100644 --- a/tests/sys/netinet6/frag6/frag6_09.py +++ b/tests/sys/netinet6/frag6/frag6_09.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_10.py b/tests/sys/netinet6/frag6/frag6_10.py index 02d25bd96450..fcd331190c02 100644 --- a/tests/sys/netinet6/frag6/frag6_10.py +++ b/tests/sys/netinet6/frag6/frag6_10.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_11.py b/tests/sys/netinet6/frag6/frag6_11.py index a5c8e1918430..6b9643337597 100644 --- a/tests/sys/netinet6/frag6/frag6_11.py +++ b/tests/sys/netinet6/frag6/frag6_11.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_12.py b/tests/sys/netinet6/frag6/frag6_12.py index 68ea180599e1..a683782f2b69 100644 --- a/tests/sys/netinet6/frag6/frag6_12.py +++ b/tests/sys/netinet6/frag6/frag6_12.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_13.py b/tests/sys/netinet6/frag6/frag6_13.py index da3b2afe239f..e377a4272fa1 100644 --- a/tests/sys/netinet6/frag6/frag6_13.py +++ b/tests/sys/netinet6/frag6/frag6_13.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_14.py b/tests/sys/netinet6/frag6/frag6_14.py index 915571cfc36f..b53a65e67529 100644 --- a/tests/sys/netinet6/frag6/frag6_14.py +++ b/tests/sys/netinet6/frag6/frag6_14.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_15.py b/tests/sys/netinet6/frag6/frag6_15.py index f9922aaa9717..fff5c1efbe17 100644 --- a/tests/sys/netinet6/frag6/frag6_15.py +++ b/tests/sys/netinet6/frag6/frag6_15.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_16.py b/tests/sys/netinet6/frag6/frag6_16.py index 42ac8e2b4675..bf5b78cb6d6b 100644 --- a/tests/sys/netinet6/frag6/frag6_16.py +++ b/tests/sys/netinet6/frag6/frag6_16.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_17.py b/tests/sys/netinet6/frag6/frag6_17.py index a4d6deea0a24..b4a1a1898c2e 100644 --- a/tests/sys/netinet6/frag6/frag6_17.py +++ b/tests/sys/netinet6/frag6/frag6_17.py @@ -30,6 +30,8 @@ import argparse import random as random +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_18.py b/tests/sys/netinet6/frag6/frag6_18.py index a4d6deea0a24..b4a1a1898c2e 100644 --- a/tests/sys/netinet6/frag6/frag6_18.py +++ b/tests/sys/netinet6/frag6/frag6_18.py @@ -30,6 +30,8 @@ import argparse import random as random +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_19.py b/tests/sys/netinet6/frag6/frag6_19.py index 9248f5f40c43..f8613f757573 100644 --- a/tests/sys/netinet6/frag6/frag6_19.py +++ b/tests/sys/netinet6/frag6/frag6_19.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/frag6_20.py b/tests/sys/netinet6/frag6/frag6_20.py index 4e935a1f640a..6dd4c2379357 100755 --- a/tests/sys/netinet6/frag6/frag6_20.py +++ b/tests/sys/netinet6/frag6/frag6_20.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/frag6/sniffer.py b/tests/sys/netinet6/frag6/sniffer.py index 2c5f460488db..7e1d283dbf91 100644 --- a/tests/sys/netinet6/frag6/sniffer.py +++ b/tests/sys/netinet6/frag6/sniffer.py @@ -1,6 +1,8 @@ # $FreeBSD$ import threading +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp class Sniffer(threading.Thread): diff --git a/tests/sys/netinet6/mld.py b/tests/sys/netinet6/mld.py index b1fcf2f8e50a..1f43cee5d6ad 100644 --- a/tests/sys/netinet6/mld.py +++ b/tests/sys/netinet6/mld.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netinet6/redirect.py b/tests/sys/netinet6/redirect.py index 7066f8066518..4f785c615f62 100644 --- a/tests/sys/netinet6/redirect.py +++ b/tests/sys/netinet6/redirect.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sc import socket import sys diff --git a/tests/sys/netinet6/scapyi386.py b/tests/sys/netinet6/scapyi386.py index 745c01b45881..ac0c877380c4 100644 --- a/tests/sys/netinet6/scapyi386.py +++ b/tests/sys/netinet6/scapyi386.py @@ -29,6 +29,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netpfil/common/pft_ping.py b/tests/sys/netpfil/common/pft_ping.py index de673f026c77..9cc7c5d5c5c0 100644 --- a/tests/sys/netpfil/common/pft_ping.py +++ b/tests/sys/netpfil/common/pft_ping.py @@ -27,6 +27,8 @@ # import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import socket import sys diff --git a/tests/sys/netpfil/pf/CVE-2019-5597.py b/tests/sys/netpfil/pf/CVE-2019-5597.py index 1050af506f8d..1b25809cbedf 100644 --- a/tests/sys/netpfil/pf/CVE-2019-5597.py +++ b/tests/sys/netpfil/pf/CVE-2019-5597.py @@ -26,6 +26,8 @@ # SUCH DAMAGE. import random +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import sys diff --git a/tests/sys/netpfil/pf/CVE-2019-5598.py b/tests/sys/netpfil/pf/CVE-2019-5598.py index ac1e4f3438f5..603a1aef376f 100644 --- a/tests/sys/netpfil/pf/CVE-2019-5598.py +++ b/tests/sys/netpfil/pf/CVE-2019-5598.py @@ -26,6 +26,8 @@ # SUCH DAMAGE. import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) import scapy.all as sp import sys from sniffer import Sniffer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105181218.14ICIjSC051796>