[PATCH 1/1] irqbalance01: TCONF on missing interrupts

Petr Vorel <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
It looks like that at least on s390x VM there are no numeric interrupts
in /proc/interrupts:

                   CPU0       CPU1       CPU2       CPU3
        EXT:      12689      10088       8056       8624
        I/O:        117         27         74         31
        AIO:       1688        957       3464       1323
        CLK:       1645       1521       1355       1191   [EXT] Clock Comparator
        EXC:       1710       3175       1756       2935   [EXT] External Call
        EMS:       9248       5296       4892       4370   [EXT] Emergency Signal
        TMR:          0          0          0          0   [EXT] CPU Timer
        TAL:          0          0          0          0   [EXT] Timing Alert
        PFL:          0          0          0          0   [EXT] Pseudo Page Fault
        DSD:          0          0          0          0   [EXT] DASD Diag
        VRT:          0          0          0          0   [EXT] Virtio
        SCP:         86         96         53        128   [EXT] Service Call
        IUC:          0          0          0          0   [EXT] IUCV
        CMS:          0          0          0          0   [EXT] CPU-Measurement: Sampling
        CMC:          0          0          0          0   [EXT] CPU-Measurement: Counter
        FTP:          0          0          0          0   [EXT] HMC FTP Service
        CIO:          4          1          1          2   [I/O] Common I/O Layer Interrupt
        DAS:          0          0          0          0   [I/O] DASD
        C15:          0          0          0          0   [I/O] 3215
        C70:          0          0          0          0   [I/O] 3270
        TAP:          0          0          0          0   [I/O] Tape
        VMR:          0          0          0          0   [I/O] Unit Record Devices
        LCS:          0          0          0          0   [I/O] LCS
        CTC:          0          0          0          0   [I/O] CTC
        ADM:          0          0          0          0   [I/O] EADM Subchannel
        CSC:          0          0          0          0   [I/O] CHSC Subchannel
        VIR:        113         26         73         29   [I/O] Virtual I/O Devices
        QAI:          0          0          0          0   [AIO] QDIO Adapter Interrupt
        APB:          0          0          0          0   [AIO] AP Bus
        PCF:          0          0          0          0   [AIO] PCI Floating Interrupt
        PCD:          0          0          0          0   [AIO] PCI Directed Interrupt
        MSI:          0          0          0          0   [AIO] MSI Interrupt
        VAI:       1688        957       3464       1323   [AIO] Virtual I/O Devices AI
        GAL:          0          0          0          0   [AIO] GIB Alert
        NMI:          0          0          0          0   [NMI] Machine Check
        RST:          0          1          1          1   [CPU] CPU Restart

Therefore turn TBROK into TCONF. But deliberately keep CPUs check TBROK
(CPUs should be always available).

Also print /proc/interrupts on both errors (no CPUs and no IRQs).

Signed-off-by: Petr Vorel <[email protected]>
---
 testcases/kernel/irq/irqbalance01.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/irq/irqbalance01.c b/testcases/kernel/irq/irqbalance01.c
index 664fced1ec..9d15cdc600 100644
--- a/testcases/kernel/irq/irqbalance01.c
+++ b/testcases/kernel/irq/irqbalance01.c
@@ -41,6 +41,8 @@
 #include "tst_safe_stdio.h"
 #include "tst_safe_file_at.h"
 
+#define PRINT_PROC_INTERRUPTS() safe_print_file(__FILE__, __LINE__, "/proc/interrupts")
+
 enum affinity {
 	ALLOW = '+',
 	DENY = '-',
@@ -304,11 +306,15 @@ static void setup(void)
 	collect_irq_info();
 	print_irq_info();
 
-	if (nr_cpus < 1)
+	if (nr_cpus < 1) {
+		PRINT_PROC_INTERRUPTS();
 		tst_brk(TBROK, "No CPUs found in /proc/interrupts?");
+	}
 
-	if (nr_irqs < 1)
-		tst_brk(TBROK, "No IRQs found in /proc/interrupts?");
+	if (nr_irqs < 1) {
+		PRINT_PROC_INTERRUPTS();
+		tst_brk(TCONF, "No IRQs found in /proc/interrupts?");
+	}
 }
 
 static void run(void)
-- 
2.54.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.