subunit name challenges: Attempting to run tests for plugin_s4_dc

Michael Adam obnox at samba.org
Thu Apr 26 06:33:50 MDT 2012


Hi Andrew,

generally, I like the patch-idea very much.

The patch misses the flapping-part (corresponding to knownfail
and skip).

Regarding the nomenclature, I am not certain, as it is
not completely consistent:

* the tests from source4/selftest/ get a "samba4" prefix
* the tests from source3/selftest/ that are done with
  plansmbtorturetestsuite have a "samba" prefix
* the tests from source3/selftest/ that are done with
  plantestsuite directly are done with a "samba3" prefix

What would be a good systematic naming?
Is the "plugin_s4_dc" environent part of the pure source3 testsuite
at all? Or is it rather s/th that is part of the s4-testsuite?

Maybe we should move to a common top level tests.py and have
the top level and the source3 make test select an appropriate
list of tests and environments? Just brainstorming here, not
sure whether this is (easily) possible.

Cheers - Michael


Andrew Bartlett wrote:
> Jelmer,
> 
> Attached is my proposed change to how we name tests in tests.py
> 
> Essentially, tests previously named:
> samba3.raw.composite will be instead named samba.s3dc.raw.composite
> 
> This then allows (for example) samba.plugin_s4_dc.raw.composite to be
> added, testing plugin_s4_dc.  
> 
> Part of the problem stems from this:
> 
> selftest/selftesthelpers.py:
> def plantestsuite_loadlist(name, env, cmdline):
>     print "-- TEST-LOADLIST --"
>     if env == "none":
>         fullname = name
>     else:
>         fullname = "%s(%s)" % (name, env)
>     print fullname
>     print env
>     if isinstance(cmdline, list):
>         cmdline = " ".join(cmdline)
>     support_list = ("$LISTOPT" in cmdline)
>     print "%s $LOADLIST 2>&1 | %s" % (cmdline, add_prefix(name,
> support_list))
> 
> There, the testname is declared as samba3.raw.composite (s3dc)
> but on the subunit stream, the output name ends up as
> samba3.raw.composite .appendacl
> 
> Alternately, we could instead modify filter-subunit to have a --suffix
> option, to append (s3dc) to the end of the individual tests, if you
> would prefer that.  (I prefer the simple samba.env syntax, but I know
> you have some strong views here).
> 
> We do need to come to some kind of resolution here, as there are a
> number of tests that are being added that succeed in one environment,
> but fail in another.  (And then I hope we can start working down that
> list, but trying to fix everything at once will just stall s3fs
> forever).
> 
> In particular, I particularly want to get raw.composite running against
> both s3dc and plugin_s4_dc, as that will permanently validate the
> changes I made for the winbindd 'timeout' issue.
> 
> Thanks,
> 
> Andrew Bartlett
> -- 
> Andrew Bartlett                                http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org

