⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 samba4_tests.sh

📁 samba最新软件
💻 SH
📖 第 1 页 / 共 2 页
字号:
#!/bin/sh# This script generates a list of testsuites that should be run as part of # the Samba 4 test suite.# The output of this script is parsed by selftest.pl, which then decides # which of the tests to actually run. It will, for example, skip all tests # listed in samba4-skip or only run a subset during "make quicktest".# The idea is that this script outputs all of the tests of Samba 4, not # just those that are known to pass, and list those that should be skipped # or are known to file in samba4-skip/samba4-knownfail. This makes it # very easy to see what functionality is still missing in Samba 4 and makes # it possible to run the testsuite against other servers, such as Samba 3 or # Windows that have a different set of features.# The syntax for a testsuite is "-- TEST --" on a single line, followed # by the name of the test, the environment it needs and the command to run, all # three separated by newlines. All other lines in the output are considered # comments.if [ ! -n "$PERL" ]then	PERL=perlfiincdir=`dirname $0`plantest() {	name=$1	env=$2	shift 2	cmdline="$*"	echo "-- TEST --"	if [ "$env" = "none" ]; then		echo "samba4.$name"	else		echo "samba4.$name ($env)"	fi	echo $env	echo $cmdline}normalize_testname() {	name=$1	shift 1	echo $name | tr "A-Z-" "a-z."}plansmbtorturetest() {	name=$1	env=$2	shift 2	other_args="$*"	modname=`normalize_testname $name`	cmdline="$VALGRIND $smb4torture $other_args $name"	plantest "$modname" "$env" $cmdline}$incdir/../bin/smbtorture -Vsamba4srcdir=$incdir/..samba4bindir=$samba4srcdir/binSCRIPTDIR=$samba4srcdir/../testprogs/ejssmb4torture="$samba4bindir/smbtorture $TORTURE_OPTIONS"plantest "js.base" dc "$SCRIPTDIR/base.js" $CONFIGURATIONplantest "js.ldb" none "$SCRIPTDIR/ldb.js" `pwd` $CONFIGURATION -d 10# Simple tests for LDAP and CLDAPfor options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do    plantest "ldb.ldap with options $options" dc $samba4srcdir/../testprogs/blackbox/test_ldb.sh ldap \$SERVER_IP $optionsdone# see if we support ldapsif grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then    for options in "" "-U\$USERNAME%\$PASSWORD"; do	plantest "ldb.ldaps with options $options" dc $samba4srcdir/../testprogs/blackbox/test_ldb.sh ldaps \$SERVER_IP $options    donefiplantest "ldb.ldapi with options $options" dc $samba4srcdir/../testprogs/blackbox/test_ldb.sh ldapi \$PREFIX_ABS/dc/private/ldapi $optionsfor t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA LDAP-UPTODATEVECTORdo	plansmbtorturetest "$t" dc "-U\$USERNAME%\$PASSWORD" //\$SERVER_IP/_none_done# only do the ldb tests when not in quick mode - they are quite slow, and ldb# is now pretty well tested by the rest of the quick tests anywayLDBDIR=$samba4srcdir/lib/ldbexport LDBDIRplantest "ldb" none TEST_DATA_PREFIX=\$PREFIX $LDBDIR/tests/test-tdb.shplantest "js.ldap" dc $SCRIPTDIR/ldap.js $CONFIGURATION -d 10 \$SERVER -U\$USERNAME%\$PASSWORD# Tests for RPC# add tests to this list as they start passing, so we test# that they stay passingncacn_np_tests="RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-SAMSYNC RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME RPC-SAMBA3-LSA RPC-BINDSAMBA3 RPC-NETLOGSAMBA3 RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT"ncalrpc_tests="RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-DRSUAPI RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT"ncacn_ip_tcp_tests="RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-DSSYNC RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT"slow_ncacn_np_tests="RPC-SAMLOGON RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS"slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-PASSWORDS"slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-PASSWORDS RPC-CRACKNAMES"all_tests="$ncalrpc_tests $ncacn_np_tests $ncacn_ip_tcp_tests $slow_ncalrpc_tests $slow_ncacn_np_tests $slow_ncacn_ip_tcp_tests RPC-SECRETS RPC-SAMBA3-SHARESEC"# Make sure all tests get runfor t in `$smb4torture --list | grep "^RPC-"`do	echo $all_tests | grep $t  > /dev/null	if [ $? -ne 0 ]	then		auto_rpc_tests="$auto_rpc_tests $t"	fidonefor bindoptions in seal,padcheck $VALIDATE bigendian; do for transport in ncalrpc ncacn_np ncacn_ip_tcp; do     case $transport in	 ncalrpc) tests=$ncalrpc_tests ;;	 ncacn_np) tests=$ncacn_np_tests ;;	 ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;     esac   for t in $tests; do    plantest "`normalize_testname $t` on $transport with $bindoptions" dc $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"   done   plantest "rpc.samba3.sharesec on $transport with $bindoptions" dc $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=torture:share=tmp RPC-SAMBA3-SHARESEC "$*" donedonefor bindoptions in "" $VALIDATE bigendian; do for t in $auto_rpc_tests; do  plantest "`normalize_testname $t` with $bindoptions" dc $VALGRIND $smb4torture "\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*" donedonefor bindoptions in connect $VALIDATE ; do for transport in ncalrpc ncacn_np ncacn_ip_tcp; do     case $transport in	 ncalrpc) tests=$slow_ncalrpc_tests ;;	 ncacn_np) tests=$slow_ncacn_np_tests ;;	 ncacn_ip_tcp) tests=$slow_ncacn_ip_tcp_tests ;;     esac   for t in $tests; do    plantest "`normalize_testname $t` on $transport with $bindoptions" dc $VALGRIND $smb4torture $transport:"\$SERVER[$bindoptions]" -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN $t "$*"   done donedone# Tests for the NET APInet=`$smb4torture --list | grep ^NET-`for t in $net; do    plansmbtorturetest "$t" dc "\$SERVER[$VALIDATE]" -U"\$USERNAME"%"\$PASSWORD" -W "\$DOMAIN" "$*"done# Tests for session keysbindoptions=""transport="ncacn_np"for ntlmoptions in \        "-k no --option=usespnego=yes" \        "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no" \        "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes" \        "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no" \        "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \        "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no" \        "-k no --option=usespnego=yes --option=clientntlmv2auth=yes" \        "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no" \        "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes" \        "-k no --option=usespnego=no --option=clientntlmv2auth=yes" \        "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes" \        "-k no --option=usespnego=no"; do	name="rpc.secrets on $transport with $bindoptions with $ntlmoptions"   plantest "$name" dc $smb4torture $transport:"\$SERVER[$bindoptions]"  $ntlmoptions -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN --option=gensec:target_hostname=\$NETBIOSNAME RPC-SECRETS "$*"doneplantest "rpc.secrets on $transport with $bindoptions with Kerberos" dc $smb4torture $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*"plantest "rpc.secrets on $transport with $bindoptions with Kerberos - use target principal" dc $smb4torture $transport:"\$SERVER[$bindoptions]" -k yes -U"\$USERNAME"%"\$PASSWORD" -W \$DOMAIN "--option=clientusespnegoprincipal=yes" "--option=gensec:target_hostname=\$NETBIOSNAME" RPC-SECRETS "$*"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -