aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2023-03-29 19:42:12 +0200
committerJake Hunsaker <jhunsake@redhat.com>2023-03-29 17:30:41 -0400
commit40014948aa826945a3a3ef7ee0fe67617511a073 (patch)
tree530f4233ff3f73e0e551a2ba8018179b66bb9b39 /tests
parent4acdd8cac2f1c7f3d927062a0cdb7ea5478863dc (diff)
downloadsos-40014948aa826945a3a3ef7ee0fe67617511a073.tar.gz
[tests] Skip /sys/class/net/bonding_* from netdevs
Avocado tests generate netdevs by listing /sys/class/net which can contain also bonding_masters that does not refer to any netdev. In such a case, the test case fails. Resolves: #3176 Closes: #3178 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/report_tests/plugin_tests/networking.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/report_tests/plugin_tests/networking.py b/tests/report_tests/plugin_tests/networking.py
index 4ae80a41..360d5552 100644
--- a/tests/report_tests/plugin_tests/networking.py
+++ b/tests/report_tests/plugin_tests/networking.py
@@ -33,6 +33,9 @@ class NetworkingPluginTest(StageOneReportTest):
def test_netdevs_properly_iterated(self):
for dev in os.listdir('/sys/class/net'):
- self.assertFileGlobInArchive(
- "sos_commands/networking/ethtool_*_%s" % dev
- )
+ # some file(s) in the dir might not be real netdevs, see e.g.
+ # https://lwn.net/Articles/142330/
+ if not dev.startswith('bonding_'):
+ self.assertFileGlobInArchive(
+ "sos_commands/networking/ethtool_*_%s" % dev
+ )