From 7f6cac0242e50f34b76e8416bc88faa132175328 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 18 Apr 2022 19:08:23 +0200 Subject: [PATCH] fix qemu test --- .../qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json | 1 + tests/test_snapshot.py | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 tests/files/qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json diff --git a/tests/files/qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json b/tests/files/qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json new file mode 100644 index 00000000..e799e166 --- /dev/null +++ b/tests/files/qemu-cc9927a9-55ad-4937-b36b-7185147d9fa9.json @@ -0,0 +1 @@ +{"timestamp": "2022-04-18T08:08:26.056178", "type": "Snapshot", "uuid": "cc9927a9-55ad-4937-b36b-7185147d9fa9", "wbid": "VL0L5", "software": "Workbench", "version": "2022.03.3-alpha", "schema_api": "1.0.0", "data": {"lshw": {"id": "workbench-live", "class": "system", "claimed": true, "handle": "DMI:0100", "description": "Computer", "product": "Standard PC (i440FX + PIIX, 1996)", "vendor": "QEMU", "version": "pc-i440fx-5.2", "width": 64, "configuration": {"boot": "normal"}, "capabilities": {"smbios-2.8": "SMBIOS version 2.8", "dmi-2.8": "DMI version 2.8", "vsyscall32": "32-bit processes"}, "children": [{"id": "core", "class": "bus", "claimed": true, "description": "Motherboard", "physid": "0", "children": [{"id": "firmware", "class": "memory", "claimed": true, "description": "BIOS", "vendor": "SeaBIOS", "physid": "0", "version": "?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31", "date": "04/01/2014", "units": "bytes", "size": 98304}, {"id": "cpu", "class": "processor", "claimed": true, "handle": "DMI:0400", "description": "CPU", "product": "QEMU Virtual CPU version 2.5+", "vendor": "Advanced Micro Devices [AMD]", "physid": "400", "businfo": "cpu@0", "version": "6.6.3", "slot": "CPU 0", "units": "Hz", "size": 2000000000, "capacity": 2000000000, "width": 64, "configuration": {"cores": "1", "enabledcores": "1", "microcode": "16777317", "threads": "1"}, "capabilities": {"fpu": "mathematical co-processor", "fpu_exception": "FPU exceptions reporting", "wp": true, "de": "debugging extensions", "pse": "page size extensions", "tsc": "time stamp counter", "msr": "model-specific registers", "pae": "4GB+ memory addressing (Physical Address Extension)", "mce": "machine check exceptions", "cx8": "compare and exchange 8-byte", "apic": "on-chip advanced programmable interrupt controller (APIC)", "sep": "fast system calls", "mtrr": "memory type range registers", "pge": "page global enable", "mca": "machine check architecture", "cmov": "conditional move instruction", "pat": "page attribute table", "pse36": "36-bit page size extensions", "clflush": true, "mmx": "multimedia extensions (MMX)", "fxsr": "fast floating point save/restore", "sse": "streaming SIMD extensions (SSE)", "sse2": "streaming SIMD extensions (SSE2)", "syscall": "fast system calls", "nx": "no-execute bit (NX)", "x86-64": "64bits extensions (x86-64)", "nopl": true, "cpuid": true, "pni": true, "cx16": true, "hypervisor": true, "lahf_lm": true, "svm": true, "3dnowprefetch": true, "vmmcall": true}}, {"id": "memory", "class": "memory", "claimed": true, "handle": "DMI:1000", "description": "System Memory", "physid": "1000", "units": "bytes", "size": 1073741824, "capacity": 1073741824, "configuration": {"errordetection": "multi-bit-ecc"}, "capabilities": {"ecc": "Multi-bit error-correcting code (ECC)"}, "children": [{"id": "bank", "class": "memory", "claimed": true, "handle": "DMI:1100", "description": "DIMM RAM", "vendor": "QEMU", "physid": "0", "slot": "DIMM 0", "units": "bytes", "size": 1073741824}]}, {"id": "pci", "class": "bridge", "claimed": true, "handle": "PCIBUS:0000:00", "description": "Host bridge", "product": "440FX - 82441FX PMC [Natoma]", "vendor": "Intel Corporation", "physid": "100", "businfo": "pci@0000:00:00.0", "version": "02", "width": 32, "clock": 33000000, "children": [{"id": "isa", "class": "bridge", "claimed": true, "handle": "PCI:0000:00:01.0", "description": "ISA bridge", "product": "82371SB PIIX3 ISA [Natoma/Triton II]", "vendor": "Intel Corporation", "physid": "1", "businfo": "pci@0000:00:01.0", "version": "00", "width": 32, "clock": 33000000, "configuration": {"latency": "0"}, "capabilities": {"isa": true}, "children": [{"id": "pnp00:00", "class": "input", "claimed": true, "product": "PnP device PNP0303", "physid": "0", "configuration": {"driver": "i8042 kbd"}, "capabilities": {"pnp": true}}, {"id": "pnp00:01", "class": "input", "claimed": true, "product": "PnP device PNP0f13", "physid": "1", "configuration": {"driver": "i8042 aux"}, "capabilities": {"pnp": true}}, {"id": "pnp00:02", "class": "storage", "claimed": true, "product": "PnP device PNP0700", "physid": "2", "capabilities": {"pnp": true}}, {"id": "pnp00:03", "class": "printer", "claimed": true, "product": "PnP device PNP0400", "physid": "3", "configuration": {"driver": "parport_pc"}, "capabilities": {"pnp": true}}, {"id": "pnp00:04", "class": "communication", "claimed": true, "product": "PnP device PNP0501", "physid": "4", "configuration": {"driver": "serial"}, "capabilities": {"pnp": true}}, {"id": "pnp00:05", "class": "system", "claimed": true, "product": "PnP device PNP0b00", "physid": "5", "configuration": {"driver": "rtc_cmos"}, "capabilities": {"pnp": true}}]}, {"id": "ide", "class": "storage", "claimed": true, "handle": "PCI:0000:00:01.1", "description": "IDE interface", "product": "82371SB PIIX3 IDE [Natoma/Triton II]", "vendor": "Intel Corporation", "physid": "1.1", "businfo": "pci@0000:00:01.1", "logicalname": ["scsi0", "scsi1"], "version": "00", "width": 32, "clock": 33000000, "configuration": {"driver": "ata_piix", "latency": "0"}, "capabilities": {"ide": true, "isa_compat_mode": "ISA compatibility mode", "bus_master": "bus mastering", "emulated": "Emulated device"}, "children": [{"id": "disk", "class": "disk", "claimed": true, "handle": "SCSI:00:00:00:00", "description": "ATA Disk", "product": "QEMU HARDDISK", "physid": "0", "businfo": "scsi@0:0.0.0", "logicalname": "/dev/sda", "dev": "8:0", "version": "2.5+", "serial": "QM00001", "units": "bytes", "size": 42949673472, "configuration": {"ansiversion": "5", "logicalsectorsize": "512", "sectorsize": "512", "signature": "c338ebd4"}, "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"id": "volume:0", "class": "volume", "claimed": true, "description": "EXT4 volume", "vendor": "Linux", "physid": "1", "businfo": "scsi@0:0.0.0,1", "logicalname": "/dev/sda1", "dev": "8:1", "version": "1.0", "serial": "666140b3-42b9-4940-8d82-7d894261231f", "size": 4293918720, "capacity": 4293918720, "configuration": {"created": "2020-09-18 18:01:52", "filesystem": "ext4", "lastmountpoint": "/", "modified": "2022-04-18 08:06:53", "mounted": "2022-04-18 08:06:53", "state": "clean"}, "capabilities": {"primary": "Primary partition", "bootable": "Bootable partition (active)", "journaled": true, "extended_attributes": "Extended Attributes", "large_files": "4GB+ files", "huge_files": "16TB+ files", "dir_nlink": "directories with 65000+ subdirs", "64bit": "64bit filesystem", "extents": "extent-based allocation", "ext4": true, "ext2": "EXT2/EXT3", "initialized": "initialized volume"}}, {"id": "volume:1", "class": "volume", "claimed": true, "description": "Extended partition", "physid": "2", "businfo": "scsi@0:0.0.0,2", "logicalname": "/dev/sda2", "dev": "8:2", "size": 38652609536, "capacity": 38652609536, "capabilities": {"primary": "Primary partition", "extended": "Extended partition", "partitioned": "Partitioned disk", "partitioned:extended": "Extended partition"}, "children": [{"id": "logicalvolume:0", "class": "volume", "claimed": true, "description": "Linux swap volume", "physid": "5", "logicalname": "/dev/sda5", "dev": "8:5", "version": "1", "serial": "5149082d-e5ab-4ccb-b75d-52a8b4da4fc8", "size": 4292870144, "capacity": 4292870144, "configuration": {"filesystem": "swap", "pagesize": "4096"}, "capabilities": {"nofs": "No filesystem", "swap": "Linux swap", "initialized": "initialized volume"}}, {"id": "logicalvolume:1", "class": "volume", "claimed": true, "description": "EXT4 volume", "vendor": "Linux", "physid": "6", "logicalname": "/dev/sda6", "dev": "8:6", "version": "1.0", "serial": "cc4fd343-e6f4-4376-937e-f5d2fbcb48c7", "size": 34358689792, "capacity": 34358689792, "configuration": {"created": "2022-04-01 09:25:42", "filesystem": "ext4", "lastmountpoint": "/", "modified": "2022-04-18 08:06:56", "mounted": "2022-04-18 08:06:56", "state": "clean"}, "capabilities": {"journaled": true, "extended_attributes": "Extended Attributes", "large_files": "4GB+ files", "huge_files": "16TB+ files", "dir_nlink": "directories with 65000+ subdirs", "64bit": "64bit filesystem", "extents": "extent-based allocation", "ext4": true, "ext2": "EXT2/EXT3", "initialized": "initialized volume"}}]}]}, {"id": "cdrom", "class": "disk", "claimed": true, "handle": "SCSI:01:00:00:00", "description": "DVD reader", "product": "QEMU DVD-ROM", "vendor": "QEMU", "physid": "1", "businfo": "scsi@1:0.0.0", "logicalname": ["/dev/cdrom", "/dev/dvd", "/dev/sr0", "/run/live/persistence/sr0", "/usr/lib/live/mount/persistence/sr0"], "dev": "11:0", "version": "2.5+", "configuration": {"ansiversion": "5", "mount.fstype": "iso9660", "mount.options": "ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8", "state": "mounted", "status": "ready"}, "capabilities": {"removable": "support is removable", "audio": "Audio CD playback", "dvd": "DVD playback"}, "children": [{"id": "medium", "class": "disk", "claimed": true, "physid": "0", "logicalname": ["/dev/cdrom", "/run/live/persistence/sr0", "/usr/lib/live/mount/persistence/sr0"], "dev": "11:0", "configuration": {"mount.fstype": "iso9660", "mount.options": "ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8", "signature": "528cd03d", "state": "mounted"}, "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"id": "volume", "class": "volume", "description": "Windows FAT volume", "vendor": "mkfs.fat", "physid": "2", "version": "FAT16", "serial": "31d5-6be2", "size": 18446744073709549568, "configuration": {"FATs": "2", "filesystem": "fat"}, "capabilities": {"primary": "Primary partition", "boot": "Contains boot code", "fat": "Windows FAT", "initialized": "initialized volume"}}]}]}]}, {"id": "bridge", "class": "bridge", "claimed": true, "handle": "PCI:0000:00:01.3", "description": "Bridge", "product": "82371AB/EB/MB PIIX4 ACPI", "vendor": "Intel Corporation", "physid": "1.3", "businfo": "pci@0000:00:01.3", "version": "03", "width": 32, "clock": 33000000, "configuration": {"driver": "piix4_smbus", "latency": "0"}, "capabilities": {"bridge": true}}, {"id": "display", "class": "display", "claimed": true, "handle": "PCI:0000:00:02.0", "description": "VGA compatible controller", "product": "bochs-drmdrmfb", "physid": "2", "businfo": "pci@0000:00:02.0", "logicalname": "/dev/fb0", "version": "02", "width": 32, "clock": 33000000, "configuration": {"depth": "32", "driver": "bochs-drm", "latency": "0", "resolution": "1024,768"}, "capabilities": {"vga_controller": true, "rom": "extension ROM", "fb": "framebuffer"}}, {"id": "network", "class": "network", "claimed": true, "handle": "PCI:0000:00:03.0", "description": "Ethernet interface", "product": "82540EM Gigabit Ethernet Controller", "vendor": "Intel Corporation", "physid": "3", "businfo": "pci@0000:00:03.0", "logicalname": "eth0", "version": "03", "serial": "52:54:00:12:34:56", "units": "bit/s", "size": 1000000000, "capacity": 1000000000, "width": 32, "clock": 33000000, "configuration": {"autonegotiation": "on", "broadcast": "yes", "driver": "e1000", "driverversion": "5.10.0-13-amd64", "duplex": "full", "ip": "10.0.2.15", "latency": "0", "link": "yes", "multicast": "yes", "port": "twisted pair", "speed": "1Gbit/s"}, "capabilities": {"bus_master": "bus mastering", "rom": "extension ROM", "ethernet": true, "physical": "Physical interface", "tp": "twisted pair", "10bt": "10Mbit/s", "10bt-fd": "10Mbit/s (full duplex)", "100bt": "100Mbit/s", "100bt-fd": "100Mbit/s (full duplex)", "1000bt-fd": "1Gbit/s (full duplex)", "autonegotiation": "Auto-negotiation"}}]}]}, {"id": "input:0", "class": "input", "claimed": true, "product": "AT Translated Set 2 keyboard", "physid": "1", "logicalname": ["input0", "/dev/input/event0", "input0::capslock", "input0::numlock", "input0::scrolllock"], "capabilities": {"i8042": "i8042 PC AT keyboard controller"}}, {"id": "input:1", "class": "input", "claimed": true, "product": "Power Button", "physid": "2", "logicalname": ["input2", "/dev/input/event1"], "capabilities": {"platform": true}}, {"id": "input:2", "class": "input", "claimed": true, "product": "ImExPS/2 Generic Explorer Mouse", "physid": "3", "logicalname": ["input3", "/dev/input/event2", "/dev/input/mouse0"], "capabilities": {"i8042": "i8042 PC AT keyboard controller"}}, {"id": "input:3", "class": "input", "claimed": true, "product": "PC Speaker", "physid": "4", "logicalname": ["input4", "/dev/input/event3"], "capabilities": {"isa": "ISA bus"}}]}, "dmidecode": "# dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 2.8 present.\n9 structures occupying 429 bytes.\nTable at 0x000F5AB0.\n\nHandle 0x0000, DMI type 0, 24 bytes\nBIOS Information\n\tVendor: SeaBIOS\n\tVersion: ?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31\n\tRelease Date: 04/01/2014\n\tAddress: 0xE8000\n\tRuntime Size: 96 kB\n\tROM Size: 64 kB\n\tCharacteristics:\n\t\tBIOS characteristics not supported\n\t\tTargeted content distribution is supported\n\tBIOS Revision: 0.0\n\nHandle 0x0100, DMI type 1, 27 bytes\nSystem Information\n\tManufacturer: QEMU\n\tProduct Name: Standard PC (i440FX + PIIX, 1996)\n\tVersion: pc-i440fx-5.2\n\tSerial Number: Not Specified\n\tUUID: Not Settable\n\tWake-up Type: Power Switch\n\tSKU Number: Not Specified\n\tFamily: Not Specified\n\nHandle 0x0300, DMI type 3, 22 bytes\nChassis Information\n\tManufacturer: QEMU\n\tType: Other\n\tLock: Not Present\n\tVersion: pc-i440fx-5.2\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tBoot-up State: Safe\n\tPower Supply State: Safe\n\tThermal State: Safe\n\tSecurity Status: Unknown\n\tOEM Information: 0x00000000\n\tHeight: Unspecified\n\tNumber Of Power Cords: Unspecified\n\tContained Elements: 0\n\tSKU Number: Not Specified\n\nHandle 0x0400, DMI type 4, 42 bytes\nProcessor Information\n\tSocket Designation: CPU 0\n\tType: Central Processor\n\tFamily: Other\n\tManufacturer: QEMU\n\tID: 63 06 00 00 FD FB 8B 07\n\tVersion: pc-i440fx-5.2\n\tVoltage: Unknown\n\tExternal Clock: Unknown\n\tMax Speed: 2000 MHz\n\tCurrent Speed: 2000 MHz\n\tStatus: Populated, Enabled\n\tUpgrade: Other\n\tL1 Cache Handle: Not Provided\n\tL2 Cache Handle: Not Provided\n\tL3 Cache Handle: Not Provided\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tPart Number: Not Specified\n\tCore Count: 1\n\tCore Enabled: 1\n\tThread Count: 1\n\tCharacteristics: None\n\nHandle 0x1000, DMI type 16, 23 bytes\nPhysical Memory Array\n\tLocation: Other\n\tUse: System Memory\n\tError Correction Type: Multi-bit ECC\n\tMaximum Capacity: 1 GB\n\tError Information Handle: Not Provided\n\tNumber Of Devices: 1\n\nHandle 0x1100, DMI type 17, 40 bytes\nMemory Device\n\tArray Handle: 0x1000\n\tError Information Handle: Not Provided\n\tTotal Width: Unknown\n\tData Width: Unknown\n\tSize: 1 GB\n\tForm Factor: DIMM\n\tSet: None\n\tLocator: DIMM 0\n\tBank Locator: Not Specified\n\tType: RAM\n\tType Detail: Other\n\tSpeed: Unknown\n\tManufacturer: QEMU\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tPart Number: Not Specified\n\tRank: Unknown\n\tConfigured Memory Speed: Unknown\n\tMinimum Voltage: Unknown\n\tMaximum Voltage: Unknown\n\tConfigured Voltage: Unknown\n\nHandle 0x1300, DMI type 19, 31 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x0003FFFFFFF\n\tRange Size: 1 GB\n\tPhysical Array Handle: 0x1000\n\tPartition Width: 1\n\nHandle 0x2000, DMI type 32, 11 bytes\nSystem Boot Information\n\tStatus: No errors detected\n\nHandle 0x7F00, DMI type 127, 4 bytes\nEnd Of Table\n\n", "lspci": "00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)\n\tSubsystem: Red Hat, Inc. Qemu virtual machine\n\tControl: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR-