qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v20 8/9] migration-test: Export migration-test util funtions


From: Peter Xu
Subject: Re: [PATCH v20 8/9] migration-test: Export migration-test util funtions
Date: Wed, 16 Mar 2022 12:09:05 +0800

On Wed, Mar 16, 2022 at 10:21:38AM +0800, huangy81@chinatelecom.cn wrote:
> +void cleanup(const char *filename)
> +{
> +    g_autofree char *path = g_strdup_printf("%s/%s", tmpfs, filename);
> +
> +    unlink(path);
> +}

If to move most of these tmpfs helpers out anyway, shouldn't we also move
all tmpfs ops into this helper file?  E.g. initializations of tmpfs var is
still separately done.  That's a bit odd.

Ideally IIUC tmpfs doesn't need to be exported in migration-helpers.h at
all below, but hidden.

> diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helpers.h
> index d63bba9..d08551f 100644
> --- a/tests/qtest/migration-helpers.h
> +++ b/tests/qtest/migration-helpers.h
> @@ -14,7 +14,14 @@
>  
>  #include "libqos/libqtest.h"
>  
> +/* For dirty ring test; so far only x86_64 is supported */
> +#if defined(__linux__) && defined(HOST_X86_64)
> +#include "linux/kvm.h"
> +#endif
> +#include <sys/ioctl.h>
> +
>  extern bool got_stop;
> +extern const char *tmpfs;

-- 
Peter Xu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]