Skip to content

Commit

Permalink
tests: conditionalize candperms ~gl
Browse files Browse the repository at this point in the history
Sonata ISA versions do support this so disable the test and show a message instead.
  • Loading branch information
nwf authored and rmn30 committed Jan 21, 2025
1 parent 0a58f8f commit a9108d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sdk/boards/sonata-0.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"SUNBURST_SHADOW_SIZE=0x4000",
"DEFAULT_UART_BAUD_RATE=115200",
"ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM=1",
"ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM=1"
"ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM=1",
"CHERIOT_NO_SAIL_83"
],
"driver_includes" : [
"../include/platform/sunburst/v0.2",
Expand Down
3 changes: 2 additions & 1 deletion sdk/boards/sonata-prerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
"SUNBURST_SHADOW_BASE=0x30000000",
"SUNBURST_SHADOW_SIZE=0x800",
"ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM=1",
"ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM=1"
"ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM=1",
"CHERIOT_NO_SAIL_83"
],
"cxflags": "-mllvm -enable-machine-outliner=never",
"driver_includes" : [
Expand Down
4 changes: 4 additions & 0 deletions tests/misc-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ void check_sealed_scoping()
o.permissions().without(Permission::Global),
"Loading global sealed cap through non-LoadGlobal bad perms");

#ifndef CHERIOT_NO_SAIL_83
/*
* Use CAndPerm to shed Global from our o cap.
* Spell this a little oddly to make sure we get CAndPerm with a mask of
Expand All @@ -278,6 +279,9 @@ void check_sealed_scoping()
oLocal2.without_permissions(Permission::Global);

TEST_EQUAL(oLocal2, OLocal1, "CAndPerm ~GL gone wrong");
#else
debug_log("Skipping test for cheriot-sail#83 because the ISA version is too old.");
#endif
}

int test_misc()
Expand Down

0 comments on commit a9108d4

Please sign in to comment.