All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
	John Snow <jsnow@redhat.com>
Subject: Re: [PATCH 1/4] tests/vmstate-static-checker-data: Remove old dump files
Date: Tue, 29 Apr 2025 18:13:00 -0400	[thread overview]
Message-ID: <aBFO7DcBWYpOp0-Y@x1.local> (raw)
In-Reply-To: <20250429152141.294380-2-thuth@redhat.com>

On Tue, Apr 29, 2025 at 05:21:38PM +0200, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> These files reference QEMU machine types that have already been
> removed and thus are of no use anymore.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

I never noticed these files, but when looking it seems to me these two
dumps are tailored to be used to test the script itself..

See:

$ git ls tests/vmstate-static-checker-data/
e178113ff6 hw: Replace anti-social QOM type names
38ef86b5a6 tests: vmstate static checker: add size mismatch inside substructure
af3713f6b9 tests: vmstate static checker: add substructure for usb-kbd for hid section
c7173a9c18 tests: vmstate static checker: remove Subsections
aa2a12bb82 tests: vmstate static checker: remove a subsection
b5968f0ab3 tests: vmstate static checker: remove Description inside Fields
ff29b8573f tests: vmstate static checker: remove Description
083bac3484 tests: vmstate static checker: remove Fields
1d681c712a tests: vmstate static checker: change description name
fd52ffb9bf tests: vmstate static checker: remove last field in a struct
55e8e0e19c tests: vmstate static checker: remove a field
ab99bdbe33 tests: vmstate static checker: remove a section
7daa3d76df tests: vmstate static checker: minimum_version_id check
4efa6e1d64 tests: vmstate static checker: version mismatch inside a Description
a81d3fad87 tests: vmstate static checker: add version error in main section
bc178dc563 tests: vmstate static checker: incompat machine types
a10413e4fc tests: vmstate static checker: add dump1 and dump2 files

So dump2.json was deliberately modified to trigger all kinds of error that
the python script can detect.

Maybe we can still keep it there, but at least make it clearer that it's
testing the script?  For example, we could create a bash under the same dir
running the script over the two dumps and comparing the results to be the
expected one?

Currently the output:

$ scripts/vmstate-static-checker.py -s ./tests/vmstate-static-checker-data/dump1.json -d ./tests/vmstate-static-checker-data/dump2.json 
Warning: checking incompatible machine types: "pc-i440fx-2.1", "pc-i440fx-2.2"
Section "fw_cfg" does not exist in dest
Section "fusbh200-ehci-usb" version error: 2 > 1
Section "fusbh200-ehci-usb", Description "ehci-core": expected field "usbsts", got "usbsts_pending"; skipping rest
Section "pci-serial-4x" Description "pci-serial-multi": Entry "Fields" missing
Section "intel-hda-generic", Description "intel-hda", Field "pci": missing description
Section "cfi.pflash01": Entry "Description" missing
Section "megasas", Description "PCIDevice": expected field "irq_state", while dest has no further fields
Section "PIIX3-xen" Description "PIIX3": minimum version error: 1 < 2
Section "PIIX3-xen" Description "PIIX3": Entry "Subsections" missing
Section "tpci200": Description "tpci200" missing, got "tpci2002" instead; skipping
Section "sun-fdtwo" Description "fdc": version error: 2 > 1
Section "sun-fdtwo", Description "fdrive": Subsection "fdrive/media_rate" not found
Section "usb-kbd" Description "usb-kbd" Field "kbd.keycodes" size mismatch: 4 , 2

So the bash can make sure the result is exactly that.  If we want, we could
even route that to CI, but I'd say optional.

-- 
Peter Xu



  parent reply	other threads:[~2025-04-29 22:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 15:21 [PATCH 0/4] Test vmstate with scripts/vmstate-static-checker.py Thomas Huth
2025-04-29 15:21 ` [PATCH 1/4] tests/vmstate-static-checker-data: Remove old dump files Thomas Huth
2025-04-29 15:29   ` Philippe Mathieu-Daudé
2025-04-29 22:13   ` Peter Xu [this message]
2025-04-30 10:55     ` Thomas Huth
2025-04-29 15:21 ` [PATCH 2/4] scripts/vmstate-static-checker.py: Allow new name for ghes_addr_le field Thomas Huth
2025-04-29 22:16   ` Peter Xu
2025-04-29 15:21 ` [PATCH 3/4] tests/data/vmstate-static-checker: Add dump files from QEMU 7.2.17 Thomas Huth
2025-04-29 22:30   ` Peter Xu
2025-04-30 11:13     ` Thomas Huth
2025-04-30 15:46       ` Peter Xu
2025-04-29 15:21 ` [PATCH 4/4] tests/functional: Test with scripts/vmstate-static-checker.py Thomas Huth
2025-04-30 16:10   ` Pierrick Bouvier
2025-05-01 14:28     ` Peter Xu
2025-05-01 15:58       ` Pierrick Bouvier
2025-05-06 22:05         ` Peter Xu

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=aBFO7DcBWYpOp0-Y@x1.local \
    --to=peterx@redhat.com \
    --cc=farosas@suse.de \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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 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.