diff options
author | Ruediger Meier | 2014-06-11 20:26:04 +0200 |
---|---|---|
committer | Ruediger Meier | 2014-06-12 01:09:27 +0200 |
commit | 85f7fb663689623f28b0ae42a3f3b1e5962105d6 (patch) | |
tree | 2b1512cd67b81f04bcc4e9f5754f5fe69ce2df95 /tests/ts/utmp | |
parent | tests: skip utmpdump tests for exotic archs (diff) | |
download | kernel-qcow2-util-linux-85f7fb663689623f28b0ae42a3f3b1e5962105d6.tar.gz kernel-qcow2-util-linux-85f7fb663689623f28b0ae42a3f3b1e5962105d6.tar.xz kernel-qcow2-util-linux-85f7fb663689623f28b0ae42a3f3b1e5962105d6.zip |
tests: provide missing test data for "last" on exotic archs
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/utmp')
-rwxr-xr-x | tests/ts/utmp/last | 11 | ||||
-rwxr-xr-x | tests/ts/utmp/last-ipv6 | 11 |
2 files changed, 18 insertions, 4 deletions
diff --git a/tests/ts/utmp/last b/tests/ts/utmp/last index 7154a76b3..1d813b85f 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 80c20bacd..89b0e8328 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 ~~~" |