diff --git a/BM/telemetry/telemetry_tests.sh b/BM/telemetry/telemetry_tests.sh index 2823532..5bb6f53 100755 --- a/BM/telemetry/telemetry_tests.sh +++ b/BM/telemetry/telemetry_tests.sh @@ -62,25 +62,20 @@ pci_test() { do_cmd "lspci -knnv | grep -c intel_vsec" } -pre_unload_driver() { - rmmod intel_pmc_core - rmmod intel_rapl_tpmi - rmmod isst_tpmi - rmmod isst_tpmi_core - rmmod intel_uncore_frequency_tpmi - rmmod intel_vsec_tpmi +unload_module() { + # $1 is the driver module name + local module_name=$1 + is_kmodule_builtin "$module_name" && skip_test + load_unload_module.sh -c -d "$module_name" && + do_cmd "load_unload_module.sh -u -d $module_name" } -driver_test() { - module=$1 - pre_unload_driver - load_unload_module.sh -c -d "$module" && - do_cmd "load_unload_module.sh -u -d $module" - do_cmd "load_unload_module.sh -l -d $module" - sleep 5 - pre_unload_driver - do_cmd "load_unload_module.sh -u -d $module" - do_cmd "load_unload_module.sh -l -d $module" +load_module() { + # $1 is the driver module name + local module_name=$1 + is_kmodule_builtin "$module_name" && skip_test + do_cmd "load_unload_module.sh -l -d $module_name" && + load_unload_module.sh -c -d "$module_name" } dmesg_check() { @@ -107,10 +102,10 @@ telemetry_test() { pci_test ;; telem_driver) - driver_test "pmt_telemetry" - ;; - pci_driver) - driver_test "intel_vsec" + unload_module pmt_telemetry + unload_module pmt_class + load_module pmt_class + load_module pmt_telemetry ;; esac dmesg_check diff --git a/BM/telemetry/tests b/BM/telemetry/tests index 87581d9..944413b 100644 --- a/BM/telemetry/tests +++ b/BM/telemetry/tests @@ -1,6 +1,5 @@ # This file collects the telemetry cases telemetry_tests.sh -t pci -telemetry_tests.sh -t pci_driver telemetry_tests.sh -t telem_driver telemetry_tests.sh -t telem_sysfs telemetry_tests.sh -t telem_dev diff --git a/scenario/emr-oe/tests-telemetry b/scenario/emr-oe/tests-telemetry deleted file mode 100644 index fdc65e0..0000000 --- a/scenario/emr-oe/tests-telemetry +++ /dev/null @@ -1,7 +0,0 @@ -# This file collects the telemetry cases -telemetry_tests.sh -t pci -telemetry_tests.sh -t pci_driver -telemetry_tests.sh -t telem_driver -telemetry_tests.sh -t telem_sysfs -telemetry_tests.sh -t telem_dev -telemetry_tests.sh -t telem_sysfs_common diff --git a/scenario/emr-oe/tests-telemetry b/scenario/emr-oe/tests-telemetry new file mode 120000 index 0000000..7bdfb3c --- /dev/null +++ b/scenario/emr-oe/tests-telemetry @@ -0,0 +1 @@ +../../BM/telemetry/tests \ No newline at end of file diff --git a/scenario/spr-oe/tests-telemetry b/scenario/spr-oe/tests-telemetry deleted file mode 100644 index fdc65e0..0000000 --- a/scenario/spr-oe/tests-telemetry +++ /dev/null @@ -1,7 +0,0 @@ -# This file collects the telemetry cases -telemetry_tests.sh -t pci -telemetry_tests.sh -t pci_driver -telemetry_tests.sh -t telem_driver -telemetry_tests.sh -t telem_sysfs -telemetry_tests.sh -t telem_dev -telemetry_tests.sh -t telem_sysfs_common diff --git a/scenario/spr-oe/tests-telemetry b/scenario/spr-oe/tests-telemetry new file mode 120000 index 0000000..7bdfb3c --- /dev/null +++ b/scenario/spr-oe/tests-telemetry @@ -0,0 +1 @@ +../../BM/telemetry/tests \ No newline at end of file diff --git a/scenario/srf-oe/tests-telemetry b/scenario/srf-oe/tests-telemetry deleted file mode 100644 index fdc65e0..0000000 --- a/scenario/srf-oe/tests-telemetry +++ /dev/null @@ -1,7 +0,0 @@ -# This file collects the telemetry cases -telemetry_tests.sh -t pci -telemetry_tests.sh -t pci_driver -telemetry_tests.sh -t telem_driver -telemetry_tests.sh -t telem_sysfs -telemetry_tests.sh -t telem_dev -telemetry_tests.sh -t telem_sysfs_common diff --git a/scenario/srf-oe/tests-telemetry b/scenario/srf-oe/tests-telemetry new file mode 120000 index 0000000..7bdfb3c --- /dev/null +++ b/scenario/srf-oe/tests-telemetry @@ -0,0 +1 @@ +../../BM/telemetry/tests \ No newline at end of file