Rev 11310: Couple of random fixes: in file:///home/jelmer/bzr.samba/4.0-perlselftest/

Jelmer Vernooij jelmer at samba.org
Sat Feb 3 19:09:57 GMT 2007


At file:///home/jelmer/bzr.samba/4.0-perlselftest/

------------------------------------------------------------
revno: 11310
revision-id: jelmer at samba.org-20070203190819-y3ks440ony3wlzxr
parent: jelmer at samba.org-20070201140646-jjupoe5w0no3fm00
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 4.0-perlselftest
timestamp: Sat 2007-02-03 20:08:19 +0100
message:
  Couple of random fixes:
  
   * Fix dependency for 'test' target
   * Support initialisation for output formats in smbtorture
   * Fix broken parsing of variables outputted by test environment generator
modified:
  source/librpc/idl/winreg.idl   svn-v2:6 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2flibrpc%2fidl%2fwinreg.idl
  source/main.mk                 svn-v2:8991 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fmain.mk
  source/script/tests/mk-fedora-ds.sh* svn-v2:21069 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fmk%2dfedora%2dds.sh
  source/script/tests/mk-keyblobs.sh* svn-v2:21069 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fmk%2dkeyblobs.sh
  source/script/tests/mk-openldap.sh* svn-v2:21069 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fmk%2dopenldap.sh
  source/script/tests/mktestsetup.sh svn-v2:16522 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fmktestsetup.sh
  source/script/tests/mktestsetup.sh.share_ldb* svn-v2:17208 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fmktestsetup.sh.share_ldb
  source/script/tests/selftest.pl svn-v2:20693 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fselftest.pl
  source/torture/smbtorture.c    svn-v2:14520 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2ftorture%2fsmbtorture.c
  source/torture/torture.c       svn-v2:2 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-trunk-source%2ftorture%2ftorture.c
  source/torture/ui.h            svn-v2:14718 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2ftorture%2fui.h
=== modified file 'source/librpc/idl/winreg.idl'
--- a/source/librpc/idl/winreg.idl	2006-11-22 18:06:08 +0000
+++ b/source/librpc/idl/winreg.idl	2007-02-03 19:08:19 +0000
@@ -155,7 +155,7 @@
 		[in,ref]        policy_handle *handle,
 		[in]            uint32 enum_index,
 		[in,out,ref]    winreg_StringBuf *name,
