libvirt/test-commandtest-skip-the-test4-if-the-testcase-is-r.patch
Jiabo Feng 307ea8abab libvirt update to version 9.10.0-4:
- docs: Document CPU clusters
- docs: Improve documentation for CPU topology
- tests: Verify handling of CPU clusters in QMP data
- qemu: Make monitor aware of CPU clusters
- qemu: Use CPU clusters for guests
- qemu: Introduce QEMU_CAPS_SMP_CLUSTERS
- conf: Allow specifying CPU clusters
- conf: Report CPU clusters in capabilities XML
- tests: Add hostcpudata for machine with CPU clusters
- cpu_map: add kunpeng-920 features to arm features
- cpu/aarch64: enable host-model cpu for AArch64 architecture
- conf/domain_conf: pin the retry_interval and retry_timeout parameters to xml
- nodedev: fix potential heap use after free
- libvirt/conf: Set default values of retry fileds
- qemu: Support 'retry' BLOCK_IO_ERROR event.
- libvirt: Add 'retry' support for error policy
- vdpa: support vdpa device migrate
- vdpa: support vdpa device hot plug/unplug
- hostdev:Introduce vDPA device to hostdev subsystem as a new subtype
- node_device: fix leak of DIR*
- migration/multifd-pin: support migration multifd thread pin
- migration/multifd-pin: add qemu monitor callback functions
- migration/migration-pin: add domainMigrationPid for qemuMonitorCallbacks
- migration/migration-pin: add migrationpin for migration parameters
- migration/migration-pin: add qemu monitor callback functions
- migration/migration-pin:add some migration/multiFd params
- qemu: add pointer check in qemuMonitorLastError
- qemu: fix a concurrent operation situation
- test/commandtest: skip the test4 if the testcase is run in the container env

Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
2024-04-02 20:56:45 +08:00

47 lines
1.4 KiB
Diff

From de724c7b94cfd8049efed6349acf9e0fb643f289 Mon Sep 17 00:00:00 2001
From: AlexChen <alex.chen@huawei.com>
Date: Wed, 27 Mar 2024 05:20:21 +0800
Subject: [PATCH] test/commandtest: skip the test4 if the testcase is run in
the container env
In a container environment without an init thread, the daemoned
process is not reclaimed, and Test4 loops forever, causing
the compilation to hung. So, skip it.
Signed-off-by: AlexChen <alex.chen@huawei.com>
---
tests/commandtest.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/commandtest.c b/tests/commandtest.c
index aa108ce583..1adfc9de7f 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -211,6 +211,7 @@ static int test4(const void *unused G_GNUC_UNUSED)
g_autofree char *pidfile = virPidFileBuildPath(abs_builddir, "commandhelper");
pid_t pid;
int ret = -1;
+ int count = 0;
if (!pidfile)
goto cleanup;
@@ -227,8 +228,13 @@ static int test4(const void *unused G_GNUC_UNUSED)
printf("cannot read pidfile\n");
goto cleanup;
}
- while (kill(pid, 0) != -1)
- g_usleep(100*1000);
+ while (kill(pid, 0) != -1) {
+ if (count++ >= 600) {
+ printf("check time exceeds 60s, it may be in container env, skip this testcase!!!\n");
+ break;
+ }
+ g_usleep(100*1000); /* 100 */
+ }
ret = checkoutput("test4");
--
2.27.0