]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: merge last/ and utmpdump/ into new utmp/ dir
authorRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 11 Jun 2014 15:47:34 +0000 (17:47 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 11 Jun 2014 21:08:49 +0000 (23:08 +0200)
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 <ruediger.meier@ga-group.nl>
23 files changed:
tests/expected/utmp/last [moved from tests/expected/last/last with 94% similarity]
tests/expected/utmp/last-ipv6 [moved from tests/expected/last/ipv6 with 69% similarity]
tests/expected/utmp/utmpdump-tobin [moved from tests/expected/utmpdump/ipv6tobin with 100% similarity]
tests/expected/utmp/utmpdump-tobin-ipv6 [moved from tests/expected/utmpdump/to-binary with 100% similarity]
tests/expected/utmp/utmpdump-totxt [moved from tests/expected/utmpdump/to-text with 100% similarity]
tests/expected/utmp/utmpdump-totxt-ipv6 [moved from tests/expected/utmpdump/ipv6totxt with 100% similarity]
tests/ts/utmp/last [moved from tests/ts/last/last with 96% similarity]
tests/ts/utmp/last-ipv6 [moved from tests/ts/last/ipv6 with 93% similarity]
tests/ts/utmp/txt-a [new file with mode: 0644]
tests/ts/utmp/txt-b [moved from tests/ts/utmpdump/text with 100% similarity]
tests/ts/utmp/txt-ipv6 [moved from tests/ts/utmpdump/ipv6txt with 50% similarity]
tests/ts/utmp/utmpdump-tobin [moved from tests/ts/utmpdump/to-binary with 85% similarity]
tests/ts/utmp/utmpdump-tobin-ipv6 [moved from tests/ts/utmpdump/ipv6tobin with 87% similarity]
tests/ts/utmp/utmpdump-totxt [moved from tests/ts/utmpdump/to-text with 90% similarity]
tests/ts/utmp/utmpdump-totxt-ipv6 [moved from tests/ts/utmpdump/ipv6totxt with 91% similarity]
tests/ts/utmp/wtmp-a.BE [moved from tests/ts/last/wtmp.BE with 100% similarity]
tests/ts/utmp/wtmp-a.LE [moved from tests/ts/last/wtmp.LE with 100% similarity]
tests/ts/utmp/wtmp-b.BE [moved from tests/ts/utmpdump/binary.BE with 100% similarity]
tests/ts/utmp/wtmp-b.LE [moved from tests/ts/utmpdump/binary.LE with 100% similarity]
tests/ts/utmp/wtmp-ipv6.BE [moved from tests/ts/last/ipv6-input.BE with 100% similarity]
tests/ts/utmp/wtmp-ipv6.LE [moved from tests/ts/last/ipv6-input.LE with 100% similarity]
tests/ts/utmpdump/ipv6bin.BE [deleted file]
tests/ts/utmpdump/ipv6bin.LE [deleted file]

similarity index 94%
rename from tests/expected/last/last
rename to tests/expected/utmp/last
index 4172e8697a09e950c482dcf934e9fc71c8c17f32..2958152bc320309ceacf06dd447aa9ba4057e4e4 100644 (file)
@@ -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
similarity index 69%
rename from tests/expected/last/ipv6
rename to tests/expected/utmp/last-ipv6
index 0fa234c1f39ae15530c034db88b8e28b90a5fe62..5be77298a166c5aed217dfd38ce5a3fe5c2b0b06 100644 (file)
@@ -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
similarity index 96%
rename from tests/ts/last/last
rename to tests/ts/utmp/last
index 241915a7ff121e2a3ebaa92323d534aaf7cad55d..7154a76b3f2e1362e0427fb16c563d1cba928a7f 100755 (executable)
@@ -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
similarity index 93%
rename from tests/ts/last/ipv6
rename to tests/ts/utmp/last-ipv6
index e3e7dd1b36d18fa578ff597dbf8af5f10cf162c3..80c20bacd3b837eca3e8d3216935c235134a9ecc 100755 (executable)
@@ -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 (file)
index 0000000..bc91d19
--- /dev/null
@@ -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]
similarity index 100%
rename from tests/ts/utmpdump/text
rename to tests/ts/utmp/txt-b
similarity index 50%
rename from tests/ts/utmpdump/ipv6txt
rename to tests/ts/utmp/txt-ipv6
index fb428d5e0dfeb6ce0a91c5375718cdda35bd633a..5cce1506b0b5b71b6cae38eaeb1a5db7d6268e8d 100644 (file)
@@ -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]
similarity index 85%
rename from tests/ts/utmpdump/to-binary
rename to tests/ts/utmp/utmpdump-tobin
index ecda0cca0ffe6013905520099fa8e29106aca289..9caa8df0b342c429bfb502547e29cb8032c4dbb3 100755 (executable)
@@ -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
 
similarity index 87%
rename from tests/ts/utmpdump/ipv6tobin
rename to tests/ts/utmp/utmpdump-tobin-ipv6
index c7b354a0c8096e04431aae01326b33043fea4070..4686574558c1ef893352a191258a589d8e866a4e 100755 (executable)
@@ -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
 
similarity index 90%
rename from tests/ts/utmpdump/to-text
rename to tests/ts/utmp/utmpdump-totxt
index e36d325fbd57ea3e4ec12d4f47a2c3bc180b141c..50259110cf94fee3ec3b9b36661e4ff55967d7fa 100755 (executable)
@@ -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
similarity index 91%
rename from tests/ts/utmpdump/ipv6totxt
rename to tests/ts/utmp/utmpdump-totxt-ipv6
index e329b131824884fad66f0f3f1467c8f8f517fa6b..7ef61803faf3f0c09e81d0c6f4d964dba59a75a6 100755 (executable)
@@ -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/utmpdump/ipv6bin.BE b/tests/ts/utmpdump/ipv6bin.BE
deleted file mode 100644 (file)
index 8cf7d39..0000000
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 (file)
index 342553b..0000000
Binary files a/tests/ts/utmpdump/ipv6bin.LE and /dev/null differ