Skip to content

Commit

Permalink
[LibOS] Test-cases for SPLRB (1)
Browse files Browse the repository at this point in the history
* Updated existing non-adverserial ones

Signed-off-by: g2flyer <[email protected]>
  • Loading branch information
g2flyer committed Jun 14, 2024
1 parent de147f9 commit bad1946
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
16 changes: 12 additions & 4 deletions libos/test/fs/manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ fs.mounts = [
{ path = "/usr/{{ arch_libdir }}", uri = "file:/usr/{{ arch_libdir }}" },
{ path = "/mounted", uri = "file:tmp" },

{ type = "encrypted", path = "/tmp/enc_input", uri = "file:tmp/enc_input" },
{ type = "encrypted", path = "/tmp/enc_output", uri = "file:tmp/enc_output" },
{ type = "encrypted", path = "/mounted/enc_input", uri = "file:tmp/enc_input" },
{ type = "encrypted", path = "/mounted/enc_output", uri = "file:tmp/enc_output" },
{% if entrypoint in [ "open_close", "seek_tell", "delete", "stat", "truncate", "copy_whole", "copy_seq", "copy_rev", "copy_sendfile", "copy_mmap_whole", "copy_mmap_seq", "copy_mmap_rev", "copy_mounted" ] %}
{# these tests get already-encrypted files as input, so do not work in strict mode until we perists volumes .. #}
{ type = "encrypted", protection_mode = "non-strict", path = "/tmp/enc_input", uri = "file:tmp/enc_input" },
{ type = "encrypted", protection_mode = "non-strict", path = "/tmp/enc_output", uri = "file:tmp/enc_output" },
{ type = "encrypted", protection_mode = "non-strict", path = "/mounted/enc_input", uri = "file:tmp/enc_input" },
{ type = "encrypted", protection_mode = "non-strict", path = "/mounted/enc_output", uri = "file:tmp/enc_output" },
{% else %}
{ type = "encrypted", protection_mode = "strict", path = "/tmp/enc_input", uri = "file:tmp/enc_input" },
{ type = "encrypted", protection_mode = "strict", path = "/tmp/enc_output", uri = "file:tmp/enc_output" },
{ type = "encrypted", protection_mode = "strict", path = "/mounted/enc_input", uri = "file:tmp/enc_input" },
{ type = "encrypted", protection_mode = "strict", path = "/mounted/enc_output", uri = "file:tmp/enc_output" },
{% endif %}
{ type = "tmpfs", path = "/mnt-tmpfs" },
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir(libc) }}" },
{ path = "/{{ entrypoint }}", uri = "file:{{ binary_dir }}/{{ entrypoint }}" },

{ type = "encrypted", path = "/tmp_enc/", uri = "file:tmp_enc/" },
{ type = "encrypted", protection_mode = "non-strict", path = "/tmp_enc/", uri = "file:tmp_enc/" },
{# this test work only in non-strict mode until we have full multi-process support for rollback protected files .. #}
]

fs.insecure__keys.default = "ffeeddccbbaa99887766554433221100"
Expand Down
7 changes: 6 additions & 1 deletion libos/test/regression/manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ fs.mounts = [
{ path = "/bin", uri = "file:/bin" },

{ type = "tmpfs", path = "/mnt/tmpfs" },
{ type = "encrypted", path = "/tmp_enc", uri = "file:tmp_enc", key_name = "my_custom_key" },
{% if entrypoint in [ "send_handle" ] %}
{# these tests work only in non-strict mode until we have full multi-process support for rollback protected files .. #}
{ type = "encrypted", protection_mode = "non-strict", path = "/tmp_enc", uri = "file:tmp_enc", key_name = "my_custom_key" },
{% else %}
{ type = "encrypted", protection_mode = "strict", path = "/tmp_enc", uri = "file:tmp_enc", key_name = "my_custom_key" },
{% endif %}
{ type = "encrypted", path = "/tmp_enc/mrenclaves", uri = "file:tmp_enc/mrenclaves", key_name = "_sgx_mrenclave" },
{ type = "encrypted", path = "/tmp_enc/mrsigners", uri = "file:tmp_enc/mrsigners", key_name = "_sgx_mrsigner" },
]
Expand Down

0 comments on commit bad1946

Please sign in to comment.