diff options
author | Luca Dariz <luca@orpolo.org> | 2024-01-11 22:08:57 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-01-13 22:42:53 +0100 |
commit | e813641e2fef0fba5a2de9e5a44fd00ab95a86d0 (patch) | |
tree | c617b8841d38d7aa74f4fccd353b81bab83df11f /tests/configfrag.ac | |
parent | 7538b56278a95d87b9a4ddec01e5679376cc5b13 (diff) | |
download | gnumach-e813641e2fef0fba5a2de9e5a44fd00ab95a86d0.tar.gz gnumach-e813641e2fef0fba5a2de9e5a44fd00ab95a86d0.tar.bz2 gnumach-e813641e2fef0fba5a2de9e5a44fd00ab95a86d0.zip |
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>
Diffstat (limited to 'tests/configfrag.ac')
-rw-r--r-- | tests/configfrag.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/configfrag.ac b/tests/configfrag.ac index 55c6da62..de87cbad 100644 --- a/tests/configfrag.ac +++ b/tests/configfrag.ac @@ -22,6 +22,22 @@ dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. AC_CONFIG_FILES([tests/test-multiboot], [chmod +x tests/test-multiboot]) + +[if test x"$enable_user32" = xyes ; then + ac_miguser=$user32_cpu-gnu-mig +else + ac_miguser=$host_cpu-gnu-mig +fi] + +AC_CHECK_PROG([USER_MIG], [$ac_miguser], [$ac_miguser]) +AC_ARG_VAR([USER_MIG], [Path to the mig tool for user-space tests]) +AC_CHECK_PROG([USER_CC], [$CC], [$CC], [none]) +AC_ARG_VAR([USER_CC], [C compiler command for user-space tests]) +AC_CHECK_PROG([USER_CPP], [$CPP], [$CPP], [none]) +AC_ARG_VAR([USER_CPP], [C preprocessor for user-space tests]) +AC_ARG_VAR([USER_CFLAGS], [C compiler flags for user-space tests]) +AC_ARG_VAR([USER_CPPFLAGS], [C preprocessor flags for user-space tests]) + dnl Local Variables: dnl mode: autoconf dnl End: |