From: Ruediger Meier Date: Wed, 11 Jun 2014 18:26:04 +0000 (+0200) Subject: tests: provide missing test data for "last" on exotic archs X-Git-Tag: v2.25-rc1~28^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85f7fb663689623f28b0ae42a3f3b1e5962105d6;p=thirdparty%2Futil-linux.git tests: provide missing test data for "last" on exotic archs Signed-off-by: Ruediger Meier --- diff --git a/tests/ts/utmp/last b/tests/ts/utmp/last index 7154a76b3f..1d813b85fc 100755 --- a/tests/ts/utmp/last +++ b/tests/ts/utmp/last @@ -22,14 +22,21 @@ ts_check_test_command "$TS_CMD_LAST" $TS_CMD_LAST --version 2>&1 | grep -q "invalid option" \ && ts_skip "deprecated last" +. "$TS_SELF/utmp_functions.sh" + WTMP_FILE=${TS_OUTDIR}/wtmp-a rm -f $WTMP_FILE -BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) -ln -s ${TS_SELF}/wtmp-a.${BYTE_ORDER} $WTMP_FILE export LANG=C export TZ=GMT +if [ $SIZEOF_UTMP -eq 384 ]; then + ln -s ${TS_SELF}/wtmp-a.${BYTE_ORDER} $WTMP_FILE +else + $TS_CMD_UTMPDUMP -r ${TS_SELF}/txt-a > $WTMP_FILE 2>/dev/null \ + || ts_skip "can't create test data" +fi + >| $TS_OUTPUT ts_log "~~~ basic output ~~~" diff --git a/tests/ts/utmp/last-ipv6 b/tests/ts/utmp/last-ipv6 index 80c20bacd3..89b0e83289 100755 --- a/tests/ts/utmp/last-ipv6 +++ b/tests/ts/utmp/last-ipv6 @@ -22,14 +22,21 @@ ts_check_test_command "$TS_CMD_LAST" $TS_CMD_LAST --version 2>&1 | grep -q "invalid option" \ && ts_skip "deprecated last" +. "$TS_SELF/utmp_functions.sh" + WTMP_FILE=${TS_OUTDIR}/wtmp-ipv6 rm -f $WTMP_FILE -BYTE_ORDER=$($TS_HELPER_SYSINFO byte-order) -ln -s ${TS_SELF}/wtmp-ipv6.${BYTE_ORDER} $WTMP_FILE export LANG=C export TZ=GMT +if [ $SIZEOF_UTMP -eq 384 ]; then + ln -s ${TS_SELF}/wtmp-ipv6.${BYTE_ORDER} $WTMP_FILE +else + $TS_CMD_UTMPDUMP -r ${TS_SELF}/txt-ipv6 > $WTMP_FILE 2>/dev/null \ + || ts_skip "can't create test data" +fi + >| $TS_OUTPUT ts_log "~~~ dns short ~~~"