tests/trace: Test trace vs system call interrupt
authorAnton Blanchard <anton@linux.ibm.com>
Mon, 8 Aug 2022 21:08:02 +0000 (07:08 +1000)
committerAnton Blanchard <anton@ozlabs.org>
Tue, 9 Aug 2022 02:58:48 +0000 (12:58 +1000)
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
tests/test_trace.bin
tests/test_trace.console_out
tests/trace/head.S
tests/trace/trace.c

index 61fa48b3e6e4a2553a30e0e14727533689f4fc7b..3c7c7bc962f6acf707f6b04ec268e4dd73c3453e 100755 (executable)
Binary files a/tests/test_trace.bin and b/tests/test_trace.bin differ
index 25e791c7845c3022d90eeeb6f4e465b8c29742f6..2fe36d2b68e2acc8541da12d21c1e29f46ba5465 100644 (file)
@@ -6,3 +6,4 @@ test 05:PASS
 test 06:PASS\r
 test 07:PASS\r
 test 08:PASS\r
+test 09:PASS\r
index 778baaaf62262607744380cce11514b4a5dade88..cd57e3a00e2064d61c1f0b6f12f1bd8c541d7c96 100644 (file)
@@ -219,3 +219,8 @@ test7:
 test8:
        lfd     %f0,0(%r3)
        blr
+
+       .global test9
+test9:
+       sc
+       blr
index a859f4e4b95e4ceef5f4961a9f94ca7f133c39c3..908d299639f7eef2b433497500ba379926fe6bc5 100644 (file)
@@ -205,6 +205,19 @@ int trace_test_8(void)
        return 0;
 }
 
+extern unsigned long test9(unsigned long, unsigned long);
+
+int trace_test_9(void)
+{
+       unsigned long ret;
+       unsigned long regs[2];
+
+       ret = callit(0, 0, test9, mfmsr() | MSR_SE, regs);
+       if (ret != 0xc00)
+               return ret + 1;
+       return 0;
+}
+
 int fail = 0;
 
 void do_test(int num, int (*test)(void))
@@ -235,6 +248,7 @@ int main(void)
        do_test(6, trace_test_6);
        do_test(7, trace_test_7);
        do_test(8, trace_test_8);
+       do_test(9, trace_test_9);
 
        return fail;
 }