@@ -390,6 +390,59 @@ def qemu_kasan(args, suite=None):
390
390
return suite
391
391
392
392
393
+ def qemu_selftests (args ):
394
+ suite = TestSuite ('qemu-selftests' )
395
+ k = suite .add_kernel
396
+ b = suite .add_qemu_boot
397
+
398
+ image = 'fedora'
399
+
400
+ for arch in ['ppc64' , 'ppc64le' ]:
401
+ k (f'{ arch } _guest_defconfig' , image , merge_config = guest_configs )
402
+ selftests = suite .
add_selftest (
'[email protected] ' ,
arch )
403
+
404
+ exclude = []
405
+ # Not clear what causes failure
406
+ exclude .append ('powerpc/pmu/ebb:instruction_count_test' )
407
+ exclude .append ('powerpc/pmu/ebb:fork_cleanup_test' )
408
+ # Confused by qemu
409
+ exclude .append ('powerpc/security:rfi_flush' )
410
+ exclude .append ('powerpc/security:entry_flush' )
411
+ exclude .append ('powerpc/security:uaccess_flush' )
412
+ exclude .append ('powerpc/security:spectre_v2' )
413
+ # Slow and not that useful for bug finding
414
+ exclude .append ('powerpc/benchmarks:context_switch' )
415
+ exclude .append ('powerpc/benchmarks:fork' )
416
+ exclude .append ('powerpc/benchmarks:futex_bench' )
417
+ exclude .append ('powerpc/benchmarks:mmap_bench' )
418
+ # Tends to timeout
419
+ exclude .append ('powerpc/signal:sigfuz' )
420
+ # Requires certain hardware
421
+ exclude .append ('powerpc/eeh:eeh-basic.sh' )
422
+
423
+ if arch == 'ppc64le' :
424
+ tests = [QemuSelftestsConfig (selftests , 'powerpc.*' , exclude = exclude )]
425
+ name = 'qemu-pseries+p9+kvm+fedora41'
426
+ b (name , f'{ arch } _guest_defconfig' , image , tests = tests )
427
+ else :
428
+ # 64-bit tests don't work due to missing libraries
429
+ exclude .append ('powerpc/stringloops:.*' )
430
+ exclude .append ('powerpc/copyloops:.*' )
431
+ exclude .append ('powerpc/tm:.*' )
432
+ exclude .append ('powerpc/pmu.*' )
433
+ exclude .append ('powerpc/mm:.*' )
434
+ exclude .append ('powerpc/math:.*' )
435
+ exclude .append ('powerpc/ptrace:.*' )
436
+ exclude .append ('powerpc/papr_sysparm:papr_sysparm' )
437
+ exclude .append ('powerpc/switch_endian:switch_endian_test' )
438
+ exclude .append ('powerpc/vphn:test-vphn' )
439
+ tests = [QemuSelftestsConfig (selftests , 'powerpc.*' , exclude = exclude )]
440
+ name = 'qemu-pseries+p9+kvm+be+debian'
441
+ b (name , f'{ arch } _guest_defconfig' , image , tests = tests )
442
+
443
+ return suite
444
+
445
+
393
446
def std_boot (args , hostname , defconfig , merge_configs , suite = None ):
394
447
images = args .images
395
448
if not images :
0 commit comments