ivshmem: remove useless ivshmem_update_irq() val argument
[qemu/cris-port.git] / tests / ivshmem-test.c
blob2f6bec890247dae05254327cf2224ac7ee468d0d
1 /*
2 * QTest testcase for ivshmem
4 * Copyright (c) 2014 SUSE LINUX Products GmbH
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
10 #include <glib.h>
11 #include <stdlib.h>
12 #include <string.h>
13 #include <unistd.h>
14 #include "libqtest.h"
15 #include "qemu/osdep.h"
17 static char dev_shm_path[] = "/dev/shm/qtest.XXXXXX";
19 /* Tests only initialization so far. TODO: Replace with functional tests */
20 static void nop(void)
24 int main(int argc, char **argv)
26 QTestState *s1, *s2;
27 char *cmd;
28 int ret, fd;
30 g_test_init(&argc, &argv, NULL);
31 qtest_add_func("/ivshmem/nop", nop);
33 fd = mkstemp(dev_shm_path);
34 g_assert(fd >= 0);
35 close(fd);
36 unlink(dev_shm_path);
38 cmd = g_strdup_printf("-device ivshmem,shm=%s,size=1M", &dev_shm_path[9]);
39 s1 = qtest_start(cmd);
40 s2 = qtest_start(cmd);
41 g_free(cmd);
43 ret = g_test_run();
45 qtest_quit(s1);
46 qtest_quit(s2);
48 unlink(dev_shm_path);
50 return ret;