]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: fix utmpdump/to-binary for bigendian
authorRuediger Meier <ruediger.meier@ga-group.nl>
Sat, 15 Mar 2014 03:02:26 +0000 (03:02 +0000)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Sat, 15 Mar 2014 05:04:34 +0000 (05:04 +0000)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests/expected/utmpdump/to-binary
tests/ts/utmpdump/to-binary

index 45d35bbb0ba5f1c3db170f18b1a4da1c7f92cf61..d0f1b61c2a297564dde284f1267cae1e19bcc6b4 100644 (file)
Binary files a/tests/expected/utmpdump/to-binary and b/tests/expected/utmpdump/to-binary differ
index e774915e7b9e958761e531adea66d25837882819..ecda0cca0ffe6013905520099fa8e29106aca289 100755 (executable)
@@ -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