From dd480c027421420c22ff7e9297821c96605b914f Mon Sep 17 00:00:00 2001
From: andyzhangx <xiazhang@microsoft.com>
Date: Wed, 6 Dec 2023 01:49:47 +0000
Subject: [PATCH] test: fix capz test failure

---
 test/utils/smb_log.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/utils/smb_log.sh b/test/utils/smb_log.sh
index 1f87e2e6058..79362ba0db3 100755
--- a/test/utils/smb_log.sh
+++ b/test/utils/smb_log.sh
@@ -14,7 +14,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set -e
+cleanup() {
+    echo "hit unexpected error during log print, exit 0"
+    exit 0
+}
+
+trap cleanup ERR
 
 NS=kube-system
 CONTAINER=smb