]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
cleanup tests
authorStefan Schubert <schubi@suse.de>
Wed, 31 Jan 2024 09:06:28 +0000 (10:06 +0100)
committerStefan Schubert <schubi@suse.de>
Wed, 31 Jan 2024 09:06:28 +0000 (10:06 +0100)
tests/ts/lslogins/checkuser

index d50f73fe67832f5bdc6d9be12708f90261cdfc63..5971285b6d36dda393618ab80cf0521854342dcb 100755 (executable)
@@ -18,21 +18,7 @@ fi
 sqlite3 $TS_SELF/lastlog2.db < $TS_SELF/create_db.sql
 
 # tests for lastlog2 environment
-$TS_CMD_LSLOGINS -L --lastlog2="${TS_SELF}/lastlog2.db" root |grep "test-tty" >/dev/null
-if [ $? -ne 0 ]; then
-    rm $TS_SELF/lastlog2.db
-    ts_die "Cannot find test-tty for user root in lastlog2.db"
-fi
-$TS_CMD_LSLOGINS -L --lastlog2="${TS_SELF}/lastlog2.db" root |grep "test-host" >/dev/null
-if [ $? -ne 0 ]; then
-    rm $TS_SELF/lastlog2.db
-    ts_die "Cannot find test-host for user root in lastlog2.db"
-fi
-$TS_CMD_LSLOGINS -L --lastlog2="${TS_SELF}/lastlog2.db" root |grep "Jan29/1[0-9]:45" >/dev/null
-if [ $? -ne 0 ]; then
-    rm $TS_SELF/lastlog2.db
-    ts_die "Cannot find correct last login Jan29/16:45 for user root in lastlog2.db"
-fi
+TZ=US/Pacific "$TS_CMD_LSLOGINS" --lastlog-file=/dev/null --lastlog2-file="${TS_SELF}/lastlog2.db" --wtmp-file=/dev/null --btmp-file=/dev/null --output USER,LAST-LOGIN,LAST-TTY,LAST-HOSTNAME root > "$TS_OUTPUT"
 
 rm $TS_SELF/lastlog2.db
 ts_finalize