public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/copy_file_range02: correct wrong loop_devn judgment
@ 2019-08-02  2:26 Yang Xu
  2019-08-02  2:46 ` Xiao Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Xu @ 2019-08-02  2:26 UTC (permalink / raw)
  To: ltp

We should open dev_path when loop_devn is not equal to -1.
Since Amir has pointed this obvious error on v6, I forgot it.
Sorry for everyone.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Cc: Amir Goldstein <amir73il@gmail.com>
---
 testcases/kernel/syscalls/copy_file_range/copy_file_range02.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c
index 36976156e..26bfa008a 100644
--- a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c
+++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c
@@ -180,7 +180,7 @@ static void setup(void)
 	fd_immutable = SAFE_OPEN(FILE_IMMUTABLE_PATH, O_RDWR | O_CREAT, 0664);
 	fd_swapfile = SAFE_OPEN(FILE_SWAP_PATH, O_RDWR | O_CREAT, 0600);
 
-	if (loop_devn == -1)
+	if (loop_devn != -1)
 		fd_blkdev = SAFE_OPEN(dev_path, O_RDWR, 0600);
 
 	fd_chrdev = SAFE_OPEN(FILE_CHRDEV, O_RDWR, 0600);
-- 
2.18.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [LTP] [PATCH] syscalls/copy_file_range02: correct wrong loop_devn judgment
  2019-08-02  2:26 [LTP] [PATCH] syscalls/copy_file_range02: correct wrong loop_devn judgment Yang Xu
@ 2019-08-02  2:46 ` Xiao Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Xiao Yang @ 2019-08-02  2:46 UTC (permalink / raw)
  To: ltp

On 2019/08/02 10:26, Yang Xu wrote:
> We should open dev_path when loop_devn is not equal to -1.
> Since Amir has pointed this obvious error on v6, I forgot it.
> Sorry for everyone.
Hi Xu,

Pushed, thanks.

Best Regards,
Xiao Yang



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-02  2:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-02  2:26 [LTP] [PATCH] syscalls/copy_file_range02: correct wrong loop_devn judgment Yang Xu
2019-08-02  2:46 ` Xiao Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox