All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] tests: numa-test: use -numa memdev option instead of legacy 'mem' option
Date: Thu, 4 Jul 2019 09:33:22 +0200	[thread overview]
Message-ID: <20190704093322.04d78d48@redhat.com> (raw)
In-Reply-To: <20190703193702.GA5198@habkost.net>

On Wed, 3 Jul 2019 16:37:02 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:

> On Wed, Jul 03, 2019 at 11:47:23AM -0400, Igor Mammedov wrote:
> > it drops testing of deprecated 'mem' option and will test preferred memdev
> > option instead.
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> > v2:
> >   - make backend size depend on initial RAM size and a number of backends
> >     fixes test faulure with spapr machine (Eduardo Habkost <ehabkost@redhat.com>)
> > 
> >  tests/numa-test.c | 85 +++++++++++++++++++++++++++++------------------
> >  1 file changed, 52 insertions(+), 33 deletions(-)
> > 
> > diff --git a/tests/numa-test.c b/tests/numa-test.c
> > index 8de8581231..e102b3b70f 100644
> > --- a/tests/numa-test.c
> > +++ b/tests/numa-test.c
> > @@ -14,9 +14,28 @@
> >  #include "qapi/qmp/qdict.h"
> >  #include "qapi/qmp/qlist.h"
> >  
> > -static char *make_cli(const char *generic_cli, const char *test_cli)
> > +typedef struct {
> > +    const char *args;
> > +    int ram_size; /* size in MB */
> > +} TestData;
> > +
> > +static char *make_cli(const TestData *data, int memdev_count,
> > +                      const char *test_cli)
> >  {
> > -    return g_strdup_printf("%s %s", generic_cli ? generic_cli : "", test_cli);
> > +    int i;
> > +    char *tmp = NULL;
> > +    char *cli = g_strdup_printf("%s -m %d", data->args ? : "", data->ram_size);
> > +
> > +    for (i = 0; memdev_count && (i < memdev_count); i++) {
> > +        tmp = g_strdup_printf("%s -object memory-backend-ram,id=r%d,size=%dM",
> > +                              cli, i, data->ram_size / memdev_count);
> > +        g_free(cli);
> > +        cli = tmp;
> > +    }
> > +    tmp = g_strdup_printf("%s %s", cli, test_cli);
> > +    g_free(cli);
> > +    cli = tmp;
> > +    return cli;
> >  }  
> [...]
> > +    TestData data = { .ram_size = 128 };
> >  
> > -    if (strcmp(arch, "aarch64") == 0) {
> > -        args = "-machine virt";
> > +    if (!strcmp(arch, "aarch64")) {
> > +        data.args = "-machine virt";
> > +    } else if (!strcmp(arch, "ppc64")) {
> > +        data.ram_size = 512;  
> 
> Wouldn't it be simpler to always use "-m 512M" and the same node
> sizes?
it would, but it might make some CI instances start failing more
often where it used to work before. So I picked side of being
conservative and not to hog memory unless it's necessary.



  reply	other threads:[~2019-07-04  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 21:57 [Qemu-devel] [PATCH] numa: Make deprecation warnings conditional on !qtest_enabled() Eduardo Habkost
2019-07-03  7:49 ` Igor Mammedov
2019-07-03 15:47 ` [Qemu-devel] [PATCH v2] tests: numa-test: use -numa memdev option instead of legacy 'mem' option Igor Mammedov
2019-07-03 19:37   ` Eduardo Habkost
2019-07-04  7:33     ` Igor Mammedov [this message]
2019-07-08 22:25       ` Eduardo Habkost
2019-07-09 14:51         ` Igor Mammedov
2019-07-03 19:57   ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190704093322.04d78d48@redhat.com \
    --to=imammedo@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.