[LTP] [COMMITTED] [PATCH 05/13] Make use of SAFE_PIPE()
Cyril Hrubis
chrubis@suse.cz
Tue Oct 3 17:40:52 CEST 2017
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/containers/pidns/pidns05.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/containers/pidns/pidns05.c b/testcases/kernel/containers/pidns/pidns05.c
index cdcf76a14..8462243cd 100644
--- a/testcases/kernel/containers/pidns/pidns05.c
+++ b/testcases/kernel/containers/pidns/pidns05.c
@@ -49,6 +49,7 @@
#include <errno.h>
#include "pidns_helper.h"
#include "test.h"
+#include "safe_macros.h"
#define INIT_PID 1
#define CINIT_PID 1
@@ -230,9 +231,7 @@ int main(int argc, char *argv[])
pid = getpid();
pgid = getpgid(pid);
- ret = pipe(fd);
- if (ret == -1)
- tst_brkm(TBROK | TERRNO, NULL, "pipe failed");
+ SAFE_PIPE(NULL, fd);
TEST(do_clone_unshare_test(T_CLONE, CLONE_NEWPID,
create_nested_container, (void *)&count));
--
2.13.5
More information about the ltp
mailing list