Hi,
Il 29/12/23 14:37, Samuel Thibault ha scritto:
Hello,
Thanks, this looks good!
Luca Dariz, le jeu. 28 déc. 2023 20:42:49 +0100, a ecrit:
new file mode 100644
index 00000000..4cf25891
--- /dev/null
+++ b/tests/README
@@ -0,0 +1,37 @@
+
+There are some basic tests that can be run qith qemu. You can run all the
tests with
+
+ $ make check
+
+or selectively with:
+
+ $ make run-hello
+
+Also, you can debug the existing tests, or a new one, by starting on one shell
+
+ $ make debug-hello
+
+and on another shell you can attach with gdb, load the symbols of the
+bootstrap module and break on its _start():
+
+ $ gdb gnuamch
Typo ;)
What would be a better command? This is actually how I start gdb from
the build directory, then I have a .gdbinit that connects to qemu and
adds the userspace symbols if needed, sets breakpoints etc... Maybe I
can add a minimal .gdbinit and copy it in the build directory?
+++ b/tests/run-qemu.sh.template
+++ b/tests/test-hello.c
+++ b/tests/user-qemu.mk
These are non-trivial, and so definitely need a copyright header.
Right, I forgot to add it to all files... I'll resend the patch set
diff --git a/tests/syscalls.S b/tests/syscalls.S
new file mode 100644
index 00000000..df9c9bc0
--- /dev/null
+++ b/tests/syscalls.S
@@ -0,0 +1,4 @@
+
Spurious line?
I'll add the copyright header here also
+ #include <mach/syscall_sw.h>
+
+ kernel_trap(invalid_syscall,-31,0)