Skip to content

Commit

Permalink
selftest: rename schemaupgrade_dc (+pair) to schema_dc
Browse files Browse the repository at this point in the history
This is needed because the name of the autobuild job and
the name of the selftest env end up in the socket path
for ncalrpc sockets.

The challenge is that (for example)
/memdisk/autobuild/fl/b2424063/samba-schemaupgrade/bin/ab/schemaupgrade_pair_dc/ncalrpc/np/protected_storage
does not fit in a struct sockaddr_un.

Signed-off-by: Garming Sam <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>

Autobuild-User(master): Andrew Bartlett <[email protected]>
Autobuild-Date(master): Fri Apr 12 05:41:36 UTC 2019 on sn-devel-144
  • Loading branch information
GSam authored and abartlet committed Apr 12, 2019
1 parent c9e6331 commit bfd762b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions script/autobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
"--exclude-env=rodc "
"--exclude-env=ad_dc_default "
"--exclude-env=ad_dc_slowtests "
"--exclude-env=schemaupgrade_pair_dc "
"--exclude-env=schemaupgrade_dc "
"--exclude-env=schema_pair_dc "
"--exclude-env=schema_dc "
"'",
"text/plain"),
("install", "make install", "text/plain"),
Expand Down Expand Up @@ -245,8 +245,8 @@
("make", "make -j", "text/plain"),
("test", "make test FAIL_IMMEDIATELY=1 "
"TESTS='"
"--include-env=schemaupgrade_dc "
"--include-env=schemaupgrade_pair_dc "
"--include-env=schema_dc "
"--include-env=schema_pair_dc "
"'", "text/plain"),
("check-clean-tree", "script/clean-source-tree.sh", "text/plain")],

Expand Down
4 changes: 2 additions & 2 deletions selftest/target/README
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ allowed processes artificially low, to test that new connections are refused
correctly. Due to the limited number of connections accepted, it's not
recommended to use this testenv for anything else.

schemaupgrade_dc
schema_dc
----------------
This is a 2-DC testenv setup (schemaupgrade_dc and schemaupgrade_pair_dc).
This is a 2-DC testenv setup (schema_dc and schema_pair_dc).
We provision the first DC, and join the second, using an older version of the
schema (2008R2), then start-up Samba. Then, we run a schema upgrade (i.e.
'samba-tool domain schemaupgrade') on the PDC.
12 changes: 6 additions & 6 deletions selftest/target/Samba4.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2267,14 +2267,14 @@ sub check_env($$)
ad_dc_slowtests => ["ad_dc_ntvfs"],
ad_dc_backup => ["ad_dc"],

schemaupgrade_dc => ["dns_hub"],
schemaupgrade_pair_dc => ["schemaupgrade_dc"],
schema_dc => ["dns_hub"],
schema_pair_dc => ["schema_dc"],

none => [],
);

%Samba4::ENV_DEPS_POST = (
schemaupgrade_dc => ["schemaupgrade_pair_dc"],
schema_dc => ["schema_pair_dc"],
);

sub return_alias_env
Expand Down Expand Up @@ -2791,7 +2791,7 @@ sub setup_proclimitdc
}

# Used to test a live upgrade of the schema on a 2 DC network.
sub setup_schemaupgrade_dc
sub setup_schema_dc
{
my ($self, $path) = @_;

Expand Down Expand Up @@ -2819,9 +2819,9 @@ sub setup_schemaupgrade_dc
}

# the second DC in the live schema upgrade pair
sub setup_schemaupgrade_pair_dc
sub setup_schema_pair_dc
{
# note: dcvars contains the env info for the dependent testenv ('schemaupgrade_dc')
# note: dcvars contains the env info for the dependent testenv ('schema_dc')
my ($self, $prefix, $dcvars) = @_;
print "Preparing SCHEMA UPGRADE PAIR DC...\n";

Expand Down
10 changes: 5 additions & 5 deletions source4/selftest/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex
planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.computer")
planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.forest")
planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.schema")
planpythontestsuite("schemaupgrade_dc:local", "samba.tests.samba_tool.schema")
planpythontestsuite("schema_dc:local", "samba.tests.samba_tool.schema")
planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.ntacl")
planpythontestsuite("none", "samba.tests.samba_tool.provision_password_check")
planpythontestsuite("none", "samba.tests.samba_tool.help")
Expand Down Expand Up @@ -839,7 +839,7 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex
plantestsuite("samba4.sam.python(ad_dc_default)", "ad_dc_default", [python, os.path.join(samba4srcdir, "dsdb/tests/python/sam.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
plantestsuite("samba4.user_account_control.python(ad_dc_default)", "ad_dc_default", [python, os.path.join(samba4srcdir, "dsdb/tests/python/user_account_control.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])

for env in ['ad_dc_default:local', 'schemaupgrade_dc:local']:
for env in ['ad_dc_default:local', 'schema_dc:local']:
planoldpythontestsuite(env, "dsdb_schema_info",
extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')],
name="samba4.schemaInfo.python(%s)" % (env),
Expand Down Expand Up @@ -909,7 +909,7 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex
name="samba4.ldap.passwordsettings.python",
extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])

for env in all_fl_envs + ["schemaupgrade_dc"]:
for env in all_fl_envs + ["schema_dc"]:
plantestsuite_loadlist("samba4.ldap_schema.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/ldap_schema.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
plantestsuite("samba4.ldap.possibleInferiors.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/samdb/ldb_modules/tests/possibleinferiors.py"), "ldap://$SERVER", '-U"$USERNAME%$PASSWORD"', "-W$DOMAIN"])
plantestsuite_loadlist("samba4.ldap.secdesc.python(%s)" % env, env, [python, os.path.join(samba4srcdir, "dsdb/tests/python/sec_descriptor.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
Expand Down Expand Up @@ -1010,7 +1010,7 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex
environ={'DC1': "$DC_SERVER", 'DC2': '$SERVER'},
extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])

env = 'schemaupgrade_pair_dc'
env = 'schema_pair_dc'
planoldpythontestsuite("%s:local" % env, "samba_tool_drs",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
name="samba4.drs.samba_tool_drs.python(%s)" % env,
Expand Down Expand Up @@ -1171,7 +1171,7 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex
planpythontestsuite("ad_dc_default:local", "samba.tests.kcc.kcc_utils")

for env in ["simpleserver", "fileserver", "nt4_dc", "ad_dc", "ad_dc_ntvfs",
"ad_member", "offlinebackupdc", "restoredc", "renamedc", "labdc", 'schemaupgrade_pair_dc']:
"ad_member", "offlinebackupdc", "restoredc", "renamedc", "labdc", 'schema_pair_dc']:
planoldpythontestsuite(env, "netlogonsvc",
extra_path=[os.path.join(srcdir(), 'python/samba/tests')],
name="samba.tests.netlogonsvc.python(%s)" % env)
Expand Down

0 comments on commit bfd762b

Please sign in to comment.