<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/python/samba/tests, branch talloc-2.2.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>selftest: Remove mention of --extra-python from comment</title>
<updated>2019-03-21T04:06:15+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2019-03-20T03:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=709ac663ab686a3b0abec335f7486e7e4c8e7141'/>
<id>709ac663ab686a3b0abec335f7486e7e4c8e7141</id>
<content type='text'>
Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Make IPv4 assumption explicit</title>
<updated>2019-03-14T02:12:19+00:00</updated>
<author>
<name>Tim Beale</name>
<email>timbeale@catalyst.net.nz</email>
</author>
<published>2019-03-12T21:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=1fb01c5b11fe4acfe1178f42cccb24136ae938e5'/>
<id>1fb01c5b11fe4acfe1178f42cccb24136ae938e5</id>
<content type='text'>
This test is asserting the expected number of *IPv4* addresses, not any
interface address (including IPv6). It works currently because the
selftest client doesn't have an IPv6 address in its smb.conf.

This patch makes the IPv4 assumption explicit by importing
interface_ips_v4() from the provision code. We need to tweak this to
pass through an 'all_interfaces' flag, otherwise it filters out the
loopback IP addresses that the testenv is using.

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test is asserting the expected number of *IPv4* addresses, not any
interface address (including IPv6). It works currently because the
selftest client doesn't have an IPv6 address in its smb.conf.

This patch makes the IPv4 assumption explicit by importing
interface_ips_v4() from the provision code. We need to tweak this to
pass through an 'all_interfaces' flag, otherwise it filters out the
loopback IP addresses that the testenv is using.

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpo: During restore clobber GPT.INI with a blank version</title>
<updated>2019-03-12T00:42:20+00:00</updated>
<author>
<name>Garming Sam</name>
<email>garming@catalyst.net.nz</email>
</author>
<published>2019-02-26T04:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=52e0160116c39ac0b4759851bcbacd561bd26c0b'/>
<id>52e0160116c39ac0b4759851bcbacd561bd26c0b</id>
<content type='text'>
Generally speaking, there is not much value to keeping this file. The
display name does not ever seem to be used and the version only applies
to the original domain or DC it was on. The command line option to
revert this behaviour is mostly for the tests or for having a straight
1:1 backup-restore for pure restoration.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13806

Signed-off-by: Garming Sam &lt;garming@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generally speaking, there is not much value to keeping this file. The
display name does not ever seem to be used and the version only applies
to the original domain or DC it was on. The command line option to
revert this behaviour is mostly for the tests or for having a straight
1:1 backup-restore for pure restoration.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13806

Signed-off-by: Garming Sam &lt;garming@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpo: Add test for saving gPCXXXExtensionNames in backup</title>
<updated>2019-03-12T00:42:20+00:00</updated>
<author>
<name>Garming Sam</name>
<email>garming@catalyst.net.nz</email>
</author>
<published>2019-02-21T02:15:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=70681d41ac2fb6d401157952077aaa8b8f800a2e'/>
<id>70681d41ac2fb6d401157952077aaa8b8f800a2e</id>
<content type='text'>
The test only checks that the LDAP values are equal before and after.
The format and specifics should be up to the implementation -- and be
amenable to changes later. As long as the extension doesn't match
.SAMBABACKUP or .xml, it won't be detected by the tools.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13627

Signed-off-by: Garming Sam &lt;garming@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test only checks that the LDAP values are equal before and after.
The format and specifics should be up to the implementation -- and be
amenable to changes later. As long as the extension doesn't match
.SAMBABACKUP or .xml, it won't be detected by the tools.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13627

Signed-off-by: Garming Sam &lt;garming@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpo: Add tests to make sure that an empty gplink works</title>
<updated>2019-03-12T00:42:19+00:00</updated>
<author>
<name>Garming Sam</name>
<email>garming@catalyst.net.nz</email>
</author>
<published>2019-02-20T01:11:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=bcb0270c6bcd6c9268c4807030d9c5945624540e'/>
<id>bcb0270c6bcd6c9268c4807030d9c5945624540e</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13564

Signed-off-by: Garming Sam &lt;garming@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13564

Signed-off-by: Garming Sam &lt;garming@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/blackbox: py3 compatible print in documentation.</title>
<updated>2019-03-12T00:42:18+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2019-03-09T00:49:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=287abca7c83eadb1592a4b1721bb2d55c46a2930'/>
<id>287abca7c83eadb1592a4b1721bb2d55c46a2930</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/auto_log_pass_change.py: only care about the last expected message other than exact messages count</title>
<updated>2019-03-07T12:01:25+00:00</updated>
<author>
<name>Joe Guo</name>
<email>joeg@catalyst.net.nz</email>
</author>
<published>2019-03-07T03:10:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=10109f62ceb0cb435be3c521bd281eae48077535'/>
<id>10109f62ceb0cb435be3c521bd281eae48077535</id>
<content type='text'>
The messages count could be different because of racing condition.
And we should only care about the last expected one.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett abartlet@samba.org
Reviewed-by: Noel Power npower@samba.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The messages count could be different because of racing condition.
And we should only care about the last expected one.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett abartlet@samba.org
Reviewed-by: Noel Power npower@samba.org
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Reduce likelihood of auth_log test locking up during CI</title>
<updated>2019-03-05T13:10:43+00:00</updated>
<author>
<name>Aaron Haslett</name>
<email>aaronhaslett@catalyst.net.nz</email>
</author>
<published>2019-02-28T03:55:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6a7dd7ab510a85d4c5f6d7e740b6bbd58b714085'/>
<id>6a7dd7ab510a85d4c5f6d7e740b6bbd58b714085</id>
<content type='text'>
We would sometimes see the auth_log test hang during a CI run. The CI
job would eventually fail after consuming a costly 10 hours of CI
runtime.

