From cf587f9aff2638a31463ee6b28430ff7a3efb505 Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Thu, 8 Sep 2016 15:27:42 +1200 Subject: [PATCH] tombstone-expunge: Assert than an expunge does not bump the USN Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett --- testprogs/blackbox/tombstones-expunge.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testprogs/blackbox/tombstones-expunge.sh b/testprogs/blackbox/tombstones-expunge.sh index f2826c4beaf0..2075d1c29445 100755 --- a/testprogs/blackbox/tombstones-expunge.sh +++ b/testprogs/blackbox/tombstones-expunge.sh @@ -46,6 +46,10 @@ undump() { tombstones_expunge() { tmpfile=$PREFIX_ABS/$RELEASE/expected-expunge-output.txt + tmpldif1=$PREFIX_ABS/$RELEASE/expected-expunge-output2.txt.tmp1 + + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb -s base -b '' | grep highestCommittedUSN > $tmpldif1 + $PYTHON $BINDIR/samba-tool domain tombstones expunge -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --current-time=2016-07-30 --tombstone-lifetime=4 > $tmpfile if [ "$?" != "0" ]; then return $? @@ -54,6 +58,14 @@ tombstones_expunge() { if [ "$?" != "0" ]; then return 1 fi + + tmpldif2=$PREFIX_ABS/$RELEASE/expected-expunge-output2.txt.tmp2 + TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb -s base -b '' | grep highestCommittedUSN > $tmpldif2 + + diff $tmpldif1 $tmpldif2 + if [ "$?" != "0" ]; then + return 1 + fi } add_two_more_users() {