[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
- [PATCH v20 0/9] support dirty restraint on vCPU, huangy81, 2022/03/15
- [PATCH v20 2/9] cpus: Introduce cpu_list_generation_id, huangy81, 2022/03/15
- [PATCH v20 1/9] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping, huangy81, 2022/03/15
- [PATCH v20 3/9] migration/dirtyrate: Refactor dirty page rate calculation, huangy81, 2022/03/15
- [PATCH v20 4/9] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically, huangy81, 2022/03/15
- [PATCH v20 5/9] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function, huangy81, 2022/03/15
- [PATCH v20 6/9] softmmu/dirtylimit: Implement virtual CPU throttle, huangy81, 2022/03/15
- [PATCH v20 7/9] softmmu/dirtylimit: Implement dirty page rate limit, huangy81, 2022/03/15
- [PATCH v20 8/9] migration-test: Export migration-test util funtions, huangy81, 2022/03/15
- Re: [PATCH v20 8/9] migration-test: Export migration-test util funtions,
Peter Xu <=
- [PATCH v20 9/9] tests: Add dirty page rate limit test, huangy81, 2022/03/15