1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

tdb: Add test for tdbdump -x

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Christof Schmitt 2024-04-12 15:48:02 -07:00
parent 5f5290c271
commit 1a55ee1107
3 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,12 @@
{
key(11) = "6E62745F73657276657200"
data(35) = "3937322E323134373438333634382F3130383537303633313337383637393533393200"
}
{
key(15) = "77696E62696E645F73657276657200"
data(25) = "3937372F313238323635343237313530393738393834303700"
}
{
key(14) = "6E6F746966792D6461656D6F6E00"
data(24) = "3939322F3633383936333832333534373439333635393800"
}

View File

@ -9,6 +9,7 @@ fi
TDB_FILE=$1
EXPECTED_DUMP=$2
EXPECTED_DUMP_X=$3
TEMP_DUMP=tempdump.txt
failed=0
@ -48,6 +49,10 @@ $BINDIR/tdbdump $TDB_FILE > $TEMP_DUMP
testit "Verifying tdbdump" cmp $TEMP_DUMP $EXPECTED_DUMP \
|| failed=$(expr $failed + 1)
$BINDIR/tdbdump -x $TDB_FILE > $TEMP_DUMP
testit "Verifying tdbdump -x" cmp $TEMP_DUMP $EXPECTED_DUMP_X \
|| failed=$(expr $failed + 1)
rm $TEMP_DUMP
exit $failed

View File

@ -217,7 +217,7 @@ def testonly(ctx):
os.symlink(ctx.path.make_node('test').abspath(), link)
sh_tests = ["test/test_tdbbackup.sh test/jenkins-be-hash.tdb",
"test/test_tdbdump.sh test/sample_tdb.tdb test/sample_tdb.txt"]
"test/test_tdbdump.sh test/sample_tdb.tdb test/sample_tdb.txt test/sample_tdb_x.txt"]
for sh_test in sh_tests:
cmd = "BINDIR=%s %s" % (blddir, sh_test)