qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Fabiano Rosas <farosas@suse.de>, qemu-devel@nongnu.org
Cc: "Juan Quintela" <quintela@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Leonardo Bras" <leobras@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH] qtest/migration: Add a test for the analyze-migration script
Date: Thu, 28 Sep 2023 07:07:16 +0200	[thread overview]
Message-ID: <62c405c9-27f2-a77a-1f94-8d03cf65fff6@redhat.com> (raw)
In-Reply-To: <20230927214756.14117-1-farosas@suse.de>

On 27/09/2023 23.47, Fabiano Rosas wrote:
> Add a smoke test that migrates to a file and gives it to the
> script. It should catch the most annoying errors such as changes in
> the ram flags.
> 
> After code has been merged it becomes way harder to figure out what is
> causing the script to fail, the person making the change is the most
> likely to know right away what the problem is.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
> I know this adds a python dependency to qtests and I'm not sure how
> much we care about this script, but on the other hand it would be nice
> to catch these errors early on.
> 
> This would also help with future work that touches the migration
> stream (moving multifd out of ram.c and fixed-ram).
> 
> Let me know what you think.

Without looking at this too closely, my first thought was: This sounds 
rather like a good candidate for an avocado test instead. It's using Python, 
so tests/avocado/ sounds like a better fit. Have you considered adding it as 
an avocado test already?

 >+#define ANALYZE_SCRIPT "tests/qtest/analyze-migration.py"

Why can't you use scripts/analyze-migration.py directly?

 >+    file = g_strdup_printf("%s/migfile", tmpfs);

Please, no static file names for temporary files - tests might be running in 
parallel, and then you get race conditions! Use something like 
g_file_open_tmp() instead to create a file with a random name.

  Thomas



  parent reply	other threads:[~2023-09-28  5:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 21:47 [PATCH] qtest/migration: Add a test for the analyze-migration script Fabiano Rosas
2023-09-27 22:06 ` Fabiano Rosas
2023-09-28  5:07 ` Thomas Huth [this message]
2023-09-28 13:32   ` Fabiano Rosas
2023-09-28 13:40     ` Thomas Huth
2023-09-28 13:47       ` Fabiano Rosas
2023-10-11 14:40       ` Juan Quintela
2023-10-04 20:40 ` Peter Xu
2023-10-05 21:30   ` Fabiano Rosas

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=62c405c9-27f2-a77a-1f94-8d03cf65fff6@redhat.com \
    --to=thuth@redhat.com \
    --cc=farosas@suse.de \
    --cc=leobras@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).