Blob Blame History Raw
From 0c254abccf3553192e13f736351926c5fa45df0b Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Mon, 9 Dec 2019 16:57:13 -0500
Subject: [PATCH 07/37] fix: test/functions: FWD_END_TEST: improve grep for
 errors/warnings

Match more specifically so we don't accidentally match a debug log that
also has "ERROR:" or "WARNING:" as is common for modprobes.

(cherry picked from commit 5f67a78a68a4b5117d7be3402fc9dd639f318a60)
(cherry picked from commit ec0e86677372e994151263a3cb0f1124e2df219b)
---
 src/tests/functions.at | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/tests/functions.at b/src/tests/functions.at
index 31d1a3c187e4..1bed8a4f3a6c 100644
--- a/src/tests/functions.at
+++ b/src/tests/functions.at
@@ -150,8 +150,7 @@ m4_define([FWD_END_TEST], [
             if test -n "$1"; then
                 sed -i $1 ./firewalld.log
             fi
-            AT_FAIL_IF([grep ERROR ./firewalld.log])
-            AT_FAIL_IF([grep WARNING ./firewalld.log])
+            AT_FAIL_IF([grep '^[0-9-]*[ ]\+[0-9:]*[ ]\+\(ERROR\|WARNING\)' ./firewalld.log])
         fi
         m4_undefine([CURRENT_DBUS_ADDRESS])
         m4_undefine([CURRENT_TEST_NS])
-- 
2.23.0