summaryrefslogtreecommitdiffstats
path: root/tests/ts/dmesg
diff options
context:
space:
mode:
authorSami Kerola2015-03-23 00:05:27 +0100
committerKarel Zak2015-03-23 10:34:49 +0100
commitfa69a8b94f1c260d9cf9099d9421f8c34650089c (patch)
tree502c6057a0c950d473582d8408a4779fc3c68f9b /tests/ts/dmesg
parentdmesg: fix shadow declaration (diff)
downloadkernel-qcow2-util-linux-fa69a8b94f1c260d9cf9099d9421f8c34650089c.tar.gz
kernel-qcow2-util-linux-fa69a8b94f1c260d9cf9099d9421f8c34650089c.tar.xz
kernel-qcow2-util-linux-fa69a8b94f1c260d9cf9099d9421f8c34650089c.zip
tests: add dmesg multiline message check
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'tests/ts/dmesg')
-rwxr-xr-xtests/ts/dmesg/indentation31
-rw-r--r--tests/ts/dmesg/newlines5
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/ts/dmesg/indentation b/tests/ts/dmesg/indentation
new file mode 100755
index 000000000..74198889b
--- /dev/null
+++ b/tests/ts/dmesg/indentation
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# This file is part of util-linux.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="indentation"
+
+. $TS_TOPDIR/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_DMESG"
+
+$TS_CMD_DMESG -F $TS_SELF/newlines > $TS_OUTPUT 2>&1
+
+$TS_CMD_DMESG -F $TS_SELF/newlines -x >> $TS_OUTPUT 2>&1
+
+$TS_CMD_DMESG --time-format=delta --file $TS_SELF/newlines >> $TS_OUTPUT 2>&1
+
+$TS_CMD_DMESG --time-format=notime --file $TS_SELF/newlines >> $TS_OUTPUT 2>&1
+
+ts_finalize
diff --git a/tests/ts/dmesg/newlines b/tests/ts/dmesg/newlines
new file mode 100644
index 000000000..6b298c6ee
--- /dev/null
+++ b/tests/ts/dmesg/newlines
@@ -0,0 +1,5 @@
+<10>[ 1.000000] new
+line
+<20>[ 2.000000] two
+new
+lines