From 36b7b7dad7333443f744ee3524eda608ce271935 Mon Sep 17 00:00:00 2001 From: qiyinxi Date: Fri, 13 Nov 2026 15:16:40 +0100 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=9ATestPollTakesGuestAr?= =?UTF-8?q?chFromListedConfig=20=E6=AF=94=E8=BE=83=E5=89=8D=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=89=A9=E4=BD=99=E7=A3=81=E7=9B=98=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=86=8D=E5=81=B6=E5=8F=91=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/emu/status_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/emu/status_test.go b/internal/emu/status_test.go index f698358..3b9b17b 100644 --- a/internal/emu/status_test.go +++ b/internal/emu/status_test.go @@ -85,8 +85,12 @@ func TestPollTakesGuestArchFromListedConfig(t *testing.T) { if err != nil || len(list.Instances) != 1 { t.Fatalf("%s: list: %+v %v", label, list, err) } - a, _ := json.Marshal(info) - b, _ := json.Marshal(list.Instances[0]) + // host_free_bytes is the host disk's free space at that moment: anything writing to the disk between two + // reads changes it (CI failed on it), and it has nothing to do with what this test compares + in, li := *info, list.Instances[0] + in.DataSpace.HostFreeBytes, li.DataSpace.HostFreeBytes = 0, 0 + a, _ := json.Marshal(in) + b, _ := json.Marshal(li) if string(a) != string(b) { t.Fatalf("%s: info and list differ:\n%s\n%s", label, a, b) }