mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Add blackbox test for ndrdump, to ensure it at least does not
segfault.
Andrew Bartlett
(This used to be commit d2fe61a13a
)
This commit is contained in:
parent
223df634c8
commit
afaba23131
@ -265,6 +265,7 @@ fi
|
||||
|
||||
bbdir=$incdir/../../testprogs/blackbox
|
||||
|
||||
plantest "blackbox.ndrdump" dc $bbdir/test_ndrdump.sh
|
||||
plantest "blackbox.smbclient" dc $bbdir/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
|
||||
plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" $CONFIGURATION
|
||||
plantest "blackbox.cifsdd" dc $bbdir/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN"
|
||||
|
BIN
testprogs/blackbox/ndrdump/samr-CreateUser-in.dat
Normal file
BIN
testprogs/blackbox/ndrdump/samr-CreateUser-in.dat
Normal file
Binary file not shown.
BIN
testprogs/blackbox/ndrdump/samr-CreateUser-out.dat
Normal file
BIN
testprogs/blackbox/ndrdump/samr-CreateUser-out.dat
Normal file
Binary file not shown.
33
testprogs/blackbox/test_ndrdump.sh
Normal file
33
testprogs/blackbox/test_ndrdump.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
# Blackbox tests for masktest
|
||||
# Copyright (C) 2008 Andrew Tridgell
|
||||
# Copyright (C) 2008 Andrew Bartlett
|
||||
# based on test_smbclient.sh
|
||||
|
||||
failed=0
|
||||
|
||||
samba4bindir=`dirname $0`/../../source/bin
|
||||
ndrdump=$samba4bindir/ndrdump
|
||||
files=`dirname $0`/ndrdump
|
||||
|
||||
testit() {
|
||||
name="$1"
|
||||
shift
|
||||
cmdline="$*"
|
||||
echo "test: $name"
|
||||
$cmdline
|
||||
status=$?
|
||||
if [ x$status = x0 ]; then
|
||||
echo "success: $name"
|
||||
else
|
||||
echo "failure: $name"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
testit "ndrdump with in" $VALGRIND $ndrdump samr samr_CreateUser in $files/samr-CreateUser-in.dat $@ || failed=`expr $failed + 1`
|
||||
testit "ndrdump with out" $VALGRIND $ndrdump samr samr_CreateUser out $files/samr-CreateUser-out.dat $@ || failed=`expr $failed + 1`
|
||||
testit "ndrdump with --context-file" $VALGRIND $ndrdump --context-file $files/samr-CreateUser-in.dat samr samr_CreateUser out $files/samr-CreateUser-out.dat $@ || failed=`expr $failed + 1`
|
||||
testit "ndrdump with validate" $VALGRIND $ndrdump --validate samr samr_CreateUser in $files/samr-CreateUser-in.dat $@ || failed=`expr $failed + 1`
|
||||
|
||||
exit $failed
|
Loading…
Reference in New Issue
Block a user