]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Fix daemon-connection-xxx tests
authorEric Bollengier <eric@baculasystems.com>
Mon, 19 Dec 2022 16:17:08 +0000 (17:17 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:00 +0000 (13:57 +0200)
regress/scripts/functions

index 81c6f07d121f5ec7e381db5b046bdd1ea1294c67..8c4db7b9d728e8358b84b7b3eb5605e6e9d300ac 100755 (executable)
@@ -293,7 +293,7 @@ check_connection_tls_logs()
       tls_str="without encryption"
    fi
 
-   n=`cat $1 | grep ".*\-dir .* Connected to Storage .* ${tls_str}" | wc -l`
+   n=`cat $1 | grep -- "-dir .* Connected to Storage .* ${tls_str}" | wc -l`
    if [ $n -ne $3 ]; then
       estat=1
       print_debug "Wrong log lines regarding Director Connecting Storage ${tls_str}: ${n} in restore log, expected $3"
@@ -301,21 +301,21 @@ check_connection_tls_logs()
    fi
 
 
-   n=`cat $1 | grep ".*\-dir .* Connected to Client .* ${tls_str}" | wc -l`
+   n=`cat $1 | grep -- "-dir .* Connected to Client .* ${tls_str}" | wc -l`
    if [ $n -ne $4 ]; then
       estat=1
       print_debug "Wrong log lines regarding Director Connecting Client ${tls_str}: ${n} in restore log, expected $4"
       print_debug "see: $1"
    fi
 
-   n=`cat $1 | grep ".*\-sd .* Connected to Client .* ${tls_str}" | wc -l`
+   n=`cat $1 | grep -- "-sd .* Connected to Client .* ${tls_str}" | wc -l`
    if [ $n -ne $5 ]; then
       estat=1
       print_debug "Wrong log lines regarding Storage Connecting Client ${tls_str}: ${n} in restore log, expected $5"
       print_debug "see: $1"
    fi
 
-   n=`cat $1 | grep ".*\-fd .* Connected to Storage .* ${tls_str}" | wc -l`
+   n=`cat $1 | grep -- "-fd .* Connected to Storage .* ${tls_str}" | wc -l`
    if [ $n -ne $6 ]; then
       estat=1
       print_debug "Wrong log lines regarding Client Connecting Storage ${tls_str}: ${n} in restore log, expected $6"