Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142809090
D50661.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D50661.id.diff
View Options
diff --git a/tests/atf_python/utils.py b/tests/atf_python/utils.py
--- a/tests/atf_python/utils.py
+++ b/tests/atf_python/utils.py
@@ -46,6 +46,7 @@
NEED_ROOT: bool = False # True if the class needs root privileges for the setup
TARGET_USER = None # Set to the target user by the framework
REQUIRED_MODULES: List[str] = []
+ SKIP_MODULES: List[str] = []
def require_module(self, mod_name: str, skip=True):
error_code = libc.modfind(mod_name)
@@ -58,9 +59,18 @@
else:
raise ValueError(txt)
+ def skip_module(self, mod_name: str):
+ error_code = libc.modfind(mod_name)
+ if error_code == 0:
+ txt = "kernel module '{}' loaded, skip test".format(mod_name)
+ pytest.skip(txt)
+ return
+
def _check_modules(self):
for mod_name in self.REQUIRED_MODULES:
self.require_module(mod_name)
+ for mod_name in self.SKIP_MODULES:
+ self.skip_module(mod_name)
@property
def atf_vars(self) -> Dict[str, str]:
diff --git a/tests/sys/netpfil/pf/header.py b/tests/sys/netpfil/pf/header.py
--- a/tests/sys/netpfil/pf/header.py
+++ b/tests/sys/netpfil/pf/header.py
@@ -125,6 +125,7 @@
class TestHeader6(VnetTestTemplate):
REQUIRED_MODULES = [ "pf" ]
+ SKIP_MODULES = [ "ipfilter" ]
TOPOLOGY = {
"vnet1": {"ifaces": ["if1", "if2"]},
"vnet2": {"ifaces": ["if1", "if2"]},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 24, 8:01 PM (12 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27907517
Default Alt Text
D50661.id.diff (1 KB)
Attached To
Mode
D50661: pf tests: skip TestHeader6::test_too_many if ipfilter is loaded
Attached
Detach File
Event Timeline
Log In to Comment