summaryrefslogtreecommitdiffstats
path: root/tests/ts
diff options
context:
space:
mode:
authorRuediger Meier2014-03-15 04:02:26 +0100
committerRuediger Meier2014-03-15 06:04:34 +0100
commit151602435616bd879ce5617189fa7a438f0d0e6d (patch)
tree936140e4c076e30567ad146e0ed6207fe18566c8 /tests/ts
parenttests: fix utmpdump/ipv6totxt for bigendian (diff)
downloadkernel-qcow2-util-linux-151602435616bd879ce5617189fa7a438f0d0e6d.tar.gz
kernel-qcow2-util-linux-151602435616bd879ce5617189fa7a438f0d0e6d.tar.xz
kernel-qcow2-util-linux-151602435616bd879ce5617189fa7a438f0d0e6d.zip
tests: fix utmpdump/to-binary for bigendian
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts')
-rwxr-xr-xtests/ts/utmpdump/to-binary8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/ts/utmpdump/to-binary b/tests/ts/utmpdump/to-binary
index e774915e7..ecda0cca0 100755
--- a/tests/ts/utmpdump/to-binary
+++ b/tests/ts/utmpdump/to-binary
@@ -20,8 +20,14 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_UTMPDUMP"
+BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order)
+
export LANG=C
export TZ=GMT
-$TS_CMD_UTMPDUMP -r $TS_SELF/text >| $TS_OUTPUT 2>/dev/null
+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
+ echo "no diff"
+fi > $TS_OUTPUT 2>&1
ts_finalize