]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
liblastlog2: (tests) avoid log spam
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 12 May 2026 21:21:25 +0000 (23:21 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 13 May 2026 06:07:34 +0000 (08:07 +0200)
In its current form this test spams the test log with some pointless noise.
Redirect the output to a logfile and validate it, too.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
tests/expected/liblastlog2/y2038_ll2_read_all [new file with mode: 0644]
tests/ts/liblastlog2/y2038_ll2_read_all

diff --git a/tests/expected/liblastlog2/y2038_ll2_read_all b/tests/expected/liblastlog2/y2038_ll2_read_all
new file mode 100644 (file)
index 0000000..47a2fd7
--- /dev/null
@@ -0,0 +1,2 @@
+Cannot open database (y2038-ll2_read_all.db): unable to open database file
+Returning the correct errno: No such file or directory
index e2fce4469894acb5cc6a1f7ee44e245903a0585f..dacb5f2cf130bc9a8c7af245e002f93be714f6ef 100755 (executable)
@@ -8,8 +8,8 @@ ts_init "$*"
 
 ts_check_test_command $TS_HELPER_LIBLASTLOG2_Y2038_LL2_READ_ALL
 
-$TS_HELPER_LIBLASTLOG2_Y2038_LL2_READ_ALL >/dev/null || ts_failed "returned an error"
+$TS_HELPER_LIBLASTLOG2_Y2038_LL2_READ_ALL >/dev/null 2>> "$TS_OUTPUT" || ts_failed "returned an error"
 
-rm y2038-ll2_read_all.db
+rm -f y2038-ll2_read_all.db
 
 ts_finalize