> >From bc2f1cac46a3baaa9f6766cc60244a886a2126e1 Mon Sep 17 00:00:00 2001
> From: Andrew Bartlett <abartlet at samba.org>
> Date: Thu, 26 Apr 2012 15:20:02 +1000
> Subject: [PATCH] selftest: attempt to run most smbtorture tests against
>  plugin_s4_dc
> 
> ---
>  selftest/knownfail          |  112 +++++++++++++++++++++---------------------
>  selftest/selftesthelpers.py |    5 +--
>  selftest/skip               |   18 ++++----
>  selftest/target/Samba4.pm   |   55 +++++++++++++++++----
>  source3/selftest/tests.py   |   12 ++++-
>  5 files changed, 122 insertions(+), 80 deletions(-)
> 
> diff --git a/selftest/knownfail b/selftest/knownfail
> index 525fb4c..9767d87 100644
> --- a/selftest/knownfail
> +++ b/selftest/knownfail
> @@ -35,7 +35,7 @@
>  ^samba3.blackbox.rpcclient over ncacn_np with \[spnego,smb2,bigendian\]
>  ^samba3.blackbox.rpcclient over ncacn_np with \[spnego,connect,smb2\]
>  ^samba3.blackbox.rpcclient over ncacn_np with \[spnego,connect,smb2,bigendian\]
> -^samba3.raw.composite .appendacl # This needs ACL and IDMAP behaviour that s3 cannot provide, including mapping of arbitary sids.
> +^samba.s3dc.raw.composite.appendacl # This needs ACL and IDMAP behaviour that s3 cannot provide, including mapping of arbitary sids.
>  # these show that we still have some differences between our system
>  # with our internal iconv because it passes except when we bypass our
>  # internal iconv modules
> @@ -139,58 +139,58 @@
>  ^samba4.ldap.acl.*.AclSearchTests.test_search5$  # ACL search behaviour not enabled by default
>  ^samba4.ldap.acl.*.AclSearchTests.test_search6$  # ACL search behaviour not enabled by default
>  ^samba4.rpc.lsa.forest.trust #Not fully provided by Samba4
> -^samba3.smb2.create .gentest
> -^samba3.smb2.create .blob
> -^samba3.smb2.create .open
> -^samba3.smb2.create .leading-slash
> -^samba3.smb2.create .aclfile
> -^samba3.smb2.create .acldir
> -^samba3.smb2.create .nulldacl
> -^samba3.smb2.notify .valid-req
> -^samba3.smb2.notify .dir
> -^samba3.smb2.notify .rec
> -^samba3.smb2.durable-open .file-position
> -^samba3.smb2.durable-open .lease
> -^samba3.smb2.durable-open .lock
> -^samba3.smb2.durable-open .open
> -^samba3.smb2.durable-open .reopen1
> -^samba3.smb2.durable-open .reopen2
> -^samba3.smb2.durable-open .reopen2a
> -^samba3.smb2.durable-open .reopen3
> -^samba3.smb2.durable-open .reopen4
> -^samba3.smb2.durable-open .oplock
> -^samba3.smb2.durable-v2-open .open-oplock
> -^samba3.smb2.durable-v2-open .open-lease
> -^samba3.smb2.durable-v2-open .persistent-open-oplock
> -^samba3.smb2.durable-v2-open .persistent-open-lease
> -^samba3.smb2.ioctl .shadow_copy
> -^samba3.smb2.ioctl .req_resume_key
> -^samba3.smb2.ioctl .copy_chunk_simple
> -^samba3.smb2.ioctl .copy_chunk_multi
> -^samba3.smb2.ioctl .copy_chunk_tiny
> -^samba3.smb2.ioctl .copy_chunk_overwrite
> -^samba3.smb2.ioctl .copy_chunk_append
> -^samba3.smb2.dir .one
> -^samba3.smb2.dir .modify
> -^samba3.smb2.lease .request
> -^samba3.smb2.lease .upgrade
> -^samba3.smb2.lease .break
> -^samba3.smb2.lease .oplock
> -^samba3.smb2.lease .multibreak
> -^samba3.smb2.oplock .batch12
> -^samba3.smb2.oplock .batch20
> -^samba3.smb2.acls .CREATOR
> -^samba3.smb2.acls .GENERIC
> -^samba3.smb2.acls .OWNER
> -^samba3.smb2.acls .INHERITANCE
> -^samba3.smb2.acls .INHERITFLAGS
> -^samba3.smb2.acls .DYNAMIC
> -^samba3.smb2.streams .rename
> -^samba3.smb2.streams .rename2
> -^samba3.smb2.streams .attributes
> -^samba3.smb2.getinfo .getinfo
> -^samba3.smb2.setinfo .setinfo
> -^samba3.smb2.session .reconnect
> -^samba3.smb2.session .reauth
> -^samba3.rpc.spoolss.printer.*addprinter.driver_info_winreg # knownfail or flapping?
> -^samba3.rpc.spoolss.printer.*addprinterex.driver_info_winreg # knownfail or flapping?
> +^samba.(s3dc|plugin_s4_dc).smb2.create.gentest
> +^samba.(s3dc|plugin_s4_dc).smb2.create.blob
> +^samba.(s3dc|plugin_s4_dc).smb2.create.open
> +^samba.(s3dc|plugin_s4_dc).smb2.create.leading-slash
> +^samba.(s3dc|plugin_s4_dc).smb2.create.aclfile
> +^samba.(s3dc|plugin_s4_dc).smb2.create.acldir
> +^samba.(s3dc|plugin_s4_dc).smb2.create.nulldacl
> +^samba.(s3dc|plugin_s4_dc).smb2.notify.valid-req
> +^samba.(s3dc|plugin_s4_dc).smb2.notify.dir
> +^samba.(s3dc|plugin_s4_dc).smb2.notify.rec
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.file-position
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.lease
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.lock
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.open
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.reopen1
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.reopen2
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.reopen2a
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.reopen3
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.reopen4
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-open.oplock
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-v2-open.open-oplock
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-v2-open.open-lease
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-v2-open.persistent-open-oplock
> +^samba.(s3dc|plugin_s4_dc).smb2.durable-v2-open.persistent-open-lease
> +^samba.(s3dc|plugin_s4_dc).smb2.ioctl.shadow_copy
> +^samba.(s3dc|plugin_s4_dc).smb2.ioctl.req_resume_key
> +^samba.(s3dc|plugin_s4_dc).smb2.ioctl.copy_chunk_simple
> +^samba.(s3dc|plugin_s4_dc).smb2.ioctl.copy_chunk_multi
> +^samba.(s3dc|plugin_s4_dc).smb2.ioctl.copy_chunk_tiny
> +^samba.(s3dc|plugin_s4_dc).smb2.ioctl.copy_chunk_overwrite
> +^samba.(s3dc|plugin_s4_dc).smb2.ioctl.copy_chunk_append
> +^samba.(s3dc|plugin_s4_dc).smb2.dir.one
> +^samba.(s3dc|plugin_s4_dc).smb2.dir.modify
> +^samba.(s3dc|plugin_s4_dc).smb2.lease.request
> +^samba.(s3dc|plugin_s4_dc).smb2.lease.upgrade
> +^samba.(s3dc|plugin_s4_dc).smb2.lease.break
> +^samba.(s3dc|plugin_s4_dc).smb2.lease.oplock
> +^samba.(s3dc|plugin_s4_dc).smb2.lease.multibreak
> +^samba.(s3dc|plugin_s4_dc).smb2.oplock.batch12
> +^samba.(s3dc|plugin_s4_dc).smb2.oplock.batch20
> +^samba.(s3dc|plugin_s4_dc).smb2.acls.CREATOR
> +^samba.(s3dc|plugin_s4_dc).smb2.acls.GENERIC
> +^samba.(s3dc|plugin_s4_dc).smb2.acls.OWNER
> +^samba.(s3dc|plugin_s4_dc).smb2.acls.INHERITANCE
> +^samba.(s3dc|plugin_s4_dc).smb2.acls.INHERITFLAGS
> +^samba.(s3dc|plugin_s4_dc).smb2.acls.DYNAMIC
> +^samba.(s3dc|plugin_s4_dc).smb2.streams.rename
> +^samba.(s3dc|plugin_s4_dc).smb2.streams.rename2
> +^samba.(s3dc|plugin_s4_dc).smb2.streams.attributes
> +^samba.(s3dc|plugin_s4_dc).smb2.getinfo.getinfo
> +^samba.(s3dc|plugin_s4_dc).smb2.setinfo.setinfo
> +^samba.(s3dc|plugin_s4_dc).smb2.session.reconnect
> +^samba.(s3dc|plugin_s4_dc).smb2.session.reauth
> +^samba.s3dc.rpc.spoolss.printer.*addprinter.driver_info_winreg # knownfail or flapping?
> +^samba.s3dc.rpc.spoolss.printer.*addprinterex.driver_info_winreg # knownfail or flapping?
> diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
> index 991574e..ecc8840 100644
> --- a/selftest/selftesthelpers.py
> +++ b/selftest/selftesthelpers.py
> @@ -119,10 +119,7 @@ def add_prefix(prefix, support_list=False):
>  
>  def plantestsuite_loadlist(name, env, cmdline):
>      print "-- TEST-LOADLIST --"
> -    if env == "none":
> -        fullname = name
> -    else:
> -        fullname = "%s(%s)" % (name, env)
> +    fullname = name
>      print fullname
>      print env
>      if isinstance(cmdline, list):
> diff --git a/selftest/skip b/selftest/skip
> index 68a32a6..4a312a1 100644
> --- a/selftest/skip
> +++ b/selftest/skip
> @@ -33,15 +33,15 @@
>  ^samba3.smbtorture_s3.*.utable
>  ^samba3.smbtorture_s3.*.pipe_number
>  ^samba3.smbtorture_s3.LOCAL-DBTRANS #hangs for some reason
> -^samba3.*base.charset
> -^samba3.*raw.acls
> -^samba3.*raw.context
> -^samba3.*raw.ioctl
> -^samba3.*raw.qfileinfo
> -^samba3.*raw.qfsinfo
> -^samba3.*raw.sfileinfo.base
> -^samba3.smb2.hold-oplock                # Not a test, but a way to block other clients for a test
> -^samba3.smb2.scan                       # No tests
> +^samba.(s3dc|plugin_s4_dc).*base.charset
> +^samba.(s3dc|plugin_s4_dc).*raw.acls
> +^samba.(s3dc|plugin_s4_dc).*raw.context
> +^samba.(s3dc|plugin_s4_dc).*raw.ioctl
> +^samba.(s3dc|plugin_s4_dc).*raw.qfileinfo
> +^samba.(s3dc|plugin_s4_dc).*raw.qfsinfo
> +^samba.(s3dc|plugin_s4_dc).*raw.sfileinfo.base
> +^samba.(s3dc|plugin_s4_dc).smb2.hold-oplock                # Not a test, but a way to block other clients for a test
> +^samba.(s3dc|plugin_s4_dc).smb2.scan                       # No tests
>  ^samba4.base.iometer
>  ^samba4.base.casetable
>  ^samba4.base.nttrans
> diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
> index bc469d7..9d2b069 100644
> --- a/selftest/target/Samba4.pm
> +++ b/selftest/target/Samba4.pm
> @@ -706,7 +706,7 @@ sub provision($$$$$$$$)
>  {
>  	my ($self, $prefix, $server_role, $hostname,
>  	    $domain, $realm, $functional_level,
> -	    $password, $kdc_ipv4, $extra_smbconf_options) = @_;
> +	    $password, $kdc_ipv4, $extra_smbconf_options, $extra_smbconf_shares) = @_;
>  
>  	my $ctx = $self->provision_raw_prepare($prefix, $server_role,
>  					       $hostname,
> @@ -838,7 +838,7 @@ sub provision_member($$$)
>  				   "2008",
>  				   "locMEMpass3",
>  				   $dcvars->{SERVER_IP},
> -				   "");
> +				   "", "");
>  	unless ($ret) {
>  		return undef;
>  	}
> @@ -903,7 +903,7 @@ sub provision_rpc_proxy($$$)
>  				   "2008",
>  				   "locRPCproxypass4",
>  				   $dcvars->{SERVER_IP},
> -				   $extra_smbconf_options);
> +				   $extra_smbconf_options, "");
>  
>  	unless ($ret) {
>  		return undef;
> @@ -1099,7 +1099,7 @@ allow dns updates = True";
>  				   "samba.example.com",
>  				   "2008",
>  				   "locDCpass1",
> -				   undef, $extra_conf_options);
> +				   undef, $extra_conf_options, "");
>  
>  	return undef unless(defined $ret);
>  	unless($self->add_wins_config("$prefix/private")) {
> @@ -1150,7 +1150,7 @@ sub provision_fl2003dc($$)
>  				   "samba2003.example.com",
>  				   "2003",
>  				   "locDCpass6",
> -				   undef, "");
> +				   undef, "", "");
>  
>  	unless($self->add_wins_config("$prefix/private")) {
>  		warn("Unable to add wins configuration");
> @@ -1172,7 +1172,7 @@ sub provision_fl2008r2dc($$)
>  				   "samba2008R2.example.com",
>  				   "2008_R2",
>  				   "locDCpass7",
> -				   undef, "");
> +				   undef, "", "");
>  
>  	unless ($self->add_wins_config("$prefix/private")) {
>  		warn("Unable to add wins configuration");
> @@ -1265,10 +1265,44 @@ sub provision_plugin_s4_dc($$)
>  {
>  	my ($self, $prefix) = @_;
>  
> +	my $prefix_abs = abs_path($prefix);
> +
>  	my $extra_smbconf_options = "
> -server services = -smb +s3fs
> -dcerpc endpoint servers = -unixinfo -spoolss -winreg -wkssvc -srvsvc
> -xattr_tdb:file = $prefix/statedir/xattr.tdb
> +        server services = -smb +s3fs
> +        xattr_tdb:file = $prefix_abs/statedir/xattr.tdb
> +
> +	kernel oplocks = no
> +	kernel change notify = no
> +
> +	syslog = no
> +	printing = bsd
> +	printcap name = /dev/null
> +
> +	max protocol = SMB2
> +	read only = no
> +	server signing = auto
> +
> +	smbd:sharedelay = 100000
> +	smbd:writetimeupdatedelay = 500000
> +	map hidden = no
> +	map system = no
> +	map readonly = no
> +	store dos attributes = yes
> +	create mask = 755
> +	dos filemode = yes
> +
> +";
> +
> +	my $extra_smbconf_shares = "
> +
> +[tmpcase]
> +	copy = tmp
> +	case sensitive = yes
> +
> +[tmpguest]
> +	copy = tmp
> +        guest ok = yes
> +
>  ";
>  
>  	print "PROVISIONING PLUGIN S4 DC...";
> @@ -1279,7 +1313,8 @@ xattr_tdb:file = $prefix/statedir/xattr.tdb
>  				   "plugin.samba.example.com",
>  				   "2008",
>  				   "locDCpass1",
> -				   undef, $extra_smbconf_options);
> +				   undef, $extra_smbconf_options,
> +                                   $extra_smbconf_shares);
>  
>  	return undef unless(defined $ret);
>  	unless($self->add_wins_config("$prefix/private")) {
> diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
> index 1a11081..4072b26 100755
> --- a/source3/selftest/tests.py
> +++ b/source3/selftest/tests.py
> @@ -54,7 +54,11 @@ def smb4torture_testsuites(prefix):
>  
>  def plansmbtorturetestsuite(name, env, options, description=''):
>      target = "samba3"
> -    modname = "%s.%s %s" % (target, name, description)
> +    if (description == ''):
> +        modname = "samba.%s.%s" % (env, name)
> +    else:
> +        modname = "samba.%s.%s %s" % (env, name, description)
> +
>      cmdline = "%s $LISTOPT %s --target=%s %s" % (valgrindify(smb4torture), options, target, name)
>      if smb4torture_possible:
>          plantestsuite_loadlist(modname, env, cmdline)
> @@ -268,16 +272,22 @@ tests= base + raw + smb2 + rpc + unix + local + winbind + rap + nbt + libsmbclie
>  for t in tests:
>      if t == "base.delaywrite":
>          plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
> +        plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --maximum-runtime=900')
>      elif t == "rap.sam":
>          plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
> +        plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=doscharset=ISO-8859-1')
>      elif t == "unix.whoami":
>          plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD')
> +        plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
>      elif t == "raw.samba3posixtimedlock":
>          plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/s3dc/share')
> +        plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpguest -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/plugin_s4_dc/share')
>      elif t == "raw.chkpath":
>          plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
> +        plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpcase -U$USERNAME%$PASSWORD')
>      else:
>          plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
> +        plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
>  
>  
>  test = 'rpc.lsa.lookupsids'
> -- 
> 1.7.7.6
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120426/bd657672/attachment.pgp>


More information about the samba-technical mailing list