#
d9280ea3 |
| 16-Oct-2024 |
Stefan Berger <stefanb@linux.ibm.com> |
tests: Wait for migration completion on destination QEMU to avoid failures
Rather than waiting for the completion of migration on the source side, wait for it on the destination QEMU side to avoid a
tests: Wait for migration completion on destination QEMU to avoid failures
Rather than waiting for the completion of migration on the source side, wait for it on the destination QEMU side to avoid accessing the TPM TIS memory mapped registers before QEMU could restore their state. This error condition could be triggered on busy systems where the destination QEMU did not have enough time to restore the TIS state while the test case was already reading its registers. The test case was for example reading the STS register and received an unexpected value (0xffffffff), which lead to a segmentation fault later on due to trying to read 0xffff bytes from the TIS into a buffer.
Cc: <qemu-stable@nongnu.org> Reported-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
show more ...
|
#
96420a30 |
| 14-Jul-2023 |
Michael Tokarev <mjt@tls.msk.ru> |
tests/: spelling fixes
with some rewording in tests/qemu-iotests/298 tests/qtest/fuzz/generic_fuzz.c tests/unit/test-throttle.c as suggested by Eric.
Signed-off-by: Michael Tokarev <mjt@tls.msk.
tests/: spelling fixes
with some rewording in tests/qemu-iotests/298 tests/qtest/fuzz/generic_fuzz.c tests/unit/test-throttle.c as suggested by Eric.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
d2304612 |
| 25-May-2021 |
Peter Maydell <peter.maydell@linaro.org> |
tests/qtest/tpm-tests: Remove unnecessary NULL checks
Coverity points out that in tpm_test_swtpm_migration_test() we assume that src_tpm_addr and dst_tpm_addr are non-NULL (we pass them to tpm_util_
tests/qtest/tpm-tests: Remove unnecessary NULL checks
Coverity points out that in tpm_test_swtpm_migration_test() we assume that src_tpm_addr and dst_tpm_addr are non-NULL (we pass them to tpm_util_migration_start_qemu() which will unconditionally dereference them) but then later explicitly check them for NULL. Remove the pointless checks.
Fixes: Coverity CID 1432367, 1432359
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-id: 20210525134458.6675-6-peter.maydell@linaro.org
show more ...
|
#
dccaea25 |
| 05-Nov-2020 |
AlexChen <alex.chen@huawei.com> |
tests/qtest/tpm: Remove redundant check in the tpm_test_swtpm_test()
The 'addr' would not be NULL after checking 'succ' is valid, and it has been dereferenced in the previous code(args = g_strdup_pr
tests/qtest/tpm: Remove redundant check in the tpm_test_swtpm_test()
The 'addr' would not be NULL after checking 'succ' is valid, and it has been dereferenced in the previous code(args = g_strdup_printf()). So the check on 'addr' in the tpm_test_swtpm_test() is redundant. Remove it.
Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Alex Chen <alex.chen@huawei.com> Message-Id: <5FA41448.4040404@huawei.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
ed943cc9 |
| 02-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
tests/qtest/tpm: Declare input buffers const and static
The functions using these arrays expect a "const unsigned char *" argument, it is safe to declare these as 'static const'.
Signed-off-by: Phi
tests/qtest/tpm: Declare input buffers const and static
The functions using these arrays expect a "const unsigned char *" argument, it is safe to declare these as 'static const'.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200902080909.161034-1-philmd@redhat.com> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
551cabdf |
| 05-Mar-2020 |
Eric Auger <eric.auger@redhat.com> |
test: tpm: pass optional machine options to swtpm test functions
We plan to use swtpm test functions on ARM for testing the sysbus TPM-TIS device. However on ARM there is no default machine type. So
test: tpm: pass optional machine options to swtpm test functions
We plan to use swtpm test functions on ARM for testing the sysbus TPM-TIS device. However on ARM there is no default machine type. So we need to explictly pass some machine options on startup. Let's allow this by adding a new parameter to both swtpm test functions and update all call sites.
Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-id: 20200305165149.618-9-eric.auger@redhat.com Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
show more ...
|
#
1e8a1fae |
| 09-Sep-2019 |
Thomas Huth <thuth@redhat.com> |
test: Move qtests to a separate directory
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests
test: Move qtests to a separate directory
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests to a separate folder for more clarity.
Message-Id: <20191218103059.11729-6-thuth@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
dd210749 |
| 03-Sep-2019 |
Thomas Huth <thuth@redhat.com> |
tests/libqtest: Use libqtest-single.h in tests that require global_qtest
Tests that require global_qtest or the related wrapper functions now use the libqtest-single.h header that is dedicated for e
tests/libqtest: Use libqtest-single.h in tests that require global_qtest
Tests that require global_qtest or the related wrapper functions now use the libqtest-single.h header that is dedicated for everything related to global_qtest. The core libqtest.c and libqtest.h files are now completely indepedent from global_qtest, so that the core library is now not depending on a global state anymore.
Message-Id: <20190904130047.25808-7-thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
8a17fbf6 |
| 24-Apr-2019 |
Thomas Huth <thuth@redhat.com> |
tests/tpm-tests: Use g_test_skip() to mark skipped tests
Since we do not use gtester anymore (which had a bug here), we can now use g_test_skip() to mark skipped tests.
Reviewed-by: Marc-André Lure
tests/tpm-tests: Use g_test_skip() to mark skipped tests
Since we do not use gtester anymore (which had a bug here), we can now use g_test_skip() to mark skipped tests.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-Id: <20190424094557.28404-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
5e58b58c |
| 06-Nov-2018 |
Stefan Berger <stefanb@linux.vnet.ibm.com> |
tests: tpm: Use g_test_message rather than fprintf
Display a message during the test using g_test_message rather than fprintf.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Thom
tests: tpm: Use g_test_message rather than fprintf
Display a message during the test using g_test_message rather than fprintf.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
e2f246a5 |
| 03-Oct-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
tests/tpm: Display if swtpm is not found or --tpm2 not supported
If swtpm is not found in $PATH or --tpm2 isn't supported, we display this in the test log. We cannot mark the test as skipped due to
tests/tpm: Display if swtpm is not found or --tpm2 not supported
If swtpm is not found in $PATH or --tpm2 isn't supported, we display this in the test log. We cannot mark the test as skipped due to a bug in certain versions of the gtester environment that interprets a skipped test as failure.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
show more ...
|
#
ea71a336 |
| 30-May-2018 |
Stefan Berger <stefanb@linux.vnet.ibm.com> |
test: Pass TPM interface model to functions creating command line
Pass the TPM interface model, such as 'tpm-crb', through to the functions that create the command line for QEMU.
Signed-off-by: Ste
test: Pass TPM interface model to functions creating command line
Pass the TPM interface model, such as 'tpm-crb', through to the functions that create the command line for QEMU.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|
#
2b4ccb87 |
| 30-May-2018 |
Stefan Berger <stefanb@linux.vnet.ibm.com> |
test: Move common TPM test functions to tpm-tests.c
Move common TPM test functions from tpm-crb-swtpm-test.c to tpm-tests.c so that for example test cases with the TPM TIS interface can use the same
test: Move common TPM test functions to tpm-tests.c
Move common TPM test functions from tpm-crb-swtpm-test.c to tpm-tests.c so that for example test cases with the TPM TIS interface can use the same code. Prefix all funcions with 'tpm_test_'.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
show more ...
|