]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Collapse errors down by using || in run_endpoint.sh
authorNeil Horman <nhorman@openssl.org>
Thu, 29 Aug 2024 20:54:19 +0000 (16:54 -0400)
committerNeil Horman <nhorman@openssl.org>
Tue, 10 Sep 2024 15:38:09 +0000 (11:38 -0400)
Makes for smaller more consistent coding

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25256)

test/quic-openssl-docker/run_endpoint.sh

index 9a6b5f9b7acf78bb5328d5e37d2c7b1ae3ccdf3f..cccebd370bb26316494a705072694a950fbb2038 100644 (file)
@@ -36,43 +36,27 @@ if [ "$ROLE" == "client" ]; then
 
     case "$TESTCASE" in
     "http3"|"transfer")
-    echo -e "--verbose\n--parallel" >> $CURLRC
-    generate_outputs_http3
-    dump_curlrc
-        SSL_CERT_FILE=/certs/ca.pem curl --config $CURLRC 
-        if [ $? -ne 0 ]
-        then
-            exit 1
-        fi
+        echo -e "--verbose\n--parallel" >> $CURLRC
+        generate_outputs_http3
+        dump_curlrc
+        SSL_CERT_FILE=/certs/ca.pem curl --config $CURLRC || exit 1
         exit 0
         ;;
     "handshake")
        OUTFILE=$(basename $REQUESTS)
        echo -e "--verbose\n--http3\n-H \"Connection: close\"\n-o /downloads/$OUTFILE\n--url $REQUESTS" >> $CURLRC
        dump_curlrc
-       SSL_CERT_FILE=/certs/ca.pem curl --config $CURLRC 
-       if [ $? -ne 0 ]
-       then
-           exit 1
-       fi
+       SSL_CERT_FILE=/certs/ca.pem curl --config $CURLRC || exit 1
        exit 0
        ;; 
     "retry")
        OUTFILE=$(basename $REQUESTS)
-       SSL_CERT_FILE=/certs/ca.pem curl --verbose --http3 -o /downloads/$OUTFILE $REQUESTS
-       if [ $? -ne 0 ]
-       then
-           exit 1
-       fi
+       SSL_CERT_FILE=/certs/ca.pem curl --verbose --http3 -o /downloads/$OUTFILE $REQUESTS || exit 1
        exit 0
        ;; 
     "chacha20")
        OUTFILE=$(basename $REQUESTS)
-       SSL_CERT_FILE=/certs/ca.pem curl --verbose --tlsv1.3 --tls13-ciphers TLS_CHACHA20_POLY1305_SHA256 --http3 -o /downloads/$OUTFILE $REQUESTS
-       if [ $? -ne 0 ]
-       then
-           exit 1
-       fi
+       SSL_CERT_FILE=/certs/ca.pem curl --verbose --tlsv1.3 --tls13-ciphers TLS_CHACHA20_POLY1305_SHA256 --http3 -o /downloads/$OUTFILE $REQUESTS || exit 1
        exit 0
        ;; 
     *)