Il 15/03/2012 15:58, Kevin Wolf ha scritto:
>> > I believe Kevin suggested using -qtest unix:%s and creating the listen
>> > socket in the test program rather than inside QEMU. The advantage is
>> > that we never sleep(3), instead we accept(2) the connection from QEMU
>> > and get going right away
On 03/15/2012 09:42 AM, Stefan Hajnoczi wrote:
On Thu, Mar 15, 2012 at 1:37 PM, Anthony Liguori wrote:
+sock = socket(PF_UNIX, SOCK_STREAM, 0);
+g_assert_no_errno(sock);
+
+addr.sun_family = AF_UNIX;
+snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", socket_path);
+
+pid
Am 15.03.2012 15:42, schrieb Stefan Hajnoczi:
> On Thu, Mar 15, 2012 at 1:37 PM, Anthony Liguori wrote:
>> +sock = socket(PF_UNIX, SOCK_STREAM, 0);
>> +g_assert_no_errno(sock);
>> +
>> +addr.sun_family = AF_UNIX;
>> +snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", socket_path)
On Thu, Mar 15, 2012 at 1:37 PM, Anthony Liguori wrote:
> + sock = socket(PF_UNIX, SOCK_STREAM, 0);
> + g_assert_no_errno(sock);
> +
> + addr.sun_family = AF_UNIX;
> + snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", socket_path);
> +
> + pid = fork();
> + if (pid == 0) {
> +
This also includes a qtest wrapper script to make it easier to launch qtest
tests directly.
Signed-off-by: Anthony Liguori
---
scripts/qtest|5 +
tests/Makefile |1 +
tests/libqtest.c | 334 ++
tests/libqtest.h | 63 ++