-		[in,out,unique] winreg_Type *type,
+		[in,out,ref] winreg_Type **type,
 		[in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
 		[in,out,unique] uint32 *size,
 		[in,out,unique] uint32 *length

=== modified file 'source/main.mk'
--- a/source/main.mk	2007-02-01 14:06:46 +0000
+++ b/source/main.mk	2007-02-03 19:08:19 +0000
@@ -289,10 +289,10 @@
 
 SELFTEST = $(srcdir)/script/tests/selftest.pl --prefix=${selftest_prefix} --builddir=$(builddir) --srcdir=$(srcdir) --expected-failures=samba4-knownfail 
 
-test:
+test: all libraries
 	$(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS)
 
-testone:
+testone: all libraries
 	$(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) --one
 
 test-swrap: all libraries

=== modified file 'source/script/tests/mk-fedora-ds.sh' (properties changed)
=== modified file 'source/script/tests/mk-keyblobs.sh' (properties changed)
=== modified file 'source/script/tests/mk-openldap.sh' (properties changed)
=== modified file 'source/script/tests/mktestsetup.sh'
--- a/source/script/tests/mktestsetup.sh	2007-01-31 07:08:36 +0000
+++ b/source/script/tests/mktestsetup.sh	2007-02-03 19:08:19 +0000
@@ -280,8 +280,6 @@
 echo "CONFFILE=$CONFFILE"
 echo "SLAPD_CONF=$SLAPD_CONF"
 echo "PIDDIR=$PIDDIR"
-echo "AUTH=$AUTH"
-echo "SERVER=$SERVER"
 echo "NETBIOSNAME=$NETBIOSNAME"
 echo "LDAP_URI=$LDAP_URI"
 echo "LDAP_URI_ESCAPE=$LDAP_URI_ESCAPE"
@@ -296,7 +294,7 @@
 echo "SRCDIR=$SRCDIR"
 echo "ROOT=$ROOT"
 echo "SERVER=$SERVER"
-echo "NETBIOSNAME=$NETBIOSNAME"
 echo "PREFIX=$PREFIX"
 echo "SMBD_LOGLEVEL=$SMBD_LOGLEVEL"
 echo "LDAPDIR=$LDAPDIR"
+echo "LOCKDIR=$LOCKDIR"

=== modified file 'source/script/tests/mktestsetup.sh.share_ldb' (properties changed)
=== modified file 'source/script/tests/selftest.pl'
--- a/source/script/tests/selftest.pl	2007-02-01 14:06:46 +0000
+++ b/source/script/tests/selftest.pl	2007-02-03 19:08:19 +0000
@@ -116,6 +116,7 @@
 my $opt_target = "samba4";
 my $opt_quick = 0;
 my $opt_socket_wrapper = 0;
+my $opt_socket_wrapper_pcap = undef;
 my $opt_one = 0;
 my $opt_immediate = 0;
 my $opt_expected_failures = undef;
@@ -357,6 +358,7 @@
 
 Target Specific:
  --target=samba4|samba3|win Samba version to target
+ --socket-wrapper-pcap=FILE save traffic to pcap file
  --socket-wrapper           enable socket wrapper
  --expected-failures=FILE   specify list of tests that is guaranteed to fail
 
@@ -375,6 +377,7 @@
 		'target=s' => \$opt_target,
 		'prefix=s' => \$prefix,
 		'socket-wrapper' => \$opt_socket_wrapper,
+		'socket-wrapper-pcap=s' => \$opt_socket_wrapper_pcap,
 		'quick' => \$opt_quick,
 		'one' => \$opt_one,
 		'immediate' => \$opt_immediate,
@@ -437,7 +440,7 @@
 	print "PROVISIONING...";
 	open(IN, "$RealBin/mktestsetup.sh $prefix|") or die("Unable to setup");
 	while (<IN>) {
-		next unless (/^([A-Z_]+)=(.*)$/);
+		die ("Error parsing `$_'") unless (/^([A-Z0-9a-z_]+)=(.*)$/);
 		$ENV{$1} = $2;
 	}
 	close(IN);
@@ -461,6 +464,12 @@
 	die("unknown target `$opt_target'");
 }
 
+if ($opt_socket_wrapper_pcap) {
+	$ENV{SOCKET_WRAPPER_PCAP_FILE} = $opt_socket_wrapper_pcap;
+	# Socket wrapper pcap implies socket wrapper
+	$opt_socket_wrapper = 1;
+}
+
 my $socket_wrapper_dir;
 if ( $opt_socket_wrapper) 
 {

=== modified file 'source/torture/smbtorture.c'
--- a/source/torture/smbtorture.c	2007-02-01 12:24:26 +0000
+++ b/source/torture/smbtorture.c	2007-02-03 19:08:19 +0000
@@ -323,6 +323,11 @@
 	.test_result = simple_test_result
 };
 
+static void subunit_init(struct torture_context *ctx) 
+{
+	/* FIXME: register segv and bus handler */
+}
+
 static void subunit_suite_start(struct torture_context *ctx,
 							   struct torture_suite *suite)
 {
@@ -365,6 +370,7 @@
 }
 
 const static struct torture_ui_ops subunit_ui_ops = {
+	.init = subunit_init,
 	.comment = subunit_comment,
 	.test_start = subunit_test_start,
 	.test_result = subunit_test_result,

=== modified file 'source/torture/torture.c'
--- a/source/torture/torture.c	2007-02-01 12:24:26 +0000
+++ b/source/torture/torture.c	2007-02-03 19:08:19 +0000
@@ -49,6 +49,9 @@
 	torture->ui_ops = ui_ops;
 	torture->returncode = true;
 
+	if (ui_ops->init)
+		ui_ops->init(torture);
+
 	return torture;
 }
 

=== modified file 'source/torture/ui.h'
--- a/source/torture/ui.h	2007-02-01 12:24:26 +0000
+++ b/source/torture/ui.h	2007-02-03 19:08:19 +0000
@@ -40,6 +40,7 @@
  */
 struct torture_ui_ops
 {
+	void (*init) (struct torture_context *);
 	void (*comment) (struct torture_context *, const char *);
 	void (*suite_start) (struct torture_context *, struct torture_suite *);
 	void (*suite_finish) (struct torture_context *, struct torture_suite *);



More information about the samba-cvs mailing list