Commit Graph

722 Commits

Author SHA1 Message Date
Indan Zupancic b79839e652 Add FPU tests for seL4_TCB_SetFlags
Signed-off-by: Indan Zupancic <indan@nul.nu>
2025-07-24 19:54:49 +10:00
June Andronick 8db2668335 change link to Resources to setup page
Signed-off-by: June Andronick <june.andronick@proofcraft.systems>
2025-07-15 17:18:54 +10:00
Indan Zupancic 1957e33a1a Fix style error
Signed-off-by: Indan Zupancic <indan@nul.nu>
2025-06-01 10:55:23 +01:00
julia 52c93e367c use LibPlatSupportHaveTimer for sel4test HaveTimer
In libplatsupport, we know which platforms do not support an ltimer
implementation, so rather than duplicating them, we can re-use the
cmake config variable here.

However, this needs to be moved after util_libs_import_libraries()
for the config to appear, but before config_option for it to be
generated in the gen_config.h file.

I have tested this with:

- maaxboard (supports timer, tests enabled)
- zynqmp (supports timer, tests disabled)
- cheshire (no timer support, tests disabled)

Signed-off-by: julia <git.ts@trainwit.ch>
2025-06-01 10:55:23 +01:00
Ivan-Velickovic dc92ceda5a Bump minimum CMake version
See commit 6f2fe4626d827eb58e2fd954c2c16cefcb67fa61 of seL4
for motivation.

Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
2025-05-21 11:06:07 +01:00
Indan Zupancic cb4d3a2f62 CACHEFLUSH: More resilient cache invalidate tests
Signed-off-by: Indan Zupancic <indan@nul.nu>
2025-04-27 10:58:56 +10:00
julia 5e120894cb vspace: use ASIDPoolBits for the ASIDPool untypes
This was working because ASIDPoolBits == PageBits on all existing
platforms, but this might not always be the case.

Signed-off-by: julia <git.ts@trainwit.ch>
2025-04-04 15:05:26 +11:00
julia 8dd7ac4301 vspace004: allocate a cap for the final pool
This *coincidentally* fails with ret == seL4_RevokeFirst(9) if the
number of pools to allocate before failing is less than the actual
amount, because we don't allocate a capability for the last pool.

In essence, that could be happening even if we had the correct number
of pools, but doesn't because of how the kernel (presumably) checks
that the cap is free after checking the ASID pools are free.

Signed-off-by: julia <git.ts@trainwit.ch>
2025-04-02 17:55:00 +11:00
Gerwin Klein ad97ba5848 github: use central CI workflows
Use GitHub workflow_call feature to reduce workflow duplication.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-03-17 11:33:07 +11:00
Indan Zupancic a52904a652 Fix style errors
Sneaked in when style checking was temporarily broken.

Signed-off-by: Indan Zupancic <indan@nul.nu>
2025-03-06 11:01:10 +00:00
Indan Zupancic 1b077ab9e5 SCHED_CONTEXT_0014: Use sel4utils thread directly
start_helper would do unnecessary complicated thread startup code
which may contain FPU instructions with some compilers and configs.

Normally this would be harmless (though it would thwart the test's
intention), but if the task runs out of budget before it finishes
the FPU instruction, it will be put on the release queue and make
no forward progress (unclear why).

This is only a problem for tasks with budget equal to MIN_BUDGET,
any time lost because of syscalls or traps will cause the task to
hang.

Signed-off-by: Indan Zupancic <indan@nul.nu>
2025-03-06 11:01:10 +00:00
Indan Zupancic 45985bd4af Replace volatiles with atomic for SMP tests
Signed-off-by: Indan Zupancic <indan@nul.nu>
2025-03-06 11:01:10 +00:00
Kent McLeod 73ed59a576 arm,cmake: Set compiler expected tls settings
Add the right TLS variable settings for the gnu-elf-abi used by our
compilers.

