|
|
1bb595 |
From e58853f9ce63fae0c8b219b79be65c760a2f3e7e Mon Sep 17 00:00:00 2001
|
|
|
1bb595 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
1bb595 |
Date: Fri, 5 Jun 2020 13:57:59 +0200
|
|
|
1bb595 |
Subject: [PATCH] DEBUG: use new exec_child(_ex) interface in tests
|
|
|
1bb595 |
|
|
|
1bb595 |
Resolves: https://github.com/SSSD/sssd/issues/4667
|
|
|
1bb595 |
|
|
|
1bb595 |
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
|
|
|
1bb595 |
---
|
|
|
1bb595 |
src/tests/cmocka/test_child_common.c | 10 +++++-----
|
|
|
1bb595 |
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
1bb595 |
|
|
|
1bb595 |
diff --git a/src/tests/cmocka/test_child_common.c b/src/tests/cmocka/test_child_common.c
|
|
|
1bb595 |
index 5cf460b50..87cae3405 100644
|
|
|
1bb595 |
--- a/src/tests/cmocka/test_child_common.c
|
|
|
1bb595 |
+++ b/src/tests/cmocka/test_child_common.c
|
|
|
1bb595 |
@@ -97,7 +97,7 @@ void test_exec_child(void **state)
|
|
|
1bb595 |
exec_child(child_tctx,
|
|
|
1bb595 |
child_tctx->pipefd_to_child,
|
|
|
1bb595 |
child_tctx->pipefd_from_child,
|
|
|
1bb595 |
- CHILD_DIR"/"TEST_BIN, 2);
|
|
|
1bb595 |
+ CHILD_DIR"/"TEST_BIN, NULL);
|
|
|
1bb595 |
} else {
|
|
|
1bb595 |
do {
|
|
|
1bb595 |
errno = 0;
|
|
|
1bb595 |
@@ -168,7 +168,7 @@ static void extra_args_test(struct child_test_ctx *child_tctx,
|
|
|
1bb595 |
exec_child_ex(child_tctx,
|
|
|
1bb595 |
child_tctx->pipefd_to_child,
|
|
|
1bb595 |
child_tctx->pipefd_from_child,
|
|
|
1bb595 |
- CHILD_DIR"/"TEST_BIN, 2, extra_args,
|
|
|
1bb595 |
+ CHILD_DIR"/"TEST_BIN, NULL, extra_args,
|
|
|
1bb595 |
extra_args_only,
|
|
|
1bb595 |
STDIN_FILENO, STDOUT_FILENO);
|
|
|
1bb595 |
} else {
|
|
|
1bb595 |
@@ -291,7 +291,7 @@ void test_exec_child_handler(void **state)
|
|
|
1bb595 |
exec_child(child_tctx,
|
|
|
1bb595 |
child_tctx->pipefd_to_child,
|
|
|
1bb595 |
child_tctx->pipefd_from_child,
|
|
|
1bb595 |
- CHILD_DIR"/"TEST_BIN, 2);
|
|
|
1bb595 |
+ CHILD_DIR"/"TEST_BIN, NULL);
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
ret = child_handler_setup(child_tctx->test_ctx->ev, child_pid,
|
|
|
1bb595 |
@@ -341,7 +341,7 @@ void test_exec_child_echo(void **state)
|
|
|
1bb595 |
exec_child_ex(child_tctx,
|
|
|
1bb595 |
child_tctx->pipefd_to_child,
|
|
|
1bb595 |
child_tctx->pipefd_from_child,
|
|
|
1bb595 |
- CHILD_DIR"/"TEST_BIN, 2, NULL, false,
|
|
|
1bb595 |
+ CHILD_DIR"/"TEST_BIN, NULL, NULL, false,
|
|
|
1bb595 |
STDIN_FILENO, 3);
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
@@ -474,7 +474,7 @@ void test_sss_child(void **state)
|
|
|
1bb595 |
exec_child(child_tctx,
|
|
|
1bb595 |
child_tctx->pipefd_to_child,
|
|
|
1bb595 |
child_tctx->pipefd_from_child,
|
|
|
1bb595 |
- CHILD_DIR"/"TEST_BIN, 2);
|
|
|
1bb595 |
+ CHILD_DIR"/"TEST_BIN, NULL);
|
|
|
1bb595 |
}
|
|
|
1bb595 |
|
|
|
1bb595 |
ret = sss_child_register(child_tctx, sc_ctx,
|
|
|
1bb595 |
--
|
|
|
1bb595 |
2.21.3
|
|
|
1bb595 |
|