mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-11 11:10:54 +02:00
bwrap tweaks:
in scripts/ocsp.test, don't call ping.test when $AM_BWRAPPED = yes (ping is setuid, so fails under bwrap);
in scripts/unit.test.in, don't bwrap if $AM_BWRAPPED = yes (double-bwrapping always fails);
in testsuite/testsuite.c testsuite_test(), build tempName using tempDir, and try to assign tempDir from XGETENV("TMPDIR"), fallback to hardcoded "/tmp".
This commit is contained in:
+17
-8
@@ -26,11 +26,15 @@ OUTPUT=$(eval "./examples/client/client -S check")
|
||||
if [ "$OUTPUT" = "SNI is: ON" ]; then
|
||||
printf '\n\n%s\n\n' "SNI is on, proceed with globalsign test"
|
||||
|
||||
# is our desired server there?
|
||||
"${SCRIPT_DIR}/ping.test" $server 2
|
||||
RESULT=$?
|
||||
if [ $RESULT -ne 0 ]; then
|
||||
GL_UNREACHABLE=1
|
||||
if [ "$AM_BWRAPPED" != "yes" ]; then
|
||||
# is our desired server there?
|
||||
"${SCRIPT_DIR}/ping.test" $server 2
|
||||
RESULT=$?
|
||||
if [ $RESULT -ne 0 ]; then
|
||||
GL_UNREACHABLE=1
|
||||
fi
|
||||
else
|
||||
RESULT=0
|
||||
fi
|
||||
|
||||
if [ $RESULT -eq 0 ]; then
|
||||
@@ -50,9 +54,14 @@ fi
|
||||
server=www.google.com
|
||||
ca=${SCRIPT_DIR}/../certs/external/ca-google-root.pem
|
||||
|
||||
# is our desired server there?
|
||||
${SCRIPT_DIR}/ping.test $server 2
|
||||
RESULT=$?
|
||||
if [ "$AM_BWRAPPED" != "yes" ]; then
|
||||
# is our desired server there?
|
||||
${SCRIPT_DIR}/ping.test $server 2
|
||||
RESULT=$?
|
||||
else
|
||||
RESULT=0
|
||||
fi
|
||||
|
||||
if [ $RESULT -eq 0 ]; then
|
||||
# client test against the server
|
||||
echo "./examples/client/client -X -C -h $server -p 443 -A "$ca" -g -o -N"
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
bwrap_path="$(command -v bwrap)"
|
||||
if [ -n "$bwrap_path" ]; then
|
||||
exec "$bwrap_path" --unshare-net --dev-bind / / "@builddir@/tests/unit.test" "$@"
|
||||
if [ "${AM_BWRAPPED-}" != "yes" ]; then
|
||||
bwrap_path="$(command -v bwrap)"
|
||||
if [ -n "$bwrap_path" ]; then
|
||||
exec "$bwrap_path" --unshare-net --dev-bind / / "@builddir@/tests/unit.test" "$@"
|
||||
else
|
||||
exec "@builddir@/tests/unit.test" "$@"
|
||||
fi
|
||||
else
|
||||
exec "@builddir@/tests/unit.test" "$@"
|
||||
exec "@builddir@/tests/unit.test" "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user