aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-11-03 13:07:30 -0400
committerRichard Henderson <richard.henderson@linaro.org>2021-11-03 13:07:30 -0400
commitb1fd92137e4d485adeec8e9f292f928ff335b76c (patch)
treea313d04130309d9898fc07698096724c4b316386 /tests/qtest
parentc55e3370c359713ff1e2a3392f36978c629c20c8 (diff)
parent16bfbc70f39e420b6b6cfe39ed8571606482b94a (diff)
downloadqemu-b1fd92137e4d485adeec8e9f292f928ff335b76c.zip
qemu-b1fd92137e4d485adeec8e9f292f928ff335b76c.tar.gz
qemu-b1fd92137e4d485adeec8e9f292f928ff335b76c.tar.bz2
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Build system fixes and cleanups * DMA support in the multiboot option ROM * Rename default-bus-bypass-iommu * Deprecate -watchdog and cleanup -watchdog-action * HVF fix for <PAGE_SIZE regions * Support TSC scaling for AMD nested virtualization * Fix for ESP fuzzing bug # gpg: Signature made Tue 02 Nov 2021 10:57:37 AM EDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] * remotes/bonzini/tags/for-upstream: (27 commits) configure: fix --audio-drv-list help message configure: Remove the check for the __thread keyword Move the l2tpv3 test from configure to meson.build meson: remove unnecessary coreaudio test program meson: remove pointless warnings meson.build: Allow to disable OSS again meson: bump submodule to 0.59.3 qtest/am53c974-test: add test for cancelling in-flight requests esp: ensure in-flight SCSI requests are always cancelled KVM: SVM: add migration support for nested TSC scaling hw/i386: fix vmmouse registration watchdog: remove select_watchdog_action vl: deprecate -watchdog watchdog: add information from -watchdog help to -device help hw/i386: Rename default_bus_bypass_iommu hvf: Avoid mapping regions < PAGE_SIZE as ram configure: do not duplicate CPU_CFLAGS into QEMU_LDFLAGS configure: remove useless NPTL probe target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types optionrom: add a DMA-enabled multiboot ROM ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests/qtest')
-rw-r--r--tests/qtest/am53c974-test.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/qtest/am53c974-test.c b/tests/qtest/am53c974-test.c
index d996866..9b1e421 100644
--- a/tests/qtest/am53c974-test.c
+++ b/tests/qtest/am53c974-test.c
@@ -189,6 +189,40 @@ static void test_cancelled_request_ok(void)
qtest_quit(s);
}
+static void test_inflight_cancel_ok(void)
+{
+ QTestState *s = qtest_init(
+ "-device am53c974,id=scsi "
+ "-device scsi-hd,drive=disk0 -drive "
+ "id=disk0,if=none,file=null-co://,format=raw -nodefaults");
+ qtest_outl(s, 0xcf8, 0x80001000);
+ qtest_inw(s, 0xcfc);
+ qtest_outl(s, 0xcf8, 0x80001010);
+ qtest_outl(s, 0xcfc, 0xffffffff);
+ qtest_outl(s, 0xcf8, 0x80001010);
+ qtest_inl(s, 0xcfc);
+ qtest_outl(s, 0xcf8, 0x80001010);
+ qtest_outl(s, 0xcfc, 0xc001);
+ qtest_outl(s, 0xcf8, 0x80001004);
+ qtest_inw(s, 0xcfc);
+ qtest_outl(s, 0xcf8, 0x80001004);
+ qtest_outw(s, 0xcfc, 0x7);
+ qtest_outl(s, 0xcf8, 0x80001004);
+ qtest_inw(s, 0xcfc);
+ qtest_inb(s, 0xc000);
+ qtest_outb(s, 0xc008, 0x8);
+ qtest_outw(s, 0xc00b, 0x4100);
+ qtest_outb(s, 0xc009, 0x0);
+ qtest_outb(s, 0xc009, 0x0);
+ qtest_outw(s, 0xc00b, 0xc212);
+ qtest_outl(s, 0xc042, 0x2c2c5a88);
+ qtest_outw(s, 0xc00b, 0xc212);
+ qtest_outw(s, 0xc00b, 0x415a);
+ qtest_outl(s, 0xc03f, 0x3060303);
+ qtest_outl(s, 0xc00b, 0x5afa9054);
+ qtest_quit(s);
+}
+
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
@@ -212,6 +246,8 @@ int main(int argc, char **argv)
test_fifo_underflow_on_write_ok);
qtest_add_func("am53c974/test_cancelled_request_ok",
test_cancelled_request_ok);
+ qtest_add_func("am53c974/test_inflight_cancel_ok",
+ test_inflight_cancel_ok);
}
return g_test_run();