static void test_machine(const void *data)

{

    const testdef_t *test = data;

    char tmpname[] = "/tmp/qtest-boot-serial-XXXXXX";

    int fd;



    fd = mkstemp(tmpname);

    g_assert(fd != -1);



    /*

     * Make sure that this test uses tcg if available: It is used as a

     * fast-enough smoketest for that.

     */

    global_qtest = qtest_startf("-M %s,accel=tcg:kvm "

                                "-chardev file,id=serial0,path=%s "

                                "-no-shutdown -serial chardev:serial0 %s",

                                test->machine, tmpname, test->extra);

    unlink(tmpname);



    check_guest_output(test, fd);

    qtest_quit(global_qtest);



    close(fd);

}

static void test_machine(const void *data)

{

    const testdef_t *test = data;

    char tmpname[] = "/tmp/qtest-boot-serial-XXXXXX";

    int fd;



    fd = mkstemp(tmpname);

    g_assert(fd != -1);



    







    global_qtest = qtest_startf("-M %s,accel=tcg:kvm "

                                "-chardev file,id=serial0,path=%s "

                                "-no-shutdown -serial chardev:serial0 %s",

                                test->machine, tmpname, test->extra);

    unlink(tmpname);



    check_guest_output(test, fd);

    qtest_quit(global_qtest);



    close(fd);

}

static void FUNC_0(const void *VAR_0)

{

    const testdef_t *VAR_1 = VAR_0;

    char VAR_2[] = "/tmp/qtest-boot-serial-XXXXXX";

    int VAR_3;



    VAR_3 = mkstemp(VAR_2);

    g_assert(VAR_3 != -1);



    







    global_qtest = qtest_startf("-M %s,accel=tcg:kvm "

                                "-chardev file,id=serial0,path=%s "

                                "-no-shutdown -serial chardev:serial0 %s",

                                VAR_1->machine, VAR_2, VAR_1->extra);

    unlink(VAR_2);



    check_guest_output(VAR_1, VAR_3);

    qtest_quit(global_qtest);



    close(VAR_3);

}

static void FUNC_0(const void *VAR_0)
{ const testdef_t *VAR_1 = VAR_0; char VAR_2[] = "/tmp/qtest-boot-serial-XXXXXX"; int VAR_3; VAR_3 = mkstemp(VAR_2); g_assert(VAR_3 != -1); global_qtest = qtest_startf("-M %s,accel=tcg:kvm "
"-chardev file,id=serial0,path=%s "
"-no-shutdown -serial chardev:serial0 %s",
VAR_1->machine, VAR_2, VAR_1->extra); unlink(VAR_2); check_guest_output(VAR_1, VAR_3); qtest_quit(global_qtest); close(VAR_3); }