Runs test suite using multiple cpus on SMP kernels.

TESTED: Passes all tests except 64b SMP currently.

---
 i386/configfrag.ac | 6 ++++++
 tests/user-qemu.mk | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/i386/configfrag.ac b/i386/configfrag.ac
index ec0a3009..4064680f 100644
--- a/i386/configfrag.ac
+++ b/i386/configfrag.ac
@@ -95,6 +95,12 @@ if [ x"$enable_lpr" = xyes ]; then]
 AC_ARG_ENABLE([apic],
   AS_HELP_STRING([--enable-apic], [LAPIC/IOAPIC support]))
 
+[if [ $mach_ncpus -gt 1 ]; then]
+  AM_CONDITIONAL([enable_smp], [true])
+[else]
+  AM_CONDITIONAL([enable_smp], [false])
+[fi]
+
 [if [ $mach_ncpus -gt 1 ]; then]
   # For SMP we need apic
   enable_apic=yes
diff --git a/tests/user-qemu.mk b/tests/user-qemu.mk
index 19faff73..11ff82d5 100644
--- a/tests/user-qemu.mk
+++ b/tests/user-qemu.mk
@@ -180,6 +180,9 @@ if HOST_x86_64
 QEMU_BIN = qemu-system-x86_64
 QEMU_OPTS += -cpu core2duo-v1
 endif
+if enable_smp
+QEMU_OPTS += -smp 2
+endif
 
 tests/test-%.iso: tests/module-% $(GNUMACH) 
$(srcdir)/tests/grub.cfg.single.template
        rm -rf $(builddir)/tests/isofiles-$*
-- 
2.51.0



Reply via email to