* [LTP] [PATCH] ioctl/ioctl_ns*: Move the SAFE_CLOSE to the suitable location
@ 2022-03-22 6:37 Zhao Gongyi via ltp
2022-03-22 17:00 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Zhao Gongyi via ltp @ 2022-03-22 6:37 UTC (permalink / raw)
To: ltp
If we run the test with the option -i 10000, and the ulimit
of open files little than 10000, the test would fail and report
error of EMFILE.
Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
testcases/kernel/syscalls/ioctl/ioctl_ns01.c | 2 +-
testcases/kernel/syscalls/ioctl/ioctl_ns02.c | 2 +-
testcases/kernel/syscalls/ioctl/ioctl_ns03.c | 2 +-
testcases/kernel/syscalls/ioctl/ioctl_ns04.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ns01.c b/testcases/kernel/syscalls/ioctl/ioctl_ns01.c
index 36d2b3b67..f01dd020f 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_ns01.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_ns01.c
@@ -58,9 +58,9 @@ static void test_ns_get_parent(void)
else
tst_res(TFAIL | TERRNO, "unexpected ioctl error");
} else {
- SAFE_CLOSE(fd);
tst_res(TFAIL, "call to ioctl succeded");
}
+ SAFE_CLOSE(fd);
}
static int child(void *arg LTP_ATTRIBUTE_UNUSED)
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ns02.c b/testcases/kernel/syscalls/ioctl/ioctl_ns02.c
index 33ef757a8..e63b56859 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_ns02.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_ns02.c
@@ -40,9 +40,9 @@ static void run(void)
else
tst_res(TFAIL | TERRNO, "unexpected ioctl error");
} else {
- SAFE_CLOSE(fd);
tst_res(TFAIL, "call to ioctl succeded");
}
+ SAFE_CLOSE(fd);
}
static struct tst_test test = {
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ns03.c b/testcases/kernel/syscalls/ioctl/ioctl_ns03.c
index 279032d20..8464bcd07 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_ns03.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_ns03.c
@@ -43,9 +43,9 @@ static void run(void)
else
tst_res(TFAIL | TERRNO, "unexpected ioctl error");
} else {
- SAFE_CLOSE(fd);
tst_res(TFAIL, "call to ioctl succeded");
}
+ SAFE_CLOSE(fd);
}
static struct tst_test test = {
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ns04.c b/testcases/kernel/syscalls/ioctl/ioctl_ns04.c
index 90035cbeb..a3923f485 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_ns04.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_ns04.c
@@ -39,9 +39,9 @@ static void run(void)
else
tst_res(TFAIL | TERRNO, "unexpected ioctl error");
} else {
- SAFE_CLOSE(fd);
tst_res(TFAIL, "call to ioctl succeded");
}
+ SAFE_CLOSE(fd);
}
static struct tst_test test = {
--
2.17.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] ioctl/ioctl_ns*: Move the SAFE_CLOSE to the suitable location
2022-03-22 6:37 [LTP] [PATCH] ioctl/ioctl_ns*: Move the SAFE_CLOSE to the suitable location Zhao Gongyi via ltp
@ 2022-03-22 17:00 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2022-03-22 17:00 UTC (permalink / raw)
To: Zhao Gongyi; +Cc: ltp
Hi Zhao,
> If we run the test with the option -i 10000, and the ulimit
> of open files little than 10000, the test would fail and report
> error of EMFILE.
Thanks, merged!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-22 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 6:37 [LTP] [PATCH] ioctl/ioctl_ns*: Move the SAFE_CLOSE to the suitable location Zhao Gongyi via ltp
2022-03-22 17:00 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.