[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 12/21] libqtest: add in-process qtest.c tx/rx handlers
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v6 12/21] libqtest: add in-process qtest.c tx/rx handlers |
Date: |
Fri, 3 Jan 2020 11:15:18 +0000 |
On Fri, Nov 29, 2019 at 09:34:47PM +0000, Oleinik, Alexander wrote:
> +QTestState *qtest_inproc_init(QTestState **s, bool log, const char* arch,
> + void (*send)(void*, const char*))
> +{
> + QTestState *qts;
> + qts = g_new0(QTestState, 1);
> + *s = qts; /* Expose qts early on, since the query endianness relies on
> it */
> + qts->wstatus = 0;
> + for (int i = 0; i < MAX_IRQ; i++) {
> + qts->irq_level[i] = false;
> + }
> +
> + qtest_client_set_rx_handler(qts, qtest_client_inproc_recv_line);
> +
> + /* send() may not have a matching protoype, so use a type-safe wrapper */
> + qts->ops.external_send = send;
> + qtest_client_set_tx_handler(qts, send_wrapper);
> +
> + qts->big_endian = qtest_query_target_endianness(qts);
> + gchar *bin_path = g_strconcat("/qemu-system-", arch, NULL);
> + setenv("QTEST_QEMU_BINARY", bin_path, 0);
> + g_free(bin_path);
Is this a dummy path that is needed to make other code happy? Or does
the user need to have an actual file at /qemu-system-ARCH?
signature.asc
Description: PGP signature
- Re: [PATCH v6 12/21] libqtest: add in-process qtest.c tx/rx handlers,
Stefan Hajnoczi <=