diff mbox series

[4/4] tests: Add more path based selection tests

Message ID 20200624043856.175528-5-amitay@ozlabs.org
State New
Headers show
Series Test improvements | expand

Commit Message

Amitay Isaacs June 24, 2020, 4:38 a.m. UTC
This tests path patterns using proc class.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 tests/test_selection2.sh | 98 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)
diff mbox series

Patch

diff --git a/tests/test_selection2.sh b/tests/test_selection2.sh
index d7f900f..0c93b0f 100755
--- a/tests/test_selection2.sh
+++ b/tests/test_selection2.sh
@@ -725,3 +725,101 @@  EOF
 
 do_skip
 test_run pdbg -b fake -P core@10040 probe
+
+
+test_result 0 <<EOF
+proc0: Fake Processor
+    fsi0: Fake FSI
+    pib0: Fake PIB
+        core0: Fake Core
+            thread0: Fake Thread (*)
+            thread1: Fake Thread (*)
+        core1: Fake Core
+            thread0: Fake Thread (*)
+            thread1: Fake Thread (*)
+        core2: Fake Core
+            thread0: Fake Thread (*)
+            thread1: Fake Thread (*)
+        core3: Fake Core
+            thread0: Fake Thread (*)
+            thread1: Fake Thread (*)
+EOF
+
+do_skip
+test_run pdbg -b fake -P proc0/thread probe
+
+
+test_result 0 <<EOF
+proc0: Fake Processor
+    fsi0: Fake FSI
+    pib0: Fake PIB
+        core2: Fake Core
+            thread0: Fake Thread (*)
+            thread1: Fake Thread (*)
+EOF
+
+do_skip
+test_run pdbg -b fake -P proc0/core2/thread probe
+
+
+test_result 0 <<EOF
+proc0: Fake Processor
+    fsi0: Fake FSI
+    pib0: Fake PIB
+        core2: Fake Core
+            thread1: Fake Thread (*)
+EOF
+
+do_skip
+test_run pdbg -b fake -P proc0/core2/thread1 probe
+
+
+test_result 0 <<EOF
+proc1: Fake Processor
+    fsi1: Fake FSI
+    pib1: Fake PIB
+        core0: Fake Core
+            thread0: Fake Thread (*)
+proc2: Fake Processor
+    fsi2: Fake FSI
+    pib2: Fake PIB
+        core0: Fake Core
+            thread0: Fake Thread (*)
+proc3: Fake Processor
+    fsi3: Fake FSI
+    pib3: Fake PIB
+        core0: Fake Core
+            thread0: Fake Thread (*)
+proc5: Fake Processor
+    fsi5: Fake FSI
+    pib5: Fake PIB
+        core0: Fake Core
+            thread0: Fake Thread (*)
+proc6: Fake Processor
+    fsi6: Fake FSI
+    pib6: Fake PIB
+        core0: Fake Core
+            thread0: Fake Thread (*)
+EOF
+
+do_skip
+test_run pdbg -b fake -P proc[1-3,5,5-6]/core0/thread0 probe
+
+
+test_result 0 <<EOF
+proc0: Fake Processor (*)
+EOF
+
+do_skip
+test_run pdbg -b fake -P proc0 probe
+
+
+test_result 0 <<EOF
+proc1: Fake Processor (*)
+proc2: Fake Processor (*)
+proc3: Fake Processor (*)
+proc4: Fake Processor (*)
+EOF
+
+do_skip
+test_run pdbg -b fake -P proc[1-4] probe