Signed-off-by: Kent McLeod <kent@kry10.com>
2025-02-28 15:36:30 +11:00
Matt Rossouw 3583555b7d
Added flags for Cheshire platform (#129)
Cheshire - no timer and 1GiB of RAM so timer and huge page tests must be
disabled.

Signed-off-by: Matt Rossouw <matthew.rossouw@unsw.edu.au>
2025-02-04 16:20:46 +11:00
Gerwin Klein e879d7de65 README: fix markdown lints
Headings and lists should be surrounded by empty lines.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-01-31 12:57:07 +00:00
Gerwin Klein 4ba9582049 README: fix GettingStarted link for docsite update
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-01-31 12:57:07 +00:00
Indan Zupancic d89ce01bad Improve periodic_thread counter check
Pass meaningful values as argument so the check adds value.

Signed-off-by: Indan Zupancic <indan@nul.nu>
2024-11-26 23:45:33 +00:00
Indan Zupancic 55d99161e0 Speed-up Tests
Reduce unnecessary sleeping or long SC periods, without
reducing the quality of the tests.

Optimise test_fault() and test_ipc_pair() by taking init code
out of the inner loop and re-using the created processes.

These changes more than halve the time needed to run all tests.

Signed-off-by: Indan Zupancic <indan@nul.nu>
2024-11-26 23:45:33 +00:00
Gerwin Klein fe4839eb4a scheduler: resume does preempt
If we're seeing failures on this test, they need to be investigated. The
resume invocation is definitely supposed to call the scheduler and leave
with the highest priority thread running.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-07-12 16:42:50 +10:00
Gerwin Klein 17cac544cd ipc: explicitly disable IPC0028 until fixed
This test has not been enabled since d07b2383b in 2017 and likely has
been broken for quite some time.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-06-17 20:20:53 +10:00
Gerwin Klein e1d35e63bb use config_set only for boolean config values
config_set is true for 1 and false for all other values, so it does
not make sense to use with CONFIG_MAX_NUM_NODES.

The two instances where this happened look like they are trying to
guard CONFIG_MAX_NUM_NODES > 1 by checking whether CONFIG_MAX_NUM_NODES
has any value at all, but doing so incorrectly. CONFIG_MAX_NUM_NODES
has a default value of 1 and should always be set to a number, so we
can just drop the guard. If this assumption about always having a
numbers value is wrong, the code will not compile, which is acceptable.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-06-17 20:20:53 +10:00
Axel Heider 2587dda3ec remove explicit newline in ZF_LOGx()
The functions already prints a newline at the end.

Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-06-17 15:32:09 +10:00
Axel Heider 9c58e4cadb SCHED0003: log debug information
Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-06-17 15:32:09 +10:00
Ivan Velickovic 8a08306b62 settings: Disable timer tests for RocketChip
Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
2024-06-16 20:19:20 +10:00
Axel Heider 1df49ec846 trivial: fix comment
Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-05-29 13:55:19 +10:00
Axel Heider 95522e9c2b TIMER0001: remove unused variable
Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-05-21 17:46:00 +01:00
Axel Heider e0cb8031d5 CI: cancel older concurrent PR runs
Remove the space in the workflow name to ensure there are no side
effects when using it as an identifier.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-04-10 09:49:01 +10:00
Axel Heider b416516310 CI: the seL4/machine_queue repo is public now
Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-04-04 09:11:02 +02:00
Axel Heider a8f83c5b13 cmake: remove trailing slash
Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-04-01 09:40:29 +01:00
Axel Heider 8a8ccec3c8 cmake: don't overwrite NANOPB_SRC_ROOT_FOLDER
Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-04-01 09:40:29 +01:00
Ivan Velickovic 9ff09115ff Add ARM vCPU inject IRQ test
This patch aims to test the scenario where we inject an IRQ
on a vCPU that does not have a TCB associated with it.

Currently this results in the kernel crashing inside
invokeVCPUInjectIRQ. This test aims to confirm that the
eventual fix to the kernel is correct.

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
2024-02-21 12:08:07 +11:00
Kent McLeod eb1b944338 SMC0001: Remove test of clobbered registers
ATF implementations don't clobber x2 and x3 registers in response to
ARM_STD_SVC_VERSION calls.

Signed-off-by: Kent McLeod <kent@kry10.com>
2024-02-21 09:03:03 +11:00
Kent McLeod f1fa98c10e aarch64,smc: Add tests for SMC cap behaviors
SMC caps are a new cap type for performing SMC calls on aarch64. These
tests check that CNode operations behave as expected when manipulating
capabilities of this type.

Signed-off-by: Kent McLeod <kent@kry10.com>
2024-02-19 21:30:03 +00:00
Gerwin Klein dae2ff3097 github: bump actions to node20
GitHub has started issuing warnings for node16 actions.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-02-08 10:38:02 +11:00
Alwin Joshy 0a488b92bc hw debug API: aarch64 sw break, single step tests
Ported software breakpoint test to aarch64 and moved single
stepping test from x86-only to arch-independent.

Signed-off-by: Alwin Joshy <joshyalwin@gmail.com>
2024-01-23 10:56:30 +00:00
Axel Heider b383b19b45 CI: simulation and HW build with LLVM on RISCV
Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-01-12 09:23:30 +11:00
Axel Heider ab9189188f fix description, the time slice is 100 ms
Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-11-10 12:55:13 +00:00
Axel Heider ed4fb5ae10 fix typo in comment
Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-11-10 12:55:13 +00:00
Gerwin Klein e7d9607a0b SCHED0021: decrease chances of a race condition
Decrease the chance that the monitor thread is preempted just when it
has released the preemption threads, but before it has yielded itself.
(If that happens, the preemption threads get two time slices.)

See also #42

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-10-27 11:13:29 +01:00
Robbie VanVossen 99a462e595 Add tests for SMC Capability
Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com>
2023-08-30 20:08:48 +10:00
Robbie VanVossen a4ef8fc880
settings: Disable timer tests for RocketChipZCU102 (#102)
Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com>
2023-08-29 08:56:09 +01:00
Hesham Almatary a188dbbf55 Fix: NULL-terminate existing_frames[] array
libsel4utils/reserve_initial_task_regions iterates over existing_frames
and expects it to be null-terminated. Without this commit, the behaviour
will rely on whatever the stack had before allocating existing_frames[]
in the stack, and subsequent calls may fail, hang, or reserve incorrect
frames; depending on the stack values.

Sponsored by: DARPA.

Signed-off-by: Hesham Almatary <hesham.almatary@cl.cam.ac.uk>
2023-08-11 16:05:57 +10:00
Kent McLeod a4c7f87e33 aarch64: Minimal update for vspace API change
The aarch64 vspace API is changed to only have a single pagetable object
and capability type for all intermediate page table levels. The root
vspace object is still a separate object and capability type.

Signed-off-by: Kent McLeod <kent@kry10.com>
2023-08-10 08:19:50 +10:00
Gerwin Klein b7bce1f50d SCHED0014: fix misleading comment
The budgets in test SCHED0014 are the same, the periods are different
(in relation 1/2/8), and we're checking that the kernel achieves that
period relation in scheduling.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-19 10:59:57 +10:00
Kent McLeod c9d077c9ee aarch64: Use 32-bit sized register names
The fault assembly code manipulates an integer sized argument and so
32-bit register names need to be used in order to avoid compiler
warnings.

Signed-off-by: Kent McLeod <kent@kry10.com>
2023-05-09 17:29:48 +10:00
Gerwin Klein e6f4f520b3
github: enable hw-test and hw-build on PRs (#90)
This is a copy of the same pull request action from seL4/seL4.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-03-10 14:54:57 +11:00
Gerwin Klein 944f3d0010 domain_schedule: pick more useful defaults
The previous schedule lead to 15/16th idle time and had extremely short
(1 tick) domain slices which means a lot of the test time was spent
idle or domain switching instead of running code.

This setup give domain 0 a long-ish slice to make some progress, adds
some variety to the schedule and sets 2 as the shortest period.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-20 13:48:46 +11:00
Gerwin Klein 1a2185106f settings: use reduce DOMAINS default from 16 to 4
Most of the tests run in domain 0 with all other domains idle. To not
increase the runtime too much, we test with fewer domains by default if
DOMAINS is set.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-01-20 13:48:46 +11:00
Axel Heider 91d8da887b disable timer test for Quartz64
There is no ltimer implementation available

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-16 08:38:41 +11:00
Axel Heider c02181c025 Set SIMULATION for QEMU RISC-V virt by default
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-13 11:52:33 +11:00