[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH REPOST v3 79/80] tests:numa-test: make top level args dynamic
From: |
Thomas Huth |
Subject: |
Re: [PATCH REPOST v3 79/80] tests:numa-test: make top level args dynamic and g_autofree(cli) cleanups |
Date: |
Thu, 23 Jan 2020 17:33:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 23/01/2020 12.38, Igor Mammedov wrote:
> Use GString to pass argument to make_cli() so that it would be easy
> to dynamically change test case arguments from main(). The follow up
> patch will use it to change RAM size options depending on target.
>
> While at it cleanup 'cli' freeing, using g_autofree annotation.
>
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
[...]
> @@ -539,11 +539,11 @@ static void pc_hmat_erange_cfg(const void *data)
>
> int main(int argc, char **argv)
> {
> - const char *args = NULL;
> + g_autoptr(GString) args = g_string_new("");
Nit: You could use g_string_new(NULL) here to save two bytes ;-)
> const char *arch = qtest_get_arch();
>
> - if (strcmp(arch, "aarch64") == 0) {
> - args = "-machine virt";
> + if (g_str_equal(arch, "aarch64")) {
> + g_string_append(args, " -machine virt");
> }
>
> g_test_init(&argc, &argv, NULL);
>
Reviewed-by: Thomas Huth <address@hidden>
- [PATCH REPOST v3 72/80] sparc/niagara: use memdev for RAM, (continued)
- [PATCH REPOST v3 72/80] sparc/niagara: use memdev for RAM, Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 69/80] ppc/virtex_ml507: use memdev for RAM, Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 74/80] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize(), Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 75/80] exec: drop bogus mem_path from qemu_ram_alloc_from_fd(), Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 76/80] make mem_path local variable, Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 77/80] hostmem: introduce "prealloc-threads" property, Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 78/80] hostmem: fix strict bind policy, Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 73/80] remove no longer used memory_region_allocate_system_memory(), Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 79/80] tests:numa-test: make top level args dynamic and g_autofree(cli) cleanups, Igor Mammedov, 2020/01/23
- [PATCH REPOST v3 80/80] tests:numa-test: use explicit memdev to specify node RAM, Igor Mammedov, 2020/01/23
- Re: [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend, no-reply, 2020/01/23
- Re: [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend, Laurent Vivier, 2020/01/23