summaryrefslogtreecommitdiffstats
path: root/tests/ts/utmp
diff options
context:
space:
mode:
authorRuediger Meier2014-06-11 19:22:41 +0200
committerRuediger Meier2014-06-12 01:09:35 +0200
commitfa57e908dad47fea5d7115148ec591c729ae44c6 (patch)
treeaed426e7e5a47fe022f626a98bfa9a929e78214e /tests/ts/utmp
parenttests: add utmpdump-circle test (arch independent) (diff)
downloadkernel-qcow2-util-linux-fa57e908dad47fea5d7115148ec591c729ae44c6.tar.gz
kernel-qcow2-util-linux-fa57e908dad47fea5d7115148ec591c729ae44c6.tar.xz
kernel-qcow2-util-linux-fa57e908dad47fea5d7115148ec591c729ae44c6.zip
tests: split last into dns and nodns subtests
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/utmp')
-rwxr-xr-xtests/ts/utmp/last18
-rwxr-xr-xtests/ts/utmp/last-ipv66
2 files changed, 14 insertions, 10 deletions
diff --git a/tests/ts/utmp/last b/tests/ts/utmp/last
index 1d813b85f..19de4ab28 100755
--- a/tests/ts/utmp/last
+++ b/tests/ts/utmp/last
@@ -37,14 +37,7 @@ else
|| ts_skip "can't create test data"
fi
->| $TS_OUTPUT
-
-ts_log "~~~ basic output ~~~"
-$TS_CMD_LAST -f $WTMP_FILE >> $TS_OUTPUT 2>/dev/null
-
-ts_log "~~~ include system ~~~"
-$TS_CMD_LAST -f $WTMP_FILE -x >> $TS_OUTPUT 2>/dev/null
-
+ts_init_subtest "dns"
ts_log "~~~ dns short ~~~"
$TS_CMD_LAST -f $WTMP_FILE -d root >> $TS_OUTPUT 2>/dev/null
@@ -53,6 +46,14 @@ $TS_CMD_LAST -f $WTMP_FILE -w -d root >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ dns host last ~~~"
$TS_CMD_LAST -f $WTMP_FILE -a -d root >> $TS_OUTPUT 2>/dev/null
+ts_finalize_subtest
+
+ts_init_subtest "nodns"
+ts_log "~~~ basic output ~~~"
+$TS_CMD_LAST -f $WTMP_FILE >> $TS_OUTPUT 2>/dev/null
+
+ts_log "~~~ include system ~~~"
+$TS_CMD_LAST -f $WTMP_FILE -x >> $TS_OUTPUT 2>/dev/null
ts_log "~~~ show ip ~~~"
$TS_CMD_LAST -f $WTMP_FILE -i torvalds >> $TS_OUTPUT 2>/dev/null
@@ -77,6 +78,7 @@ $TS_CMD_LAST -f $WTMP_FILE -s "2013-08-28 02:20" -t "2013-08-28 08:20" >> $TS_OU
ts_log "~~~ present ~~~"
$TS_CMD_LAST -f $WTMP_FILE -p "2013-08-28 11:20" >> $TS_OUTPUT 2>/dev/null
+ts_finalize_subtest
rm -f $WTMP_FILE
diff --git a/tests/ts/utmp/last-ipv6 b/tests/ts/utmp/last-ipv6
index 89b0e8328..17e65e7bf 100755
--- a/tests/ts/utmp/last-ipv6
+++ b/tests/ts/utmp/last-ipv6
@@ -37,8 +37,7 @@ else
|| ts_skip "can't create test data"
fi
->| $TS_OUTPUT
-
+ts_init_subtest "dns"
ts_log "~~~ dns short ~~~"
$TS_CMD_LAST -f $WTMP_FILE -d >> $TS_OUTPUT 2>/dev/null
@@ -47,12 +46,15 @@ $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_finalize_subtest
+ts_init_subtest "nodns"
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
+ts_finalize_subtest
rm -f $WTMP_FILE