Message ID | 20211123211932.284043-3-danielhb413@gmail.com |
---|---|
State | New |
Headers | show |
Series | change IVSHMEM endianess to LITTLE_ENDIAN | expand |
On 23/11/2021 22.19, Daniel Henrique Barboza wrote: > This test, if enabled by hand, was failing when the ivhsmem device was > being declared as DEVICE_NATIVE_ENDIAN with the following error: > > /ppc64/ivshmem/pair: OK > /ppc64/ivshmem/server: > ** > ERROR:/home/danielhb/qemu/tests/qtest/ivshmem-test.c:367:test_ivshmem_server: > assertion failed (ret != 0): (0 != 0) > Aborted > > After the endianess change done in the previous patch, we can verify in s/endianess/endianness/ > both a a Power 9 little-endian host and in a Power 8 big-endian host > that this test is now passing: > > $ QTEST_QEMU_BINARY=./ppc64-softmmu/qemu-system-ppc64 ./tests/qtest/ivshmem-test -m slow > /ppc64/ivshmem/single: OK > /ppc64/ivshmem/hotplug: OK > /ppc64/ivshmem/memdev: OK > /ppc64/ivshmem/pair: OK > /ppc64/ivshmem/server: OK > > Let's keep it that way by officialy enabling it for ppc64. s/officialy/officially/ > Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> > --- > tests/qtest/ivshmem-test.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c > index dfa69424ed..fe94dd3b96 100644 > --- a/tests/qtest/ivshmem-test.c > +++ b/tests/qtest/ivshmem-test.c > @@ -463,7 +463,6 @@ static gchar *mktempshm(int size, int *fd) > int main(int argc, char **argv) > { > int ret, fd; > - const char *arch = qtest_get_arch(); > gchar dir[] = "/tmp/ivshmem-test.XXXXXX"; > > g_test_init(&argc, &argv, NULL); > @@ -488,9 +487,7 @@ int main(int argc, char **argv) > qtest_add_func("/ivshmem/memdev", test_ivshmem_memdev); > if (g_test_slow()) { > qtest_add_func("/ivshmem/pair", test_ivshmem_pair); > - if (strcmp(arch, "ppc64") != 0) { > - qtest_add_func("/ivshmem/server", test_ivshmem_server); > - } > + qtest_add_func("/ivshmem/server", test_ivshmem_server); > } Acked-by: Thomas Huth <thuth@redhat.com>
diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index dfa69424ed..fe94dd3b96 100644 --- a/tests/qtest/ivshmem-test.c +++ b/tests/qtest/ivshmem-test.c @@ -463,7 +463,6 @@ static gchar *mktempshm(int size, int *fd) int main(int argc, char **argv) { int ret, fd; - const char *arch = qtest_get_arch(); gchar dir[] = "/tmp/ivshmem-test.XXXXXX"; g_test_init(&argc, &argv, NULL); @@ -488,9 +487,7 @@ int main(int argc, char **argv) qtest_add_func("/ivshmem/memdev", test_ivshmem_memdev); if (g_test_slow()) { qtest_add_func("/ivshmem/pair", test_ivshmem_pair); - if (strcmp(arch, "ppc64") != 0) { - qtest_add_func("/ivshmem/server", test_ivshmem_server); - } + qtest_add_func("/ivshmem/server", test_ivshmem_server); } out:
This test, if enabled by hand, was failing when the ivhsmem device was being declared as DEVICE_NATIVE_ENDIAN with the following error: /ppc64/ivshmem/pair: OK /ppc64/ivshmem/server: ** ERROR:/home/danielhb/qemu/tests/qtest/ivshmem-test.c:367:test_ivshmem_server: assertion failed (ret != 0): (0 != 0) Aborted After the endianess change done in the previous patch, we can verify in both a a Power 9 little-endian host and in a Power 8 big-endian host that this test is now passing: $ QTEST_QEMU_BINARY=./ppc64-softmmu/qemu-system-ppc64 ./tests/qtest/ivshmem-test -m slow /ppc64/ivshmem/single: OK /ppc64/ivshmem/hotplug: OK /ppc64/ivshmem/memdev: OK /ppc64/ivshmem/pair: OK /ppc64/ivshmem/server: OK Let's keep it that way by officialy enabling it for ppc64. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> --- tests/qtest/ivshmem-test.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)