On 15/10/2024 23.13, Michael Kowal wrote:
From: Glenn Miles <mil...@linux.ibm.com>

Added new test for pool interrupts.

Signed-off-by: Glenn Miles <mil...@linux.vnet.ibm.com>
Signed-off-by: Michael Kowal <ko...@linux.ibm.com>
---
  tests/qtest/pnv-xive2-test.c | 77 ++++++++++++++++++++++++++++++++++++
  1 file changed, 77 insertions(+)

diff --git a/tests/qtest/pnv-xive2-test.c b/tests/qtest/pnv-xive2-test.c
index a6008bc053..6e7e7f0d9b 100644
--- a/tests/qtest/pnv-xive2-test.c
+++ b/tests/qtest/pnv-xive2-test.c
@@ -4,6 +4,7 @@
   *  - Test 'Pull Thread Context to Odd Thread Reporting Line'
   *  - Test irq to hardware group
   *  - Test irq to hardware group going through backlog
+ *  - Test irq to pool thread
   *
   * Copyright (c) 2024, IBM Corporation.
   *
@@ -267,6 +268,79 @@ static void test_hw_irq(QTestState *qts)
      g_assert_cmphex(cppr, ==, 0xFF);
  }
+static void test_pool_irq(QTestState *qts)
+{
+    uint32_t irq = 2;
+    uint32_t irq_data = 0x600d0d06;
+    uint32_t end_index = 5;
+    uint32_t target_pir = 1;
+    uint32_t target_nvp = 0x100 + target_pir;
+    uint8_t priority = 5;
+    uint32_t reg32;
+    uint16_t reg16;
+    uint8_t pq, nsr, cppr, ipb;
+
+    printf("# ============================================================\n");
+    printf("# Testing irq %d to pool thread %d\n", irq, target_pir);

Please don't use direct printfs in the qtest framework. If you really have to log stuff, use g_test_message() instead.

 Thomas


Reply via email to