[LTP] 答复: [PATCH] kernel/syscalls: Use SAFE_OPEN() instead of calling system API functions

xieziyao xieziyao@huawei.com
Thu Mar 18 07:44:28 CET 2021


I'll send a new patch to fix it. Thanks!

-----邮件原件-----
发件人: xuyang2018.jy@fujitsu.com [mailto:xuyang2018.jy@fujitsu.com] 
发送时间: 2021年3月18日 14:35
收件人: xieziyao <xieziyao@huawei.com>
抄送: ltp@lists.linux.it
主题: RE: [LTP] [PATCH] kernel/syscalls: Use SAFE_OPEN() instead of calling system API functions

Hi Xie
>--- a/testcases/kernel/syscalls/fsconfig/fsconfig02.c
>+++ b/testcases/kernel/syscalls/fsconfig/fsconfig02.c
>@@ -55,9 +55,7 @@ static void setup(void)
> 	if (fd == -1)
> 		tst_brk(TBROK | TTERRNO, "fsopen() failed");
>
>-	temp_fd = open("testfile", O_RDWR | O_CREAT, 01444);
>-	if (temp_fd == -1)
>-		tst_brk(TBROK, "Can't obtain temp_fd, open() failed");
>+	fd = SAFE_OPEN("testfile", O_RDWR | O_CREAT, 01444);
> }

Here has a typo. We should use temp_fd instead of fd.
Other than this, it looks good to me.

Reviewed-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp




More information about the ltp mailing list