summaryrefslogtreecommitdiffstats
path: root/tests/ts/last/ipv6
blob: e3e7dd1b36d18fa578ff597dbf8af5f10cf162c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash

# This file is part of util-linux.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

TS_TOPDIR="${0%/*}/../.."
TS_DESC="last ipv6"

. $TS_TOPDIR/functions.sh
ts_init "$*"

ts_check_test_command "$TS_CMD_LAST"
$TS_CMD_LAST --version 2>&1 | grep -q "invalid option" \
	&& ts_skip "deprecated 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 $WTMP_FILE -d >> $TS_OUTPUT 2>/dev/null

ts_log "~~~ dns long ~~~"
$TS_CMD_LAST -f $WTMP_FILE -d -w >> $TS_OUTPUT 2>/dev/null

ts_log "~~~ dns host last ~~~"
$TS_CMD_LAST -f $WTMP_FILE -d -a >> $TS_OUTPUT 2>/dev/null

ts_log "~~~ show ip ~~~"
$TS_CMD_LAST -f $WTMP_FILE -i >> $TS_OUTPUT 2>/dev/null

ts_log "~~~ show ip last ~~~"
$TS_CMD_LAST -f $WTMP_FILE -i -a >> $TS_OUTPUT 2>/dev/null

rm -f $WTMP_FILE

ts_finalize