Skip to content

Commit

Permalink
Fix CI not failing
Browse files Browse the repository at this point in the history
Unfortunately, when we moved calling the underlying CHERI instance via
`script` (in #93), we omitted to ensure that the return code for the
underlying tests was properly returned to the testing script it's being
called from. This means we had some underlying silent failures in our
CI. We attempt to fix them here, and to ensure future CI checks fail
appropriately.
  • Loading branch information
0152la committed Apr 10, 2024
1 parent 8772cc0 commit 711c84a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .buildbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ args=(
)
export BUILDBOT_PLATFORM=riscv64-purecap
args=${args[@]}
script -O /dev/null -c "python3 tests/run_cheri_examples.py $args"
script -O /dev/null -ec "python3 tests/run_cheri_examples.py $args"

echo "Running tests for 'morello-hybrid' using QEMU..."
args=(
Expand All @@ -66,7 +66,7 @@ args=(
)
export BUILDBOT_PLATFORM=morello-hybrid
args=${args[@]}
script -O /dev/null -c "python3 tests/run_cheri_examples.py $args"
script -O /dev/null -ec "python3 tests/run_cheri_examples.py $args"

echo "Running tests for 'morello-purecap' using QEMU..."
args=(
Expand All @@ -82,4 +82,4 @@ args=(
)
export BUILDBOT_PLATFORM=morello-purecap
args=${args[@]}
script -O /dev/null -c "python3 tests/run_cheri_examples.py $args"
script -O /dev/null -ec "python3 tests/run_cheri_examples.py $args"
5 changes: 3 additions & 2 deletions cap_build.c → hybrid/cap_build.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
// from the first argument --- which differentiates `cheri_address_set` and
// `cheri_cap_build`.

#include "cheriintrin.h"
#include "include/common.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "../include/common.h"
#include "cheriintrin.h"

int main()
{
// This example relies on morello-specific symbols, so we won't run
Expand Down
6 changes: 3 additions & 3 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ elif [ "$1" = "morello-hybrid" ]; then
run to_fail hybrid/compartment_examples/inter_comp_call/malicious_compartments inter_comp_call-secure-redirect_clr
run to_fail hybrid/compartment_examples/inter_comp_call/malicious_compartments inter_comp_call-secure-update_ddc
# Tests that should pass
run OK . cap_build
run OK compare_platforms compare_platforms_overflow
run OK hybrid/ddc_compartment_switching ddc_compartment_switching
run OK example_allocators/compartment_alloc main
run OK hybrid basic_ddc
run OK hybrid cap_build
run OK hybrid/compartment_examples/inter_comp_call/base main
run OK hybrid/compartment_examples/inter_comp_call/malicious_compartments inter_comp_call-secure
run OK hybrid/ddc_compartment_switching ddc_compartment_switching
run OK syscall-restrict syscall-restrict
run OK example_allocators/compartment_alloc main
else
echo "$1 not recognised."
exit 1
Expand Down

0 comments on commit 711c84a

Please sign in to comment.