Commit Graph

13 Commits

Author SHA1 Message Date
Stefan Berger
0da1dcc8a3 tests: Derive support for CUSE from SWTPM_EXE help screen
Use 'swtpm --help | grep cuse' to determine whether CUSE interface
is supported and CUSE related tests need to run. Make sure that
SWTPM_EXE is available when test_cuse is sourced.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-08-26 20:00:14 -04:00
Stefan Berger
4ef45bc7f5 tests: Remove SWTPM variable and usage
SWTPM was set to 'swtpm' and only for uninstalled tests. Remove it and
replace its usage with 'swtpm' everywhere.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-08-26 20:00:14 -04:00
Stefan Berger
1fa820468f tests: Fix newly detected shellcheck issues SC2086 by quoting
Shellcheck v0.9 detected more SC2086 issues.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-06-26 20:50:01 -04:00
Stefan Berger
5704342aa8 tests: Fix shellcheck issue SC2181 by if cmd; ...
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-01-27 11:58:54 -05:00
Stefan Berger
fd7a812b24 tests: Fix code to pass shellcheck with some errors disabled
Fix the test cases to pass shellcheck with some of the errors
disable.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-01-13 13:59:02 -05:00
Stefan Berger
b255d07010 tests: Move swtpm_open_cmddev into swtpm_cmd_tx
Move swtpm_open_cmddev call into swtpm_cmd_tx since the latter function is
always called in a subshell that previously inherited the file descriptor
opened by the test cases. Remove swtpm_cmd_tx from nearly all test cases
and also remove closing of file descriptor 100 via 'exec 100>&-' from test
cases since this is not necessary anymore.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-08-09 17:10:37 -04:00
Stefan Berger
cce7503cbf tests: exit with error code if mktemp fails
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-11-02 08:35:49 -04:00
Stefan Berger
a3820b8634 tests: Extend tests cases with test for active seccomp profiles
Extend existing test cases to test for active seccomp profiles.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-03-18 15:43:44 -04:00
Stefan Berger
148010c0b6 tests: Shut down swtpm at the end to avoid kill
Shut down the swtpm process at the end to avoid it being killed
and with that getting noise in the test log.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-10-08 06:43:30 -04:00
Stefan Berger
100317d541 tests: Call function rather than running 'ps aux' to display proceses
Call a function display_processes_by_name that displays all processes
if needed. The function is quiet, though.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-09-27 10:19:09 -04:00
Stefan Berger
47c7ea7783 tests: Make the killing of processes less noisy
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-08-07 12:19:47 -04:00
Stefan Berger
313cf75c42 tests: Enable running tests in out-of-source builds
Pass the top_builddir and top_srcdir via TESTS_ENVIRONMENT
variable in Makefile.am.

Use TESTDIR for the path to the test directory and replace
previously used DIR in all occurences.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-08-07 12:19:47 -04:00
Stefan Berger
3008874c91 tests: Add test cases for TPM2
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-08-07 12:19:46 -04:00