From 7e088ec35424fc2d6c64b8699d9d22b3215275e2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 19 Oct 2008 14:41:10 +0200 Subject: Fix comment after paths have changed. --- source4/selftest/tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh index fa799f51ff..5f148909e2 100755 --- a/source4/selftest/tests.sh +++ b/source4/selftest/tests.sh @@ -4,11 +4,11 @@ # 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". +# listed in selftest/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 +# or are known to fail in selftest/skip or selftest/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. -- cgit From c0de338394c9e2dd80a3ad06341fe95b1ea169ed Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 19 Oct 2008 16:07:00 +0200 Subject: Move Samba4-specific code out of selftest. --- source4/selftest/tests.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'source4') diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh index 5f148909e2..b02b7bb890 100755 --- a/source4/selftest/tests.sh +++ b/source4/selftest/tests.sh @@ -58,8 +58,31 @@ bin/smbtorture -V samba4srcdir=. samba4bindir=$samba4srcdir/bin + +prefix_abs="$SELFTEST_PREFIX/s4client" + +mkdir "$prefix_abs" +conffile="$SELFTEST_CONFFILE" + +TORTURE_OPTIONS="" +TORTURE_OPTIONS="$TORTURE_OPTIONS --configfile=$conffile" +TORTURE_OPTIONS="$TORTURE_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME" +TORTURE_OPTIONS="$TORTURE_OPTIONS --target=$SELFTEST_TARGET" +TORTURE_OPTIONS="$TORTURE_OPTIONS --basedir=$prefix_abs" +if [ -n "$SELFTEST_VERBOSE" ]; then + TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:progress=no" +fi +TORTURE_OPTIONS="$TORTURE_OPTIONS --format=subunit" +if [ -n "$SELFTEST_QUICK" ]; then + TORTURE_OPTIONS="$TORTURE_OPTIONS --option=torture:quick=yes" +fi smb4torture="$samba4bindir/smbtorture $TORTURE_OPTIONS" +echo "OPTIONS $TORTURE_OPTIONS" + +SMB_CONF_PATH="$conffile" +CONFIGURATION="--configfile=$conffile" + # Simple tests for LDAP and CLDAP for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do -- cgit From e549759efe0b782106e6892685e0494376e592ff Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 20 Oct 2008 10:18:02 +0200 Subject: Fix blackbox tests on IPv6-only hosts. --- source4/scripting/python/samba/provision.py | 19 +++++++++++++++---- source4/setup/provision.zone | 4 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'source4') diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 4764d0cafa..823d5e6ff6 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -959,13 +959,16 @@ def provision(setup_dir, message, session_info, paths = provision_paths_from_lp(lp, names.dnsdomain) if hostip is None: - hostip = socket.getaddrinfo(names.hostname, None, socket.AF_INET, socket.AI_CANONNAME, socket.IPPROTO_IP)[0][-1][0] + try: + hostip = socket.getaddrinfo(names.hostname, None, socket.AF_INET, socket.AI_CANONNAME, socket.IPPROTO_IP)[0][-1][0] + except socket.gaierror, (socket.EAI_NODATA, msg): + hostip = None if hostip6 is None: try: hostip6 = socket.getaddrinfo(names.hostname, None, socket.AF_INET6, socket.AI_CANONNAME, socket.IPPROTO_IP)[0][-1][0] - except socket.gaierror: - pass + except socket.gaierror, (socket.EAI_NODATA, msg): + hostip6 = None if serverrole is None: serverrole = lp.get("server role") @@ -1426,12 +1429,20 @@ def create_zone_file(path, setup_path, dnsdomain, domaindn, hostip6_base_line = "" hostip6_host_line = "" + if hostip is not None: + hostip_base_line = " IN A " + hostip + hostip_host_line = hostname + " IN A " + hostip + else: + hostip_base_line = "" + hostip_host_line = "" + setup_file(setup_path("provision.zone"), path, { "DNSPASS_B64": b64encode(dnspass), "HOSTNAME": hostname, "DNSDOMAIN": dnsdomain, "REALM": realm, - "HOSTIP": hostip, + "HOSTIP_BASE_LINE": hostip_base_line, + "HOSTIP_HOST_LINE": hostip_host_line, "DOMAINGUID": domainguid, "DATESTRING": time.strftime("%Y%m%d%H"), "DEFAULTSITE": DEFAULTSITE, diff --git a/source4/setup/provision.zone b/source4/setup/provision.zone index 17ae3bb47a..e7d600df87 100644 --- a/source4/setup/provision.zone +++ b/source4/setup/provision.zone @@ -10,10 +10,10 @@ $TTL 1W 1W ) ; minimum IN NS ${HOSTNAME} ${HOSTIP6_BASE_LINE} - IN A ${HOSTIP} +${HOSTIP_BASE_LINE} ; ${HOSTIP6_HOST_LINE} -${HOSTNAME} IN A ${HOSTIP} +${HOSTIP_HOST_LINE} gc._msdcs IN CNAME ${HOSTNAME} ${HOSTGUID}._msdcs IN CNAME ${HOSTNAME} ; -- cgit From c3d8f472e8acbfd73fdd4707f70a3d153f62f033 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 20 Oct 2008 10:53:26 +0200 Subject: Export variables correctly for blackbox tests (thanks metze). --- source4/selftest/tests.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4') diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh index b02b7bb890..42bc8141c6 100755 --- a/source4/selftest/tests.sh +++ b/source4/selftest/tests.sh @@ -81,7 +81,9 @@ smb4torture="$samba4bindir/smbtorture $TORTURE_OPTIONS" echo "OPTIONS $TORTURE_OPTIONS" SMB_CONF_PATH="$conffile" +export SMB_CONF_PATH CONFIGURATION="--configfile=$conffile" +export CONFIGURATION # Simple tests for LDAP and CLDAP -- cgit