[PATCH 5/5] tests: check dmesg message coloring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 tests/expected/dmesg/colors | 105 ++++++++++++++++++++++++++++++++++++++++++++
 tests/ts/dmesg/colors       |  25 +++++++++++
 2 files changed, 130 insertions(+)
 create mode 100644 tests/expected/dmesg/colors
 create mode 100755 tests/ts/dmesg/colors

diff --git a/tests/expected/dmesg/colors b/tests/expected/dmesg/colors
new file mode 100644
index 0000000..40aca73
--- /dev/null
+++ b/tests/expected/dmesg/colors
@@ -0,0 +1,105 @@
+kern  :emerg : [    0.000000] example[0]
+kern  :alert : [    1.000000] example[1]
+kern  :crit  : [    8.000000] example[2]
+kern  :err   : [   27.000000] example[3]
+kern  :warn  : [   64.000000] example[4]
+kern  :notice: [  125.000000] example[5]
+kern  :info  : [  216.000000] example[6]
+kern  :debug : [  343.000000] example[7]
+user  :emerg : [  512.000000] example[8]
+user  :alert : [  729.000000] example[9]
+user  :crit  : [ 1000.000000] example[10]
+user  :err   : [ 1331.000000] example[11]
+user  :warn  : [ 1728.000000] example[12]
+user  :notice: [ 2197.000000] example[13]
+user  :info  : [ 2744.000000] example[14]
+user  :debug : [ 3375.000000] example[15]
+mail  :emerg : [ 4096.000000] example[16]
+mail  :alert : [ 4913.000000] example[17]
+mail  :crit  : [ 5832.000000] example[18]
+mail  :err   : [ 6859.000000] example[19]
+mail  :warn  : [ 8000.000000] example[20]
+mail  :notice: [ 9261.000000] example[21]
+mail  :info  : [10648.000000] example[22]
+mail  :debug : [12167.000000] example[23]
+daemon:emerg : [13824.000000] example[24]
+daemon:alert : [15625.000000] example[25]
+daemon:crit  : [17576.000000] example[26]
+daemon:err   : [19683.000000] example[27]
+daemon:warn  : [21952.000000] example[28]
+daemon:notice: [24389.000000] example[29]
+daemon:info  : [27000.000000] example[30]
+daemon:debug : [29791.000000] example[31]
+auth  :emerg : [32768.000000] example[32]
+auth  :alert : [35937.000000] example[33]
+auth  :crit  : [39304.000000] example[34]
+auth  :err   : [42875.000000] example[35]
+auth  :warn  : [46656.000000] example[36]
+auth  :notice: [50653.000000] example[37]
+auth  :info  : [54872.000000] example[38]
+auth  :debug : [59319.000000] example[39]
+syslog:emerg : [64000.000000] example[40]
+syslog:alert : [68921.000000] example[41]
+syslog:crit  : [74088.000000] example[42]
+syslog:err   : [79507.000000] example[43]
+syslog:warn  : [85184.000000] example[44]
+syslog:notice: [91125.000000] example[45]
+syslog:info  : [97336.000000] example[46]
+syslog:debug : [103823.000000] example[47]
+lpr   :emerg : [110592.000000] example[48]
+lpr   :alert : [117649.000000] example[49]
+lpr   :crit  : [125000.000000] example[50]
+lpr   :err   : [132651.000000] example[51]
+lpr   :warn  : [140608.000000] example[52]
+lpr   :notice: [148877.000000] example[53]
+lpr   :info  : [157464.000000] example[54]
+lpr   :debug : [166375.000000] example[55]
+news  :emerg : [175616.000000] example[56]
+news  :alert : [185193.000000] example[57]
+news  :crit  : [195112.000000] example[58]
+news  :err   : [205379.000000] example[59]
+news  :warn  : [216000.000000] example[60]
+news  :notice: [226981.000000] example[61]
+news  :info  : [238328.000000] example[62]
+news  :debug : [250047.000000] example[63]
+uucp  :emerg : [262144.000000] example[64]
+uucp  :alert : [274625.000000] example[65]
+uucp  :crit  : [287496.000000] example[66]
+uucp  :err   : [300763.000000] example[67]
+uucp  :warn  : [314432.000000] example[68]
+uucp  :notice: [328509.000000] example[69]
+uucp  :info  : [343000.000000] example[70]
+uucp  :debug : [357911.000000] example[71]
+cron  :emerg : [373248.000000] example[72]
+cron  :alert : [389017.000000] example[73]
+cron  :crit  : [405224.000000] example[74]
+cron  :err   : [421875.000000] example[75]
+cron  :warn  : [438976.000000] example[76]
+cron  :notice: [456533.000000] example[77]
+cron  :info  : [474552.000000] example[78]
+cron  :debug : [493039.000000] example[79]
+authpriv:emerg : [512000.000000] example[80]
+authpriv:alert : [531441.000000] example[81]
+authpriv:crit  : [551368.000000] example[82]
+authpriv:err   : [571787.000000] example[83]
+authpriv:warn  : [592704.000000] example[84]
+authpriv:notice: [614125.000000] example[85]
+authpriv:info  : [636056.000000] example[86]
+authpriv:debug : [658503.000000] example[87]
+ftp   :emerg : [681472.000000] example[88]
+ftp   :alert : [704969.000000] example[89]
+ftp   :crit  : [729000.000000] example[90]
+ftp   :err   : [753571.000000] example[91]
+ftp   :warn  : [778688.000000] example[92]
+ftp   :notice: [804357.000000] example[93]
+ftp   :info  : [830584.000000] example[94]
+ftp   :debug : [857375.000000] example[95]
+[884736.000000] example[96]
+[912673.000000] example[97]
+[941192.000000] example[98]
+[970299.000000] example[99]
+[1000000.000000] example[100]
+[1030301.000000] example[101]
+[1061208.000000] example[102]
+[1092727.000000] example[103]
+[1124864.000000] example[104]
diff --git a/tests/ts/dmesg/colors b/tests/ts/dmesg/colors
new file mode 100755
index 0000000..2dfc937
--- /dev/null
+++ b/tests/ts/dmesg/colors
@@ -0,0 +1,25 @@
+#!/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="colors"
+
+. $TS_TOPDIR/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_HELPER_DMESG"
+
+$TS_HELPER_DMESG --color=always -F $TS_SELF/input -x >> $TS_OUTPUT 2>/dev/null
+
+ts_finalize
-- 
2.3.3

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux