Blob Blame History Raw
From ddf31eefd0bf0783aa3b9a09e391199387471857 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Mon, 9 Dec 2019 16:57:13 -0500
Subject: [PATCH 125/146] 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 5115121eb170d69e8ded8b22a5dc4683e3d03de1)
---
 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 74cb889c7a29..881b8b7c067e 100644
--- a/src/tests/functions.at
+++ b/src/tests/functions.at
@@ -148,8 +148,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