We believe the problem is around the test creating multiple instances of
the Messaging() context. This is a similar race condition to what was
seen in 19f34b2161dee26.

Currently a new Messaging() context is created for every test case. By
using classmethods instead, the Messaging context is only created once
per python test file execution (i.e. creation of the python class,
rather than initialization of the python object, which happens for every
test-case).

This means the test will only create one Messaging() context, which
should avoid any race conditions.

Changes:
+ removed msg_ctxs - this wasn't actually used for anything.
+ use classmethods to setup and tear-down the Messaging() context (and
tweak lp initialization accordingly).
+ fix discardMessages() - the loop wasn't actually discarding any
messages previously (this may also have been the cause of the test
hanging).

Signed-off-by: Aaron Haslett &lt;aaronhaslett@catalyst.net.nz&gt;
Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;

Autobuild-User(master): Noel Power &lt;npower@samba.org&gt;
Autobuild-Date(master): Tue Mar  5 13:10:43 UTC 2019 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We would sometimes see the auth_log test hang during a CI run. The CI
job would eventually fail after consuming a costly 10 hours of CI
runtime.

We believe the problem is around the test creating multiple instances of
the Messaging() context. This is a similar race condition to what was
seen in 19f34b2161dee26.

Currently a new Messaging() context is created for every test case. By
using classmethods instead, the Messaging context is only created once
per python test file execution (i.e. creation of the python class,
rather than initialization of the python object, which happens for every
test-case).

This means the test will only create one Messaging() context, which
should avoid any race conditions.

Changes:
+ removed msg_ctxs - this wasn't actually used for anything.
+ use classmethods to setup and tear-down the Messaging() context (and
tweak lp initialization accordingly).
+ fix discardMessages() - the loop wasn't actually discarding any
messages previously (this may also have been the cause of the test
hanging).

Signed-off-by: Aaron Haslett &lt;aaronhaslett@catalyst.net.nz&gt;
Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;

Autobuild-User(master): Noel Power &lt;npower@samba.org&gt;
Autobuild-Date(master): Tue Mar  5 13:10:43 UTC 2019 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Work auth_log CLIENT_IP out from config instead of env var</title>
<updated>2019-03-04T21:41:17+00:00</updated>
<author>
<name>Tim Beale</name>
<email>timbeale@catalyst.net.nz</email>
</author>
<published>2019-02-25T22:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a7d09580ae0e03568b6708cf91d4609a881b0a14'/>
<id>a7d09580ae0e03568b6708cf91d4609a881b0a14</id>
<content type='text'>
Instead of passing the CLIENT_IP to the auth_log tests, we can just
work out the source-IP that the client will use from its smb.conf file.

This only works for auth_log_pass_change, but not auth_log.py - the
latter still needs to be run on the :local testenv for other reasons, so
it doesn't use the client.conf. However, we can still update the base
code to use the client.conf IP, as auth_log.py overrides
self.remoteAddress anyway.

The main advantage of this change is it avoids having hardcoded IP
addresses in the selftest framework.

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of passing the CLIENT_IP to the auth_log tests, we can just
work out the source-IP that the client will use from its smb.conf file.

This only works for auth_log_pass_change, but not auth_log.py - the
latter still needs to be run on the :local testenv for other reasons, so
it doesn't use the client.conf. However, we can still update the base
code to use the client.conf IP, as auth_log.py overrides
self.remoteAddress anyway.

The main advantage of this change is it avoids having hardcoded IP
addresses in the selftest framework.

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Work audit_log CLIENT_IP out from config instead of env var</title>
<updated>2019-03-04T21:41:16+00:00</updated>
<author>
<name>Tim Beale</name>
<email>timbeale@catalyst.net.nz</email>
</author>
<published>2019-02-25T22:06:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c185bf1dcf84b2f86af2b79190a479dbc61b3cd3'/>
<id>c185bf1dcf84b2f86af2b79190a479dbc61b3cd3</id>
<content type='text'>
Instead of passing the CLIENT_IP to the audit_log tests, we can just
work out the source-IP that the client will use from its smb.conf file.
Because the audit_log tests are all run on the non-local testenv,
they'll already use the client.conf and the 127.0.0.11 address.

The main advantage of this change is it avoids having hardcoded IP
addresses in the selftest framework.

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of passing the CLIENT_IP to the audit_log tests, we can just
work out the source-IP that the client will use from its smb.conf file.
Because the audit_log tests are all run on the non-local testenv,
they'll already use the client.conf and the 127.0.0.11 address.

The main advantage of this change is it avoids having hardcoded IP
addresses in the selftest framework.

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
