diff options
author | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2009-09-01 07:16:57 +0000 |
---|---|---|
committer | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2009-09-01 07:16:57 +0000 |
commit | d2c8467f461e82c1333ac95a495f368922f63404 (patch) | |
tree | fb7e5a16454d44ae0bdef2a6b25786d4b8d9272b | |
parent | 792013f98026a1031313e4856c5627ec30b50a9e (diff) | |
download | libapr-d2c8467f461e82c1333ac95a495f368922f63404.tar.gz |
Backport r809854 from the trunk.
Pass environment to children in testsock, testshm and testproc.
Further fixes for PR 47590.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@809860 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | test/testproc.c | 4 | ||||
-rw-r--r-- | test/testshm.c | 8 | ||||
-rw-r--r-- | test/testsock.c | 3 |
4 files changed, 17 insertions, 2 deletions
@@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes for APR 1.3.9 + *) Pass default environment to testsock, testshm and testproc children, so + that tests run when APR is compiled with Intel C Compiler. + [Bojan Smojver] + *) Fix error handling in the Solaris pollset support (Event Port backend). PR 47645. [Jeff Trawick] diff --git a/test/testproc.c b/test/testproc.c index 4791b9281..5cf768f1e 100644 --- a/test/testproc.c +++ b/test/testproc.c @@ -44,7 +44,7 @@ static void test_create_proc(abts_case *tc, void *data) rv = apr_procattr_dir_set(attr, "data"); ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); - rv = apr_procattr_cmdtype_set(attr, APR_PROGRAM); + rv = apr_procattr_cmdtype_set(attr, APR_PROGRAM_ENV); ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); args[0] = "proc_child" EXTENSION; @@ -120,7 +120,7 @@ static void test_file_redir(abts_case *tc, void *data) ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); rv = apr_procattr_dir_set(attr, "data"); ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); - rv = apr_procattr_cmdtype_set(attr, APR_PROGRAM); + rv = apr_procattr_cmdtype_set(attr, APR_PROGRAM_ENV); ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); args[0] = "proc_child"; diff --git a/test/testshm.c b/test/testshm.c index ab9b76c21..6c192f290 100644 --- a/test/testshm.c +++ b/test/testshm.c @@ -185,6 +185,10 @@ static void test_named(abts_case *tc, void *data) rv = apr_procattr_create(&attr1, p); ABTS_PTR_NOTNULL(tc, attr1); APR_ASSERT_SUCCESS(tc, "Couldn't create attr1", rv); + + rv = apr_procattr_cmdtype_set(attr1, APR_PROGRAM_ENV); + APR_ASSERT_SUCCESS(tc, "Couldn't set copy environment", rv); + args[0] = apr_pstrdup(p, "testshmproducer" EXTENSION); args[1] = NULL; rv = apr_proc_create(&pidproducer, TESTBINPATH "testshmproducer" EXTENSION, args, @@ -194,6 +198,10 @@ static void test_named(abts_case *tc, void *data) rv = apr_procattr_create(&attr2, p); ABTS_PTR_NOTNULL(tc, attr2); APR_ASSERT_SUCCESS(tc, "Couldn't create attr2", rv); + + rv = apr_procattr_cmdtype_set(attr2, APR_PROGRAM_ENV); + APR_ASSERT_SUCCESS(tc, "Couldn't set copy environment", rv); + args[0] = apr_pstrdup(p, "testshmconsumer" EXTENSION); rv = apr_proc_create(&pidconsumer, TESTBINPATH "testshmconsumer" EXTENSION, args, NULL, attr2, p); diff --git a/test/testsock.c b/test/testsock.c index 51a82e41a..50aef5c2b 100644 --- a/test/testsock.c +++ b/test/testsock.c @@ -40,6 +40,9 @@ static void launch_child(abts_case *tc, apr_proc_t *proc, const char *arg1, apr_ rv = apr_procattr_error_check_set(procattr, 1); APR_ASSERT_SUCCESS(tc, "Couldn't set error check in procattr", rv); + rv = apr_procattr_cmdtype_set(procattr, APR_PROGRAM_ENV); + APR_ASSERT_SUCCESS(tc, "Couldn't set copy environment", rv); + args[0] = "sockchild" EXTENSION; args[1] = arg1; args[2] = NULL; |