Fix the sed command 59/223959/1
authorMateusz Majewski <m.majewski2@samsung.com>
Wed, 5 Feb 2020 07:21:55 +0000 (08:21 +0100)
committerMateusz Majewski <m.majewski2@samsung.com>
Wed, 5 Feb 2020 07:30:31 +0000 (08:30 +0100)
This command used to be wrong because it contains a star. When shell
sees the star, it expands it, which is very wrong in our case. The test
somehow still passes, but sed spams the error message on the stderr,
which is unhelpful while debugging.

Change-Id: Ief9666698b7163e6b332bb5c7535cc6814abd50e

tests/dlog_test.in

index a6905d6..43bb832 100644 (file)
@@ -514,7 +514,7 @@ for format in $sort_formats; do
                # filter out empty lines in "long" format
                [ -z "$line" ] && continue
                # filter out non-timestamp lines in "long" format
-               if [ $format == "long" ] && [ "`echo "$line" | sed -re s/^\[[[:print:]]*\]$/line_ok/g`" != "line_ok" ]; then
+               if [ $format == "long" ] && [ "`echo "$line" | sed -re 's/^\[[[:print:]]*\]$/line_ok/g'`" != "line_ok" ]; then
                        continue
                fi