Debian Codegraph @

tests/ts/utmp/utmpdump-tobin-ipv6

raw
1 #!/bin/bash
2
3 # This file is part of util-linux.
4 #
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14
15 TS_TOPDIR="${0%/*}/../.."
16 TS_DESC="IPv6 to binary"
17
18 . "$TS_TOPDIR"/functions.sh
19 ts_init "$*"
20
21 . "$TS_SELF/utmp_functions.sh"
22 [ $SIZEOF_UTMP -eq 384 ] || ts_skip "utmp struct size $SIZEOF_UTMP"
23
24 export LANG=C
25 export TZ=Asia/Tokyo
26 OUTFILE=${TS_OUTDIR}/${TS_TESTNAME}.file
27 $TS_CMD_UTMPDUMP -r $TS_SELF/txt-ipv6 >| $OUTFILE 2>/dev/null
28 if diff -q $TS_SELF/wtmp-ipv6.$BYTE_ORDER $OUTFILE; then
29 echo "no diff"
30 fi >> $TS_OUTPUT 2>> $TS_ERRLOG
31
32 ts_finalize