Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sim-immunant committed Sep 27, 2023
1 parent 3588719 commit 4aeebf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions rewriter/tests/mmap_loop/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Test(mmap_loop, main) {
// syscall tracing should forbid us to unmap compartment 2's buffer
// this requires the track-memory-map runtime which isn't enabled in tests
int res = munmap(lib_buf_mmap, 4096);
cr_log_info(res ?
"Was not able to unmap memory in another compartment (as expected)" :
"Able to unmap other compartment's memory (runtime not enabled)");
if (res < 0) {
perror("munmap");
cr_log_info("Was not able to unmap memory in another compartment (as expected)");
} else {
cr_log_info("Able to unmap other compartment's memory (runtime not enabled)");
}
}
4 changes: 2 additions & 2 deletions rewriter/tests/ro_sharing/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Test(ro_sharing, main) {
read_main_uint(&main_shared_ro, &main_secret_rw);
}

Test(ro_sharing, plugin, .exit_code = 255) {
Test(ro_sharing, plugin) {
cr_log_info("%s", get_plugin_str());
cr_log_info("0x%x", *get_plugin_uint(false));
cr_log_info("0x%x", *get_plugin_uint(true));
cr_log_info("0x%x", CHECK_VIOLATION(*get_plugin_uint(true)));
}
2 changes: 1 addition & 1 deletion rewriter/tests/ro_sharing/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ void read_main_uint(const uint32_t *shared, const uint32_t *secret) {

// Check that we can't read a pointer to data passed from main
// TODO can we change this LOG to cr_log_info?
CHECK_VIOLATION(LOG("0x%x", *secret));
cr_log_info("0x%x", CHECK_VIOLATION(*secret));
}

0 comments on commit 4aeebf2

Please sign in to comment.