Skip to content

Commit

Permalink
tombstone-expunge: Assert than an expunge does not bump the USN
Browse files Browse the repository at this point in the history
Signed-off-by: Garming Sam <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
GSam committed Sep 8, 2016
1 parent a9c6879 commit cf587f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions testprogs/blackbox/tombstones-expunge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $?
Expand All @@ -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() {
Expand Down

0 comments on commit cf587f9

Please sign in to comment.