[LTP] [PATCH 3/4] correct order of parameters in SAFE_WRITE()
Jan Stancek
jstancek@redhat.com
Wed Oct 5 16:25:44 CEST 2022
And use new enum.
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
testcases/kernel/containers/pidns/pidns13.c | 2 +-
testcases/kernel/containers/userns/userns08.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/containers/pidns/pidns13.c b/testcases/kernel/containers/pidns/pidns13.c
index bdc1097fd7d3..39fd6df7f4c4 100644
--- a/testcases/kernel/containers/pidns/pidns13.c
+++ b/testcases/kernel/containers/pidns/pidns13.c
@@ -96,7 +96,7 @@ static void child_fn(unsigned int cinit_no)
SAFE_CLOSE(pipe_fd[0]);
TST_CHECKPOINT_WAIT(1);
- SAFE_WRITE(pipe_fd[1], 1, "test\n", 5);
+ SAFE_WRITE(SAFE_WRITE_ALL, pipe_fd[1], "test\n", 5);
}
exit(0);
diff --git a/testcases/kernel/containers/userns/userns08.c b/testcases/kernel/containers/userns/userns08.c
index bde944f224ba..0f1cb54a9dfe 100644
--- a/testcases/kernel/containers/userns/userns08.c
+++ b/testcases/kernel/containers/userns/userns08.c
@@ -118,7 +118,7 @@ static void setup(void)
{
int fd = SAFE_OPEN("restricted", O_CREAT | O_WRONLY, 0700);
- SAFE_WRITE(fd, 1, "\n", 1);
+ SAFE_WRITE(SAFE_WRITE_ALL, fd, "\n", 1);
SAFE_CLOSE(fd);
SAFE_TRY_FILE_PRINTF("/proc/sys/user/max_user_namespaces", "%d", 10);
--
2.27.0
More information about the ltp
mailing list