aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrianvillin <avillin@cisco.com>2023-11-10 09:59:59 +0100
committeradrianvillin <avillin@cisco.com>2023-11-10 11:45:25 +0100
commit5cc67aacf01e8c010ec64a56930f854bcd5d7669 (patch)
tree0f42b2a7be34eff95860ae46bfb6c6cbaba38898
parent67f03ba71dd050c41c3b98896e9a2446c2e8c48c (diff)
tests: perfmon - Added a check if test is running with root privileges
Type: test Change-Id: I1910f3ef79e9018aee032daca0f1932eccb7b9f9 Signed-off-by: adrianvillin <avillin@cisco.com>
-rw-r--r--test/asf/test_perfmon.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/asf/test_perfmon.py b/test/asf/test_perfmon.py
index 448a6012c20..611746ff203 100644
--- a/test/asf/test_perfmon.py
+++ b/test/asf/test_perfmon.py
@@ -1,7 +1,13 @@
from asfframework import VppAsfTestCase, VppTestRunner
+from vpp_qemu_utils import can_create_namespaces
+from config import config
import unittest
+@unittest.skipIf(
+ not can_create_namespaces("perfmon_chk"), "Test is not running with root privileges"
+)
+@unittest.skipIf("perfmon" in config.excluded_plugins, "Exclude Perfmon plugin tests")
class TestPerfmon(VppAsfTestCase):
"""Simple perfmon test"""