[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Thu Sep 23 12:35:52 MDT 2010


The branch, master has been updated
       via  e74b709 selftest: Pass prefix to setup_env function.
       via  4c3985b selftest: Use variable for clientdir.
       via  4b901f6 torture: Remove unused variable.
      from  133878f s3-waf: convert LIBMSRPC into a subsystem.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e74b7091cd97eba52227d8e93d003043a2f1a0cf
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Thu Sep 23 10:28:22 2010 -0700

    selftest: Pass prefix to setup_env function.

commit 4c3985b584e89cb90e49c352f53da5621107c453
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Thu Sep 23 01:42:57 2010 -0700

    selftest: Use variable for clientdir.

commit 4b901f6d8b898a7582a167835071c856f267536f
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 22 23:40:20 2010 -0700

    torture: Remove unused variable.

-----------------------------------------------------------------------

Summary of changes:
 lib/torture/torture.c |    1 -
 selftest/selftest.pl  |   46 ++++++++++++++++++++++++----------------------
 2 files changed, 24 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/torture/torture.c b/lib/torture/torture.c
index 379f1dd..74dfce1 100644
--- a/lib/torture/torture.c
+++ b/lib/torture/torture.c
@@ -339,7 +339,6 @@ static bool internal_torture_run_test(struct torture_context *context,
 					  const char **restricted)
 {
 	bool success;
-	char *old_testname = NULL;
 	char *subunit_testname = NULL;
 
 	if (tcase == NULL || strcmp(test->name, tcase->name) != 0) { 
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 4ed168c..37360b9 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -529,31 +529,33 @@ my $interfaces = join(',', ("127.0.0.11/8",
 			    "127.0.0.15/8",
 			    "127.0.0.16/8"));
 
-my $conffile = "$prefix_abs/client/client.conf";
+my $clientdir = "$prefix_abs/client";
+
+my $conffile = "$clientdir/client.conf";
 $ENV{SMB_CONF_PATH} = $conffile;
 
-sub write_clientconf($$)
+sub write_clientconf($$$)
 {
-	my ($conffile, $vars) = @_;
+	my ($conffile, $clientdir, $vars) = @_;
 
-	mkdir("$prefix/client", 0777) unless -d "$prefix/client";
+	mkdir("$clientdir", 0777) unless -d "$clientdir";
 
-	if ( -d "$prefix/client/private" ) {
-	        unlink <$prefix/client/private/*>;
+	if ( -d "$clientdir/private" ) {
+	        unlink <$clientdir/private/*>;
 	} else {
-	        mkdir("$prefix/client/private", 0777);
+	        mkdir("$clientdir/private", 0777);
 	}
 
-	if ( -d "$prefix/client/lockdir" ) {
-	        unlink <$prefix/client/lockdir/*>;
+	if ( -d "$clientdir/lockdir" ) {
+	        unlink <$clientdir/lockdir/*>;
 	} else {
-	        mkdir("$prefix/client/lockdir", 0777);
+	        mkdir("$clientdir/lockdir", 0777);
 	}
 
-	if ( -d "$prefix_abs/client/ncalrpcdir" ) {
-	        unlink <$prefix/client/ncalrpcdir/*>;
+	if ( -d "$clientdir/ncalrpcdir" ) {
+	        unlink <$clientdir/ncalrpcdir/*>;
 	} else {
-	        mkdir("$prefix/client/ncalrpcdir", 0777);
+	        mkdir("$clientdir/ncalrpcdir", 0777);
 	}
 
 	open(CF, ">$conffile");
@@ -574,9 +576,9 @@ sub write_clientconf($$)
 		print CF "\tinterfaces = $interfaces\n";
 	}
 	print CF "
-	private dir = $prefix_abs/client/private
-	lock dir = $prefix_abs/client/lockdir
-	ncalrpc dir = $prefix_abs/client/ncalrpcdir
+	private dir = $clientdir/private
+	lock dir = $clientdir/lockdir
+	ncalrpc dir = $clientdir/ncalrpcdir
 	name resolve order = bcast file
 	panic action = $RealBin/gdb_backtrace \%PID\% \%PROG\%
 	max xmit = 32K
@@ -585,7 +587,7 @@ sub write_clientconf($$)
 	system:anonymous = true
 	client lanman auth = Yes
 	log level = 1
-	torture:basedir = $prefix_abs/client
+	torture:basedir = $clientdir
 #We don't want to pass our self-tests if the PAC code is wrong
 	gensec:require_pac = true
 	modules dir = $ENV{LD_SAMBA_MODULE_PATH}
@@ -807,9 +809,9 @@ $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
 	die("Received signal $signame");
 };
 
-sub setup_env($)
+sub setup_env($$)
 {
-	my ($name) = @_;
+	my ($name, $prefix) = @_;
 
 	my $testenv_vars = undef;
 
@@ -843,7 +845,7 @@ sub setup_env($)
 		$ENV{SMB_CONF_PATH} = $testenv_vars->{SERVERCONFFILE};
 	} elsif ($option eq "client") {
 		SocketWrapper::set_default_iface(11);
-		write_clientconf($conffile, $testenv_vars);
+		write_clientconf($conffile, $clientdir, $testenv_vars);
 		$ENV{SMB_CONF_PATH} = $conffile;
 	} else {
 		die("Unknown option[$option] for envname[$envname]");
@@ -902,7 +904,7 @@ if ($opt_testenv) {
 	my $testenv_name = $ENV{SELFTEST_TESTENV};
 	$testenv_name = $testenv_default unless defined($testenv_name);
 
-	my $testenv_vars = setup_env($testenv_name);
+	my $testenv_vars = setup_env($testenv_name, $prefix);
 
 	die("Unable to setup environment $testenv_name") unless ($testenv_vars);
 
@@ -931,7 +933,7 @@ $envvarstr
 		my $name = $$_[0];
 		my $envname = $$_[1];
 
-		my $envvars = setup_env($envname);
+		my $envvars = setup_env($envname, $prefix);
 		if (not defined($envvars)) {
 			Subunit::start_testsuite($name);
 			Subunit::end_testsuite($name, "error",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list