Commit Graph

16 Commits

Author SHA1 Message Date
Stefan Berger
5b51dc6a58 tests: Fix issues related to SC2164
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-01-13 21:02:51 -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
f1adde9f29 tests: test for availability of TPM 1.2 support in swtpm
Skip test cases for TPM 1.2 if TPM 1.2 support is not provided by swtpm.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
[ skip more tests ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-08-10 07:13:24 -04:00
Stefan Berger
8f0f381f95 scripting: Use #!/usr/bin/env bash rather than /bin/bash
On some systems /bin/bash does not exists but the bash is somewhere
else and can be invoked with /usr/bin/env bash.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-09-10 16:49:12 +00:00
Stefan Berger
01aa2ed3af tests: Run tests also on socket interfaces
Refactor the tests so that they all run on socket interfaces as well.

Use socket ports in the range of 65400-65499 for TPM 1.2 tests.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-07-11 14:04:40 -04:00
Stefan Berger
85bae89bb0 tests: source script relative to directory
'source' tests_cuse relative to the tests directory

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-04-15 22:16:00 -04:00
Stefan Berger
4372c7feb8 tests: Display logfile upon failure
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-01-13 10:35:20 -05:00
Stefan Berger
96038cdfec tests: move modprobe cuse into common file
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-12-13 21:23:12 -05:00
Stefan Berger
d7fc046934 tests: cleanup testcases
Cleanup the test cases:
- remove unnecessary sleeps
- check exit code of swtpm_ioctl

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-06-30 10:42:15 -04:00
Stefan Berger
05cd79b843 Support read()/write() for TPM state blob transfer
Support the read/write interface and POSIX API calls for transfer of
TPM state blobs.

Extend the swtpm_ioctl program to support this as well. Use the
environment variable SWTPM_IOCTL_BUFFERSIZE to set the size of the
buffer to use and enable the read/write interface in this (test)
program.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-06-04 18:49:25 -04:00
Stefan Berger
25fee77410 Extend test cases with large permanent state
For being able to test the transfer of larger state blobs, extend the existing
test case with creating a large NVRAM location that becomes part of the permanent
state.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-06-04 10:55:32 -04:00
Stefan Berger
b89c956e1f tests: remove saving of volatile state before saving blob
Remove the explicit saving of volatile state before saving the volatile
state blob to a file.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-05-28 12:55:30 -04:00
Stefan Berger
b902468900 swtpm: integrity protect the encrypt TPM state
Integrity protect the TPM state when it is written in entrypted form.
libtpms state (for TPM1.2) is also integrity protecting the blobs, but
we better determine the integrity of the decrypted data on the layer
above it.
2015-05-19 16:35:08 -04:00
Stefan Berger
1140f4c656 tests: bail out if modprobe cuse fails
Terminate the test case immediately if modprobe cuse fails.
2015-04-02 06:43:39 -04:00
Stefan Berger
950040f03c swtpm_cuse: implement STOP ioctl
Implement a STOP ioctl in the swtpm and swtpm_ioctl client.
Modify test cases to used swtpm_ioctl --stop.
2015-03-16 11:50:03 -04:00
Stefan Berger
198ebab3c1 Add new ioctls for getting and setting state blobs
Add new ioctls to get and set the 3 different types of state blobs
from and to the CUSE TPM. Add test cases for testing the new ioctl's
on a CUSE TPM that stores the state encrypted and on a CUSE TPM that
stores it non-encrypted.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2015-03-12 09:32:28 -04:00