1 Star 0 Fork 38

EulerOSWander/criu

forked from src-openEuler/criu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0065-zdtm-print-errno-info-when-accessing-.out-failure.patch 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
river 提交于 2022-04-13 15:05 +08:00 . criu: backport kinds of features/bugfix
From d17aedda384cfe6940b9948f4db36643495e0375 Mon Sep 17 00:00:00 2001
From: "fu.lin" <fulin10@huawei.com>
Date: Tue, 15 Feb 2022 11:31:27 +0800
Subject: [PATCH 65/72] zdtm: print errno info when accessing *.out failure
The line `Output file *.out appears to exist, aborting` is confusing.
The one common reason is permission denied because of the test desc
is lack of suid flag. The zdtm.py will set `ZDTM_UID` and `ZDTM_GID`,
the function `test_init()` (in `zdtm/lib/test.c`) will change tester
itself to that uid and gid if no suid flag.
Here print the errno when access *.out failed.
Signed-off-by: fu.lin <fulin10@huawei.com>
---
test/zdtm/lib/test.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/zdtm/lib/test.c b/test/zdtm/lib/test.c
index 81da81e..471980d 100644
--- a/test/zdtm/lib/test.c
+++ b/test/zdtm/lib/test.c
@@ -74,7 +74,8 @@ static void test_fini(void)
static void setup_outfile(void)
{
if (!access(outfile, F_OK) || errno != ENOENT) {
- fprintf(stderr, "Output file %s appears to exist, aborting\n", outfile);
+ fprintf(stderr, "Output file %s appears to exist, aborting: %s\n",
+ outfile, strerror(errno));
exit(1);
}
--
2.34.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/euleroswander/criu.git
git@gitee.com:euleroswander/criu.git
euleroswander
criu
criu
master

搜索帮助