[LTP] [PATCH] logrotate: support new rotate debug message

Po-Hsu Lin po-hsu.lin@canonical.com
Thu Nov 28 08:28:19 CET 2024


This test was found failing on Ubuntu Oracular with:
    grep -q forced from command line (5 rotations) tst_logrotate.out
    failed unexpectedly

This is because the logrotate debug message has been changed in upstream:
https://github.com/logrotate/logrotate/commit/be6a263c87

Include the new debug message to fix this issue.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
 testcases/commands/logrotate/logrotate_tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/commands/logrotate/logrotate_tests.sh b/testcases/commands/logrotate/logrotate_tests.sh
index 0aa9f12e1..1cd355f02 100755
--- a/testcases/commands/logrotate/logrotate_tests.sh
+++ b/testcases/commands/logrotate/logrotate_tests.sh
@@ -90,7 +90,7 @@ test1()
 	ROD logrotate -fv tst_logrotate.conf > tst_logrotate.out 2>&1
 
 	EXPECT_PASS grep -q "reading config file tst_logrotate.conf" tst_logrotate.out
-	EXPECT_PASS grep -q "forced from command line (5 rotations)" tst_logrotate.out
+	EXPECT_PASS grep -E -q "forced from command line (5 rotations)|forced from command line empty log files are rotated, \(5 rotations\)" tst_logrotate.out
 	EXPECT_PASS grep -E -q "compressing new|log with" tst_logrotate.out
 
 	check_log /var/log/tst_logfile.1.gz
-- 
2.25.1



More information about the ltp mailing list