]> git.proxmox.com Git - swtpm.git/commit
tests: Add a test case for testing --runas and ability to access files
authorStefan Berger <stefanb@linux.ibm.com>
Sun, 26 Sep 2021 02:26:40 +0000 (22:26 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Tue, 28 Sep 2021 13:23:28 +0000 (09:23 -0400)
commit30510820fe8dab212e358ec8164e53874b4b865c
treece1e56d8f577245bca141fc0c66ea8358284d5eb
parent68ac6478b40b2dfd07f3f5d79e27cf6346404d5d
tests: Add a test case for testing --runas and ability to access files

Add a test case for testing the --runas parameter and the ability to access
existing files that have restrictive access permission so that only allow
the --runas user is able to access these files. This is to ensure that
swtpm can access these files properly when the handling of options and the
changing to the --runas user is moved around within swtpm.

Skip the test case if swtpm is linked with ASAN since then we get these
types of error messages that fail tests:

==== Starting swtpm with interfaces socket+socket ====
==3303263==LeakSanitizer has encountered a fatal error.
==3303263==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==3303263==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
tests/Makefile.am
tests/_test_tpm2_file_permissions [new file with mode: 0644]
tests/common
tests/test_tpm2_file_permissions [new file with mode: 0755]