From: Ruediger Meier Date: Wed, 11 Jun 2014 15:47:34 +0000 (+0200) Subject: tests: merge last/ and utmpdump/ into new utmp/ dir X-Git-Tag: v2.25-rc1~28^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02229b5519ac77dec26d829c6be14e826d4611bc;p=thirdparty%2Futil-linux.git tests: merge last/ and utmpdump/ into new utmp/ dir We want to prepare and simplify utmp sepcific fixes. Beside all this renaming we also update/add some text data to have it more consistent. Signed-off-by: Ruediger Meier --- diff --git a/tests/expected/last/last b/tests/expected/utmp/last similarity index 94% rename from tests/expected/last/last rename to tests/expected/utmp/last index 4172e8697a..2958152bc3 100644 --- a/tests/expected/last/last +++ b/tests/expected/utmp/last @@ -14,7 +14,7 @@ login foo six Wed Aug 28 06:00 - 07:00 (01:00) user_pro foo seven Wed Aug 28 05:00 - 06:00 (01:00) accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ include system ~~~ rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14) torvalds linux hobby Mon Aug 26 00:57 gone - no logout @@ -33,27 +33,27 @@ login foo six Wed Aug 28 06:00 - 07:00 (01:00) user_pro foo seven Wed Aug 28 05:00 - 06:00 (01:00) accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ dns short ~~~ IPv4 root a.root-servers.n Wed Aug 28 13:00 - 14:00 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ dns long ~~~ IPv4 root a.root-servers.net Wed Aug 28 13:00 - 14:00 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ dns host last ~~~ IPv4 root Wed Aug 28 13:00 - 14:00 (01:00) a.root-servers.net -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ show ip ~~~ torvalds linux 128.214.205.14 Mon Aug 26 00:57 gone - no logout -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ no host ~~~ torvalds linux Mon Aug 26 00:57 gone - no logout -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ full times shortopt ~~~ rick long never-gonna-logo Thu Jan 1 00:00:00 1970 - Tue Jan 19 03:14:07 2038 (24855+03:14) torvalds linux hobby Mon Aug 26 00:57:08 1991 gone - no logout @@ -70,7 +70,7 @@ login foo six Wed Aug 28 06:00:00 2013 - Wed Aug 28 07: user_pro foo seven Wed Aug 28 05:00:00 2013 - Wed Aug 28 06:00:00 2013 (01:00) accounti foo nine Wed Aug 28 03:00:00 2013 - Wed Aug 28 04:00:00 2013 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ full times longopt ~~~ rick long never-gonna-logo Thu Jan 1 00:00:00 1970 - Tue Jan 19 03:14:07 2038 (24855+03:14) torvalds linux hobby Mon Aug 26 00:57:08 1991 gone - no logout @@ -87,7 +87,7 @@ login foo six Wed Aug 28 06:00:00 2013 - Wed Aug 28 07: user_pro foo seven Wed Aug 28 05:00:00 2013 - Wed Aug 28 06:00:00 2013 (01:00) accounti foo nine Wed Aug 28 03:00:00 2013 - Wed Aug 28 04:00:00 2013 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ no time ~~~ rick long never-gonna-logo (24855+03:14) torvalds linux hobby no logout @@ -104,7 +104,7 @@ login foo six (01:00) user_pro foo seven (01:00) accounti foo nine (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ iso-8601 time ~~~ rick long never-gonna-logout 1970-01-01T00:00:00+0000 - 2038-01-19T03:14:07+0000 (24855+03:14) torvalds linux hobby 1991-08-26T00:57:08+0000 gone - no logout @@ -121,7 +121,7 @@ login foo six 2013-08-28T06:00:00+0000 - 2013-08-28T07: user_process foo seven 2013-08-28T05:00:00+0000 - 2013-08-28T06:00:00+0000 (01:00) accounting foo nine 2013-08-28T03:00:00+0000 - 2013-08-28T04:00:00+0000 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ since and until ~~~ oldtime foo four Wed Aug 28 08:00 gone - no logout init foo five Wed Aug 28 07:00 - 08:00 (01:00) @@ -129,10 +129,10 @@ login foo six Wed Aug 28 06:00 - 07:00 (01:00) user_pro foo seven Wed Aug 28 05:00 - 06:00 (01:00) accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 ~~~ present ~~~ rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14) torvalds linux hobby Mon Aug 26 00:57 gone - no logout runlevel foo one Wed Aug 28 11:00 - 12:00 (01:00) -wtmp begins Wed Aug 28 03:00:00 2013 +wtmp-a begins Wed Aug 28 03:00:00 2013 diff --git a/tests/expected/last/ipv6 b/tests/expected/utmp/last-ipv6 similarity index 69% rename from tests/expected/last/ipv6 rename to tests/expected/utmp/last-ipv6 index 0fa234c1f3..5be77298a1 100644 --- a/tests/expected/last/ipv6 +++ b/tests/expected/utmp/last-ipv6 @@ -1,20 +1,20 @@ ~~~ dns short ~~~ IPv6 root a.root-servers.n Wed Aug 28 20:30 - 20:40 (00:10) -ipv6-input begins Wed Aug 28 20:30:40 2013 +wtmp-ipv6 begins Wed Aug 28 20:30:40 2013 ~~~ dns long ~~~ IPv6 root a.root-servers.net Wed Aug 28 20:30 - 20:40 (00:10) -ipv6-input begins Wed Aug 28 20:30:40 2013 +wtmp-ipv6 begins Wed Aug 28 20:30:40 2013 ~~~ dns host last ~~~ IPv6 root Wed Aug 28 20:30 - 20:40 (00:10) a.root-servers.net -ipv6-input begins Wed Aug 28 20:30:40 2013 +wtmp-ipv6 begins Wed Aug 28 20:30:40 2013 ~~~ show ip ~~~ IPv6 root 2001:503:ba3e::2 Wed Aug 28 20:30 - 20:40 (00:10) -ipv6-input begins Wed Aug 28 20:30:40 2013 +wtmp-ipv6 begins Wed Aug 28 20:30:40 2013 ~~~ show ip last ~~~ IPv6 root Wed Aug 28 20:30 - 20:40 (00:10) 2001:503:ba3e::2:30 -ipv6-input begins Wed Aug 28 20:30:40 2013 +wtmp-ipv6 begins Wed Aug 28 20:30:40 2013 diff --git a/tests/expected/utmpdump/ipv6tobin b/tests/expected/utmp/utmpdump-tobin similarity index 100% rename from tests/expected/utmpdump/ipv6tobin rename to tests/expected/utmp/utmpdump-tobin diff --git a/tests/expected/utmpdump/to-binary b/tests/expected/utmp/utmpdump-tobin-ipv6 similarity index 100% rename from tests/expected/utmpdump/to-binary rename to tests/expected/utmp/utmpdump-tobin-ipv6 diff --git a/tests/expected/utmpdump/to-text b/tests/expected/utmp/utmpdump-totxt similarity index 100% rename from tests/expected/utmpdump/to-text rename to tests/expected/utmp/utmpdump-totxt diff --git a/tests/expected/utmpdump/ipv6totxt b/tests/expected/utmp/utmpdump-totxt-ipv6 similarity index 100% rename from tests/expected/utmpdump/ipv6totxt rename to tests/expected/utmp/utmpdump-totxt-ipv6 diff --git a/tests/ts/last/last b/tests/ts/utmp/last similarity index 96% rename from tests/ts/last/last rename to tests/ts/utmp/last index 241915a7ff..7154a76b3f 100755 --- a/tests/ts/last/last +++ b/tests/ts/utmp/last @@ -22,10 +22,10 @@ ts_check_test_command "$TS_CMD_LAST" $TS_CMD_LAST --version 2>&1 | grep -q "invalid option" \ && ts_skip "deprecated last" -WTMP_FILE=${TS_OUTDIR}/wtmp +WTMP_FILE=${TS_OUTDIR}/wtmp-a rm -f $WTMP_FILE BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) -ln -s ${TS_SELF}/wtmp.${BYTE_ORDER} $WTMP_FILE +ln -s ${TS_SELF}/wtmp-a.${BYTE_ORDER} $WTMP_FILE export LANG=C export TZ=GMT diff --git a/tests/ts/last/ipv6 b/tests/ts/utmp/last-ipv6 similarity index 93% rename from tests/ts/last/ipv6 rename to tests/ts/utmp/last-ipv6 index e3e7dd1b36..80c20bacd3 100755 --- a/tests/ts/last/ipv6 +++ b/tests/ts/utmp/last-ipv6 @@ -22,10 +22,10 @@ ts_check_test_command "$TS_CMD_LAST" $TS_CMD_LAST --version 2>&1 | grep -q "invalid option" \ && ts_skip "deprecated last" -WTMP_FILE=${TS_OUTDIR}/ipv6-input +WTMP_FILE=${TS_OUTDIR}/wtmp-ipv6 rm -f $WTMP_FILE BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) -ln -s ${TS_SELF}/ipv6-input.${BYTE_ORDER} $WTMP_FILE +ln -s ${TS_SELF}/wtmp-ipv6.${BYTE_ORDER} $WTMP_FILE export LANG=C export TZ=GMT diff --git a/tests/ts/utmp/txt-a b/tests/ts/utmp/txt-a new file mode 100644 index 0000000000..bc91d1983a --- /dev/null +++ b/tests/ts/utmp/txt-a @@ -0,0 +1,19 @@ +[9] [00009] [ts/9] [accounting] [foo ] [nine ] [0.0.0.0 ] [Wed Aug 28 03:00:00 2013 GMT] +[8] [00008] [ts/8] [dead_process] [foo ] [eight ] [0.0.0.0 ] [Wed Aug 28 04:00:00 2013 GMT] +[7] [00007] [ts/7] [user_process] [foo ] [seven ] [0.0.0.0 ] [Wed Aug 28 05:00:00 2013 GMT] +[6] [00006] [ts/6] [login ] [foo ] [six ] [0.0.0.0 ] [Wed Aug 28 06:00:00 2013 GMT] +[5] [00005] [ts/5] [init ] [foo ] [five ] [0.0.0.0 ] [Wed Aug 28 07:00:00 2013 GMT] +[4] [00004] [ts/4] [oldtime ] [foo ] [four ] [0.0.0.0 ] [Wed Aug 28 08:00:00 2013 GMT] +[3] [00003] [ts/3] [newtime ] [foo ] [three ] [0.0.0.0 ] [Wed Aug 28 09:00:00 2013 GMT] +[2] [00002] [ts/2] [sysboot ] [foo ] [two ] [0.0.0.0 ] [Wed Aug 28 10:00:00 2013 GMT] +[1] [00001] [ts/1] [runlevel] [foo ] [one ] [0.0.0.0 ] [Wed Aug 28 11:00:00 2013 GMT] +[0] [00000] [ts/0] [nonvalid] [foo ] [zero ] [0.0.0.0 ] [Wed Aug 28 12:00:00 2013 GMT] +[7] [00010] [ipv4] [IPv4 ] [root ] [dns-server ] [198.41.0.4 ] [Wed Aug 28 13:00:00 2013 GMT] +[8] [00011] [ipv4] [IPv4 ] [root ] [dns-server ] [198.41.0.4 ] [Wed Aug 28 14:00:00 2013 GMT] +[1] [00012] [~~ ] [shutdown] [~ ] [system-name ] [0.0.0.0 ] [Wed Aug 28 15:00:00 2013 GMT] +[2] [00012] [~~ ] [reboot ] [~ ] [system-name ] [0.0.0.0 ] [Wed Aug 28 16:00:00 2013 GMT] +[1] [00012] [~~ ] [shutdown] [~ ] [system-name ] [0.0.0.0 ] [Wed Aug 28 17:00:00 2013 GMT] +[2] [00012] [~~ ] [reboot ] [~ ] [system-name ] [0.0.0.0 ] [Wed Aug 28 18:00:00 2013 GMT] +[7] [00013] [ts/1] [torvalds] [linux ] [hobby ] [128.214.205.14 ] [Mon Aug 26 00:57:08 1991 GMT] +[7] [00014] [long] [rick ] [long ] [never-gonna-logout ] [0.0.0.0 ] [ ] +[8] [00014] [long] [rick ] [long ] [never-gonna-logout ] [0.0.0.0 ] [Tue Jan 19 03:14:07 2038 GMT] diff --git a/tests/ts/utmpdump/text b/tests/ts/utmp/txt-b similarity index 100% rename from tests/ts/utmpdump/text rename to tests/ts/utmp/txt-b diff --git a/tests/ts/utmpdump/ipv6txt b/tests/ts/utmp/txt-ipv6 similarity index 50% rename from tests/ts/utmpdump/ipv6txt rename to tests/ts/utmp/txt-ipv6 index fb428d5e0d..5cce1506b0 100644 --- a/tests/ts/utmpdump/ipv6txt +++ b/tests/ts/utmp/txt-ipv6 @@ -1,2 +1,2 @@ -[7] [00010] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30 ] [Wed Aug 28 20:30:40 2013 BST] -[8] [00011] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30 ] [Wed Aug 28 20:40:50 2013 BST] +[7] [00010] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [Wed Aug 28 20:30:40 2013 GMT] +[8] [00011] [ipv6] [IPv6 ] [root ] [dns-server ] [2001:503:ba3e::2:30] [Wed Aug 28 20:40:50 2013 GMT] diff --git a/tests/ts/utmpdump/to-binary b/tests/ts/utmp/utmpdump-tobin similarity index 85% rename from tests/ts/utmpdump/to-binary rename to tests/ts/utmp/utmpdump-tobin index ecda0cca0f..9caa8df0b3 100755 --- a/tests/ts/utmpdump/to-binary +++ b/tests/ts/utmp/utmpdump-tobin @@ -13,7 +13,7 @@ # GNU General Public License for more details. TS_TOPDIR="${0%/*}/../.." -TS_DESC="to-binary" +TS_DESC="to binary" . $TS_TOPDIR/functions.sh ts_init "$*" @@ -25,8 +25,8 @@ BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) export LANG=C export TZ=GMT OUTFILE=${TS_OUTDIR}/${TS_TESTNAME}.file -$TS_CMD_UTMPDUMP -r $TS_SELF/text >| $OUTFILE 2>/dev/null -if diff -q $TS_SELF/binary.$BYTE_ORDER $OUTFILE; then +$TS_CMD_UTMPDUMP -r $TS_SELF/txt-b >| $OUTFILE 2>/dev/null +if diff -q $TS_SELF/wtmp-b.$BYTE_ORDER $OUTFILE; then echo "no diff" fi > $TS_OUTPUT 2>&1 diff --git a/tests/ts/utmpdump/ipv6tobin b/tests/ts/utmp/utmpdump-tobin-ipv6 similarity index 87% rename from tests/ts/utmpdump/ipv6tobin rename to tests/ts/utmp/utmpdump-tobin-ipv6 index c7b354a0c8..4686574558 100755 --- a/tests/ts/utmpdump/ipv6tobin +++ b/tests/ts/utmp/utmpdump-tobin-ipv6 @@ -25,8 +25,8 @@ BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) export LANG=C export TZ=GMT OUTFILE=${TS_OUTDIR}/${TS_TESTNAME}.file -$TS_CMD_UTMPDUMP -r $TS_SELF/ipv6txt >| $OUTFILE 2>/dev/null -if diff -q $TS_SELF/ipv6bin.$BYTE_ORDER $OUTFILE; then +$TS_CMD_UTMPDUMP -r $TS_SELF/txt-ipv6 >| $OUTFILE 2>/dev/null +if diff -q $TS_SELF/wtmp-ipv6.$BYTE_ORDER $OUTFILE; then echo "no diff" fi > $TS_OUTPUT 2>&1 diff --git a/tests/ts/utmpdump/to-text b/tests/ts/utmp/utmpdump-totxt similarity index 90% rename from tests/ts/utmpdump/to-text rename to tests/ts/utmp/utmpdump-totxt index e36d325fbd..50259110cf 100755 --- a/tests/ts/utmpdump/to-text +++ b/tests/ts/utmp/utmpdump-totxt @@ -13,7 +13,7 @@ # GNU General Public License for more details. TS_TOPDIR="${0%/*}/../.." -TS_DESC="to-text" +TS_DESC="to text" . $TS_TOPDIR/functions.sh ts_init "$*" @@ -24,6 +24,6 @@ BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) export LANG=C export TZ=GMT -$TS_CMD_UTMPDUMP $TS_SELF/binary.$BYTE_ORDER >| $TS_OUTPUT 2>/dev/null +$TS_CMD_UTMPDUMP $TS_SELF/wtmp-b.$BYTE_ORDER >| $TS_OUTPUT 2>/dev/null ts_finalize diff --git a/tests/ts/utmpdump/ipv6totxt b/tests/ts/utmp/utmpdump-totxt-ipv6 similarity index 91% rename from tests/ts/utmpdump/ipv6totxt rename to tests/ts/utmp/utmpdump-totxt-ipv6 index e329b13182..7ef61803fa 100755 --- a/tests/ts/utmpdump/ipv6totxt +++ b/tests/ts/utmp/utmpdump-totxt-ipv6 @@ -24,6 +24,6 @@ BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) export LANG=C export TZ=GMT -$TS_CMD_UTMPDUMP $TS_SELF/ipv6bin.$BYTE_ORDER >| $TS_OUTPUT 2>/dev/null +$TS_CMD_UTMPDUMP $TS_SELF/wtmp-ipv6.$BYTE_ORDER >| $TS_OUTPUT 2>/dev/null ts_finalize diff --git a/tests/ts/last/wtmp.BE b/tests/ts/utmp/wtmp-a.BE similarity index 100% rename from tests/ts/last/wtmp.BE rename to tests/ts/utmp/wtmp-a.BE diff --git a/tests/ts/last/wtmp.LE b/tests/ts/utmp/wtmp-a.LE similarity index 100% rename from tests/ts/last/wtmp.LE rename to tests/ts/utmp/wtmp-a.LE diff --git a/tests/ts/utmpdump/binary.BE b/tests/ts/utmp/wtmp-b.BE similarity index 100% rename from tests/ts/utmpdump/binary.BE rename to tests/ts/utmp/wtmp-b.BE diff --git a/tests/ts/utmpdump/binary.LE b/tests/ts/utmp/wtmp-b.LE similarity index 100% rename from tests/ts/utmpdump/binary.LE rename to tests/ts/utmp/wtmp-b.LE diff --git a/tests/ts/last/ipv6-input.BE b/tests/ts/utmp/wtmp-ipv6.BE similarity index 100% rename from tests/ts/last/ipv6-input.BE rename to tests/ts/utmp/wtmp-ipv6.BE diff --git a/tests/ts/last/ipv6-input.LE b/tests/ts/utmp/wtmp-ipv6.LE similarity index 100% rename from tests/ts/last/ipv6-input.LE rename to tests/ts/utmp/wtmp-ipv6.LE diff --git a/tests/ts/utmpdump/ipv6bin.BE b/tests/ts/utmpdump/ipv6bin.BE deleted file mode 100644 index 8cf7d39650..0000000000 Binary files a/tests/ts/utmpdump/ipv6bin.BE and /dev/null differ diff --git a/tests/ts/utmpdump/ipv6bin.LE b/tests/ts/utmpdump/ipv6bin.LE deleted file mode 100644 index 342553bb94..0000000000 Binary files a/tests/ts/utmpdump/ipv6bin.LE and /dev/null differ