Skip to content

mock gramine's pseudo filesystem for tests? #1492

Answered by kailun-qin
nmwael asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @nmwael! Thanks for the questions.

So I want to test some parts of my application that relies on gramines pseudo filesystem, like the quote file or the key pair for opening encrypted files.

Does your parts of application to test rely on the exact behaviors of Gramine file systems (e.g., some Gramine-specific peculiarities/limitations)? If so, I think there is no simple way but to use the real Gramine FS.

However, if your targeting tests rely only on some (contents of) Gramine-SGX specific files (/dev/attestation/quote or /dev/attestation/keys/xxx as you mentioned), I think you can simply mock them (pls see below).

Currently my program are written in RUST

What about in your test mod…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nmwael
Comment options

Answer selected by nmwael
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants