summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRuediger Meier2014-03-23 16:38:31 +0100
committerRuediger Meier2014-03-23 16:45:14 +0100
commit765e6dc3d30a11f5eda9f6ca5b032c606cdfade4 (patch)
tree0d7c82ad5864a288eaeceac8eee61f88f4dd1a78 /tests
parenttests: fix utmpdump/ipv6tobin for bigendian (diff)
downloadkernel-qcow2-util-linux-765e6dc3d30a11f5eda9f6ca5b032c606cdfade4.tar.gz
kernel-qcow2-util-linux-765e6dc3d30a11f5eda9f6ca5b032c606cdfade4.tar.xz
kernel-qcow2-util-linux-765e6dc3d30a11f5eda9f6ca5b032c606cdfade4.zip
tests: fix last for bigendian
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ts/last/ipv617
-rw-r--r--tests/ts/last/ipv6-input.BEbin0 -> 768 bytes
-rw-r--r--tests/ts/last/ipv6-input.LE (renamed from tests/ts/last/ipv6-input)bin768 -> 768 bytes
-rwxr-xr-xtests/ts/last/last31
-rw-r--r--tests/ts/last/wtmp.BEbin0 -> 7296 bytes
-rw-r--r--tests/ts/last/wtmp.LE (renamed from tests/ts/last/wtmp)bin7296 -> 7296 bytes
6 files changed, 31 insertions, 17 deletions
diff --git a/tests/ts/last/ipv6 b/tests/ts/last/ipv6
index b9b4de4dd..63a786753 100755
--- a/tests/ts/last/ipv6
+++ b/tests/ts/last/ipv6
@@ -20,24 +20,31 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_LAST"
+WTMP_FILE=${TS_OUTDIR}/ipv6-input
+rm -f $WTMP_FILE
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+ln -s ${TS_SELF}/ipv6-input.${BYTE_ORDER} $WTMP_FILE
+
export LANG=C
export TZ=GMT
>| $TS_OUTPUT
ts_log "~~~ dns short ~~~"
-$TS_CMD_LAST -f $TS_SELF/ipv6-input -d >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -d >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ dns long ~~~"
-$TS_CMD_LAST -f $TS_SELF/ipv6-input -d -w >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -d -w >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ dns host last ~~~"
-$TS_CMD_LAST -f $TS_SELF/ipv6-input -d -a >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -d -a >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ show ip ~~~"
-$TS_CMD_LAST -f $TS_SELF/ipv6-input -i >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -i >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ show ip last ~~~"
-$TS_CMD_LAST -f $TS_SELF/ipv6-input -i -a >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -i -a >> $TS_OUTPUT 2>/dev/null
+
+rm -f $WTMP_FILE
ts_finalize
diff --git a/tests/ts/last/ipv6-input.BE b/tests/ts/last/ipv6-input.BE
new file mode 100644
index 000000000..8cf7d3965
--- /dev/null
+++ b/tests/ts/last/ipv6-input.BE
Binary files differ
diff --git a/tests/ts/last/ipv6-input b/tests/ts/last/ipv6-input.LE
index 342553bb9..342553bb9 100644
--- a/tests/ts/last/ipv6-input
+++ b/tests/ts/last/ipv6-input.LE
Binary files differ
diff --git a/tests/ts/last/last b/tests/ts/last/last
index b6308fca1..8e4202fe9 100755
--- a/tests/ts/last/last
+++ b/tests/ts/last/last
@@ -20,45 +20,52 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_LAST"
+WTMP_FILE=${TS_OUTDIR}/wtmp
+rm -f $WTMP_FILE
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+ln -s ${TS_SELF}/wtmp.${BYTE_ORDER} $WTMP_FILE
+
export LANG=C
export TZ=GMT
>| $TS_OUTPUT
ts_log "~~~ basic output ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ include system ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -x >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -x >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ dns short ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -d root >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -d root >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ dns long ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -w -d root >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -w -d root >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ dns host last ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -a -d root >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -a -d root >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ show ip ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -i torvalds >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -i torvalds >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ no host ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -R torvalds >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -R torvalds >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ full times ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -F >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -F >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ no time ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp --time-format=notime >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE --time-format=notime >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ iso-8601 time ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp --time-format=iso -w >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE --time-format=iso -w >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ since and until ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -s "2013-08-28 02:20" -t "2013-08-28 08:20" >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -s "2013-08-28 02:20" -t "2013-08-28 08:20" >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ present ~~~"
-$TS_CMD_LAST -f $TS_SELF/wtmp -p "2013-08-28 11:20" >> $TS_OUTPUT 2>/dev/null
+$TS_CMD_LAST -f $WTMP_FILE -p "2013-08-28 11:20" >> $TS_OUTPUT 2>/dev/null
+
+rm -f $WTMP_FILE
ts_finalize
diff --git a/tests/ts/last/wtmp.BE b/tests/ts/last/wtmp.BE
new file mode 100644
index 000000000..5015f8eb1
--- /dev/null
+++ b/tests/ts/last/wtmp.BE
Binary files differ
diff --git a/tests/ts/last/wtmp b/tests/ts/last/wtmp.LE
index f66bb20a1..f66bb20a1 100644
--- a/tests/ts/last/wtmp
+++ b/tests/ts/last/wtmp.LE
Binary files differ