From 5cc67aacf01e8c010ec64a56930f854bcd5d7669 Mon Sep 17 00:00:00 2001 From: adrianvillin Date: Fri, 10 Nov 2023 09:59:59 +0100 Subject: tests: perfmon - Added a check if test is running with root privileges Type: test Change-Id: I1910f3ef79e9018aee032daca0f1932eccb7b9f9 Signed-off-by: adrianvillin --- test/asf/test_perfmon.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/asf') 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""" -- cgit 1.2.3-korg