From e813641e2fef0fba5a2de9e5a44fd00ab95a86d0 Mon Sep 17 00:00:00 2001 From: Luca Dariz Date: Thu, 11 Jan 2024 22:08:57 +0100 Subject: add basic user-space tests with qemu * configure.ac: move test fragment to have USER32 * tests/Makefrag.am: add user tests * tests/README: add basic info on how to run and debug user tests * tests/configfrag.ac: allow the test compiler/flags to be autoconfigured or customized * tests/grub.cfg.single.template: add minimal grub config to boot a module * tests/include/device/cons.h: add a simplified version of device/cons.h usable for tests * tests/include/kern/printf.h: symlink to kern/printf.h * tests/include/mach/mig_support.h: add basic version for user-space tests * tests/include/syscalls.h: add prototypes for syscalls used in tests. * tests/include/testlib.h: add definitions for common test functionalities * tests/include/util/atoi.h: symlink to util/atoi.h * tests/run-qemu.sh.template: add a simple qemu test runner * tests/start.S: add arch-specific entry point * tests/syscalls.S: generate syscalls entry points * tests/test-hello.c: add basic smoke test * tests/testlib.c: add the minimal functionality to run a user-space executable and reboot the system, and some test helpers. * tests/user-qemu.mk: add rules to build simple user-space test modules, including generating mig stubs. The tests reuse some kernel code (like printf(), mach_atoi(), mem*(), str*() functions) so we can use the freestanding environment and not depend on glibc. Message-ID: <20240111210907.419689-1-luca@orpolo.org> --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cadc33b6..69f75cf2 100644 --- a/configure.ac +++ b/configure.ac @@ -123,9 +123,6 @@ AC_CHECK_PROG([PATCH], [patch], [patch], [patch-not-found]) # configure fragments. # -# The test suite. -m4_include([tests/configfrag.ac]) - # Default set of device drivers. AC_ARG_ENABLE([device-drivers], AS_HELP_STRING([--enable-device-drivers=WHICH], [specify WHICH (on `ix86-at' @@ -181,6 +178,9 @@ m4_include([configfrag.ac]) # Linux code snarfed into GNU Mach. m4_include([linux/configfrag.ac]) + +# The test suite. +m4_include([tests/configfrag.ac]) # # Compiler features. -- cgit v1.2.3