代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。