/qemu/tests/qtest/ |
H A D | endianness-test.c | 50 static uint8_t isa_inb(QTestState *qts, const TestCase *test, uint16_t addr) in isa_inb() argument 53 if (test->isa_base == -1) { in isa_inb() 56 value = qtest_readb(qts, test->isa_base + addr); in isa_inb() 61 static uint16_t isa_inw(QTestState *qts, const TestCase *test, uint16_t addr) in isa_inw() argument 64 if (test->isa_base == -1) { in isa_inw() 67 value = qtest_readw(qts, test->isa_base + addr); in isa_inw() 69 return test->bswap ? bswap16(value) : value; in isa_inw() 72 static uint32_t isa_inl(QTestState *qts, const TestCase *test, uint16_t addr) in isa_inl() argument 75 if (test->isa_base == -1) { in isa_inl() 78 value = qtest_readl(qts, test->isa_base + addr); in isa_inl() [all …]
|
H A D | meson.build | 2 'ahci-test': 150, 3 'aspeed_smc-test': 360, 4 'bios-tables-test' : 910, 5 'cdrom-test' : 610, 6 'device-introspect-test' : 720, 7 'ide-test' : 120, 8 'migration-test' : 480, 9 'npcm7xx_pwm-test': 300, 10 'npcm7xx_watchdog_timer-test': 120, 11 'qmp-cmd-test' : 120, [all …]
|
H A D | dbus-vmstate-test.c | 96 get_connection(Test *test, guint *ownid) in get_connection() argument 104 wait->loop = test->loop; in get_connection() 149 set_id_list(Test *test, QTestState *s) in set_id_list() argument 151 if (!test->id_list) { in set_id_list() 158 test->id_list))); in set_id_list() 172 test_dbus_vmstate(Test *test) in test_dbus_vmstate() argument 197 test->loop = loop; in test_dbus_vmstate() 201 srcconnA = get_connection(test, &ownsrcA); in test_dbus_vmstate() 202 srcserverA = get_server(srcconnA, &test->srcA, &idA); in test_dbus_vmstate() 203 srcconnB = get_connection(test, &ownsrcB); in test_dbus_vmstate() [all …]
|
H A D | vnc-display-test.c | 39 test_setup(Test *test) in test_setup() argument 47 test->qts = qtest_init("-M none -vnc none -name vnc-test"); in test_setup() 51 qtest_qmp_add_client(test->qts, "vnc", pair[1]); in test_setup() 53 test->conn = vnc_connection_new(); in test_setup() 54 g_signal_connect(test->conn, "vnc-error", in test_setup() 56 g_signal_connect(test->conn, "vnc-auth-failure", in test_setup() 58 vnc_connection_set_auth_type(test->conn, VNC_CONNECTION_AUTH_NONE); in test_setup() 61 vnc_connection_open_fd(test->conn, _get_osfhandle(pair[0])); in test_setup() 63 vnc_connection_open_fd(test->conn, pair[0]); in test_setup() 66 test->loop = g_main_loop_new(NULL, FALSE); in test_setup() [all …]
|
H A D | tpm-tis-device-test.c | 36 TPMTestState test; in main() local 43 test.addr = g_new0(SocketAddress, 1); in main() 44 test.addr->type = SOCKET_ADDRESS_TYPE_UNIX; in main() 45 test.addr->u.q_unix.path = g_build_filename(tmp_path, "sock", NULL); in main() 46 g_mutex_init(&test.data_mutex); in main() 47 g_cond_init(&test.data_cond); in main() 48 test.data_cond_signal = false; in main() 49 test.tpm_version = TPM_VERSION_2_0; in main() 51 thread = g_thread_new(NULL, tpm_emu_ctrl_thread, &test); in main() 52 tpm_emu_test_wait_cond(&test); in main() [all …]
|
H A D | tpm-tis-test.c | 32 TPMTestState test; in main() local 37 test.addr = g_new0(SocketAddress, 1); in main() 38 test.addr->type = SOCKET_ADDRESS_TYPE_UNIX; in main() 39 test.addr->u.q_unix.path = g_build_filename(tmp_path, "sock", NULL); in main() 40 g_mutex_init(&test.data_mutex); in main() 41 g_cond_init(&test.data_cond); in main() 42 test.data_cond_signal = false; in main() 43 test.tpm_version = TPM_VERSION_2_0; in main() 45 thread = g_thread_new(NULL, tpm_emu_ctrl_thread, &test); in main() 46 tpm_emu_test_wait_cond(&test); in main() [all …]
|
H A D | pxe-test.c | 66 static void test_pxe_one(const testdef_t *test, bool ipv6) in test_pxe_one() argument 70 const char *extra = test->extra; in test_pxe_one() 80 test->machine, disk, ipv6 ? "off" : "on", ipv6 ? "on" : "off", in test_pxe_one() 81 test->model, extra); in test_pxe_one() 91 const testdef_t *test = data; in test_pxe_ipv4() local 93 test_pxe_one(test, false); in test_pxe_ipv4() 98 const testdef_t *test = data; in test_pxe_ipv6() local 100 test_pxe_one(test, true); in test_pxe_ipv6() 108 const testdef_t *test = &tests[i]; in test_batch() local 111 if (!qtest_has_device(test->model)) { in test_batch() [all …]
|
H A D | dbus-display-test.c | 101 TestDBusConsoleRegister *test) in listener_handle_scanout() argument 103 if (!test->with_map) { in listener_handle_scanout() 104 g_main_loop_quit(test->loop); in listener_handle_scanout() 121 TestDBusConsoleRegister *test) in listener_handle_scanout_map() argument 137 g_main_loop_quit(test->loop); in listener_handle_scanout_map() 145 test_dbus_console_setup_listener(TestDBusConsoleRegister *test, bool with_map) in test_dbus_console_setup_listener() argument 150 test->server = g_dbus_object_manager_server_new(DBUS_DISPLAY1_ROOT); in test_dbus_console_setup_listener() 155 "signal::handle-scanout", listener_handle_scanout, test, in test_dbus_console_setup_listener() 169 "signal::handle-scanout-map", listener_handle_scanout_map, test, in test_dbus_console_setup_listener() 178 g_dbus_object_manager_server_export(test->server, listener); in test_dbus_console_setup_listener() [all …]
|
H A D | boot-serial-test.c | 201 static bool check_guest_output(QTestState *qts, const testdef_t *test, int fd) in check_guest_output() argument 211 if (ch == test->expect[pos]) { in check_guest_output() 213 if (test->expect[pos] == '\0') { in check_guest_output() 239 const testdef_t *test = data; in test_machine() local 251 if (test->kernel) { in test_machine() 252 code = test->kernel; in test_machine() 254 } else if (test->bios) { in test_machine() 255 code = test->bios; in test_machine() 265 wlen = write(code_fd, code, test->codesize); in test_machine() 266 g_assert(wlen == test->codesize); in test_machine() [all …]
|
/qemu/tests/unit/ |
H A D | meson.build | 14 'test-error-report': [], 15 'test-qobject-output-visitor': [testqapi], 16 'test-clone-visitor': [testqapi], 17 'test-qobject-input-visitor': [testqapi], 18 'test-forward-visitor': [testqapi], 19 'test-string-input-visitor': [testqapi], 20 'test-string-output-visitor': [testqapi], 21 'test-visitor-serialization': [testqapi], 22 'test-bitmap': [], 23 'test-resv-mem': [], [all …]
|
H A D | test-bitops.c | 42 const S32Test *test = &test_s32_data[i]; in test_sextract32() local 43 int32_t r = sextract32(test->value, test->start, test->length); in test_sextract32() 45 g_assert_cmpint(r, ==, test->result); in test_sextract32() 54 const S32Test *test = &test_s32_data[i]; in test_sextract64() local 55 int64_t r = sextract64(test->value, test->start, test->length); in test_sextract64() 57 g_assert_cmpint(r, ==, test->result); in test_sextract64() 61 const S64Test *test = &test_s64_data[i]; in test_sextract64() local 62 int64_t r = sextract64(test->value, test->start, test->length); in test_sextract64() 64 g_assert_cmpint(r, ==, test->result); in test_sextract64() 93 const Shuffle32Test *test = &test_shuffle32_data[i]; in test_half_shuffle32() local [all …]
|
H A D | io-channel-helpers.c | 102 void qio_channel_test_run_threads(QIOChannelTest *test, in qio_channel_test_run_threads() argument 109 test->src = src; in qio_channel_test_run_threads() 110 test->dst = dst; in qio_channel_test_run_threads() 112 qio_channel_set_blocking(test->dst, blocking, NULL); in qio_channel_test_run_threads() 113 qio_channel_set_blocking(test->src, blocking, NULL); in qio_channel_test_run_threads() 117 test); in qio_channel_test_run_threads() 120 test); in qio_channel_test_run_threads() 125 test->dst = test->src = NULL; in qio_channel_test_run_threads() 129 void qio_channel_test_run_writer(QIOChannelTest *test, in qio_channel_test_run_writer() argument 132 test->src = src; in qio_channel_test_run_writer() [all …]
|
H A D | test-xbzrle.c | 68 uint8_t *test = g_malloc0(XBZRLE_PAGE_SIZE); in test_encode_decode_unchanged() local 74 test[1000 + i] = i + 4; in test_encode_decode_unchanged() 77 test[1000 + diff_len + 3] = 107; in test_encode_decode_unchanged() 78 test[1000 + diff_len + 5] = 109; in test_encode_decode_unchanged() 81 dlen = xbzrle_encode_buffer(test, test, XBZRLE_PAGE_SIZE, in test_encode_decode_unchanged() 85 g_free(test); in test_encode_decode_unchanged() 92 uint8_t *test = g_malloc0(XBZRLE_PAGE_SIZE); in test_encode_decode_1_byte() local 97 test[XBZRLE_PAGE_SIZE - 1] = 1; in test_encode_decode_1_byte() 99 dlen = xbzrle_encode_buffer(buffer, test, XBZRLE_PAGE_SIZE, in test_encode_decode_1_byte() 105 g_assert(memcmp(test, buffer, XBZRLE_PAGE_SIZE) == 0); in test_encode_decode_1_byte() [all …]
|
/qemu/tests/functional/ |
H A D | test_mips_malta.py | 15 def mips_run_common_commands(test, prompt='#'): argument 16 exec_command_and_wait_for_pattern(test, 19 exec_command_and_wait_for_pattern(test, 22 wait_for_console_pattern(test, prompt) 23 exec_command_and_wait_for_pattern(test, 26 wait_for_console_pattern(test, prompt) 27 exec_command_and_wait_for_pattern(test, 30 wait_for_console_pattern(test, prompt) 31 exec_command_and_wait_for_pattern(test, 34 wait_for_console_pattern(test, prompt) [all …]
|
/qemu/hw/misc/ |
H A D | pci-testdev.c | 30 uint8_t test; member 107 static int pci_testdev_start(IOTest *test) in OBJECT_DECLARE_SIMPLE_TYPE() 109 test->hdr->count = 0; in OBJECT_DECLARE_SIMPLE_TYPE() 110 if (!test->hasnotifier) { in OBJECT_DECLARE_SIMPLE_TYPE() 113 event_notifier_test_and_clear(&test->notifier); in OBJECT_DECLARE_SIMPLE_TYPE() 114 memory_region_add_eventfd(test->mr, in OBJECT_DECLARE_SIMPLE_TYPE() 115 le32_to_cpu(test->hdr->offset), in OBJECT_DECLARE_SIMPLE_TYPE() 116 test->size, in OBJECT_DECLARE_SIMPLE_TYPE() 117 test->match_data, in OBJECT_DECLARE_SIMPLE_TYPE() 118 test->hdr->data, in OBJECT_DECLARE_SIMPLE_TYPE() [all …]
|
/qemu/tests/fp/ |
H A D | fp-test-log2.c | 25 static void compare(ufloat64 test, ufloat64 real, ufloat64 soft, bool exact) in compare() argument 51 test.i, test.d, soft.i, soft.d, real.i, real.d); in compare() 69 ufloat64 test, real, soft; in main() local 77 test.d = 0.0; in main() 79 soft.i = float64_log2(test.i, &qsf); in main() 80 compare(test, real, soft, true); in main() 82 test.d = 1.0; in main() 84 soft.i = float64_log2(test.i, &qsf); in main() 85 compare(test, real, soft, true); in main() 87 test.d = 2.0; in main() [all …]
|
/qemu/tests/ |
H A D | meson.build | 9 'test-qapi-commands-sub-sub-module.c', 10 'test-qapi-commands-sub-sub-module.h', 11 'test-qapi-commands.c', 12 'test-qapi-commands.h', 13 'test-qapi-emit-events.c', 14 'test-qapi-emit-events.h', 15 'test-qapi-events-sub-sub-module.c', 16 'test-qapi-events-sub-sub-module.h', 17 'test-qapi-events.c', 18 'test-qapi-events.h', [all …]
|
/qemu/tests/functional/qemu_test/ |
H A D | cmd.py | 49 def _console_read_line_until_match(test, vm, success, failure): argument 56 test.fail( 67 test.fail( 81 def _console_interaction(test, success_message, failure_message, argument 87 vm = test.vm 89 test.log.debug( 116 if _console_read_line_until_match(test, vm, 121 def interrupt_interactive_console_until_pattern(test, success_message, argument 145 _console_interaction(test, success_message, failure_message, 148 def wait_for_console_pattern(test, success_message, failure_message=None, argument [all …]
|
/qemu/tests/tcg/multiarch/ |
H A D | noexec.c.inc | 48 const struct noexec_test *test = current_noexec_test; 55 if (test == NULL) { 61 expected_si = page_base + test->expected_si_ofs; 69 expected_pc = page_base + test->expected_pc_ofs; 76 if (arg != test->expected_arg) { 77 printf("[ FAILED ] wrong arg (%d != %d)\n", arg, test->expected_arg); 87 static void test_noexec_1(const struct noexec_test *test) 89 void *start = page_base + test->page_ofs; 90 void (*fn)(int arg) = page_base + test->entry_ofs; 92 memcpy(start, test->test_code, test->test_len); [all …]
|
/qemu/tests/include/ |
H A D | meson.build | 3 'test-qapi-commands-sub-module.c', 4 'test-qapi-commands-sub-module.h', 5 'test-qapi-events-sub-module.c', 6 'test-qapi-events-sub-module.h', 7 'test-qapi-types-sub-module.c', 8 'test-qapi-types-sub-module.h', 9 'test-qapi-visit-sub-module.c', 10 'test-qapi-visit-sub-module.h', 13 test_qapi_files_extra = custom_target('QAPI test (include)',
|
/qemu/tests/multiboot/ |
H A D | aout_kludge.out | 4 === Running test case: aout_kludge_1.bin === 8 === Running test case: aout_kludge_2.bin === 12 === Running test case: aout_kludge_3.bin === 16 === Running test case: aout_kludge_4.bin === 20 === Running test case: aout_kludge_5.bin === 25 === Running test case: aout_kludge_6.bin === 30 === Running test case: aout_kludge_7.bin === 35 === Running test case: aout_kludge_8.bin === 40 === Running test case: aout_kludge_9.bin ===
|
H A D | modules.out | 4 === Running test case: modules.elf === 9 === Running test case: modules.elf -initrd module.txt === 13 Content: 'This is a test file that is used as a multiboot module.' 16 === Running test case: modules.elf -initrd module.txt argument === 20 Content: 'This is a test file that is used as a multiboot module.' 23 === Running test case: modules.elf -initrd module.txt argument,,with,,commas === 27 Content: 'This is a test file that is used as a multiboot module.' 30 === Running test case: modules.elf -initrd module.txt,module.txt argument,module.txt === 34 Content: 'This is a test file that is used as a multiboot module.' 36 Content: 'This is a test file that is used as a multiboot module.' [all …]
|
/qemu/tests/qtest/migration/ |
H A D | migration-util.c | 244 MigrationTest *test = (MigrationTest *)data; in migration_test_destroy() local 246 g_free(test->name); in migration_test_destroy() 247 g_free(test); in migration_test_destroy() 252 MigrationTest *test = (MigrationTest *)data; in migration_test_wrapper() local 254 g_test_message("Running /%s%s", qtest_get_arch(), test->name); in migration_test_wrapper() 255 test->func(); in migration_test_wrapper() 260 MigrationTest *test = g_new0(MigrationTest, 1); in migration_test_add() local 262 test->func = fn; in migration_test_add() 263 test->name = g_strdup(path); in migration_test_add() 265 qtest_add_data_func_full(path, test, migration_test_wrapper, in migration_test_add() [all …]
|
/qemu/tests/tcg/s390x/ |
H A D | ex-branch.c | 8 struct test { struct 15 #define LINK_64(test) ((long)test ## _exp_link) argument 16 #define LINK_NONE(test) -1L argument 114 static const struct test tests[] = { 120 const struct test *test; in main() local 133 test = &tests[i]; in main() 135 fprintf(stderr, "[ RUN ] %s\n", test->name); in main() 139 test->func(&link, &magic); in main() 143 test->name, expected, actual); \ in main() 147 ASSERT_EQ(test->exp_link, link); in main()
|
/qemu/tests/tcg/i386/ |
H A D | README | 3 test-i386 11 to test some 16 bit addressing and 32 bit with segmentation cases. 13 The Linux system call vm86() is used to test vm86 emulation. 15 Various exceptions are raised to test most of the x86 user space 18 test-avx 24 test-avx.h is generate from x86.csv by test-avx.py 27 linux-test 34 test-i386-fprem 37 test-mmap
|