<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/python/samba/tests/__init__.py, branch master</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>pytests: add TestCase.get_server_param() method</title>
<updated>2025-11-20T21:25:39+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2025-10-30T20:27:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=fcb39cdcbc851f087eebc141389969cb0bde1750'/>
<id>fcb39cdcbc851f087eebc141389969cb0bde1750</id>
<content type='text'>
This makes it easier to get a loadparm value from the server smb.conf
(rather than the client smb.conf), so you can alter test behaviour
accordingly.

The class._server_lp attribute is lazily loaded when first needed.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Jennifer Sutton &lt;jennifersutton@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it easier to get a loadparm value from the server smb.conf
(rather than the client smb.conf), so you can alter test behaviour
accordingly.

The class._server_lp attribute is lazily loaded when first needed.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Jennifer Sutton &lt;jennifersutton@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Decode stdout and stderr for greater readability</title>
<updated>2025-05-26T02:41:36+00:00</updated>
<author>
<name>Jennifer Sutton</name>
<email>jennifersutton@catalyst.net.nz</email>
</author>
<published>2024-08-06T01:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b7e7a0705094bdd1fe6fb13a52b2a34169bb00f7'/>
<id>b7e7a0705094bdd1fe6fb13a52b2a34169bb00f7</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15852

Signed-off-by: Jennifer Sutton &lt;jennifersutton@catalyst.net.nz&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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15852

Signed-off-by: Jennifer Sutton &lt;jennifersutton@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pytest: source_tree_topdir() checks more thoroughly</title>
<updated>2025-03-29T07:23:43+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2025-03-20T03:43:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2f2dac309430346438b047302f8778b5410be3e5'/>
<id>2f2dac309430346438b047302f8778b5410be3e5</id>
<content type='text'>
We are more certain of how many ../ steps we are from top than we are
that the existence of a thing called 'source4' is a definite sign
that this is a full source tree. So we check fewer depths and more
subdirectories.

This also modernises the return type to be a pathlib.Path, which works
without change for current callers.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are more certain of how many ../ steps we are from top than we are
that the existence of a thing called 'source4' is a definite sign
that this is a full source tree. So we check fewer depths and more
subdirectories.

This also modernises the return type to be a pathlib.Path, which works
without change for current callers.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>python: make source_tree_topdir() test-only</title>
<updated>2025-03-29T07:23:43+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2025-03-18T23:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=24fb3bb87449dd2d4e8df2b48637c59adf63022a'/>
<id>24fb3bb87449dd2d4e8df2b48637c59adf63022a</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Ralph Boehme &lt;slow@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: Ralph Boehme &lt;slow@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>pytest:samba-tool: .check_output() can set environment</title>
<updated>2025-03-12T19:57:34+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2025-03-04T22:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=71061b7f16a2900499753b671333e17aebdc08a1'/>
<id>71061b7f16a2900499753b671333e17aebdc08a1</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Rowland Penny &lt;rpenny@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: Rowland Penny &lt;rpenny@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pytest: simplify and fix HEXDUMP_FILTER used in hexdumps</title>
<updated>2024-06-12T08:14:34+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2024-06-11T23:34:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6347b0c3736e1208d09f94e2b67f1b4234205374'/>
<id>6347b0c3736e1208d09f94e2b67f1b4234205374</id>
<content type='text'>
The old test

   x if ((len(repr(chr(x))) == 3) and (x &lt; 127)) else ord('.')

went through some contortions to see if the character was printable, and
it got it slightly wrong. The idea was that `repr(chr(97)` is "'a'",
while `repr(chr(167)` is "'\xa7'", which we can distinguish using the
length. But that miscategorised the backslash character, which is
represented as "'\\'", a string of length 4, so it was show as '.'
instead.

Instead we notice that the characters we want to print in a hexdump
are exactly those between 32 and 126, inclusive.

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>
The old test

   x if ((len(repr(chr(x))) == 3) and (x &lt; 127)) else ord('.')

went through some contortions to see if the character was printable, and
it got it slightly wrong. The idea was that `repr(chr(97)` is "'a'",
while `repr(chr(167)` is "'\xa7'", which we can distinguish using the
length. But that miscategorised the backslash character, which is
represented as "'\\'", a string of length 4, so it was show as '.'
instead.

Instead we notice that the characters we want to print in a hexdump
are exactly those between 32 and 126, inclusive.

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>python/tests: add TestCase.get_loadparm(s3=True) support</title>
<updated>2024-01-26T17:00:33+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2024-01-12T15:56:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b3c51c4b825b2886e789a34f7df2469f0e0742ce'/>
<id>b3c51c4b825b2886e789a34f7df2469f0e0742ce</id>
<content type='text'>
This will be used for tests with registry shares,
as the top level loadparm system doesn't support them.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Günther Deschner &lt;gd@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be used for tests with registry shares,
as the top level loadparm system doesn't support them.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Günther Deschner &lt;gd@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Raise exception of more specific type NotImplementedError</title>
<updated>2023-12-21T20:21:34+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-12-07T21:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6256ad7442691f038856dd4fc09cf1e5c6f94fc1'/>
<id>6256ad7442691f038856dd4fc09cf1e5c6f94fc1</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@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: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Use ‘False’ in boolean expression rather than ‘None’</title>
<updated>2023-12-21T20:21:34+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-12-07T19:34:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3b150354534587c7719c62e21974612d798cc980'/>
<id>3b150354534587c7719c62e21974612d798cc980</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@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: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selftest: require named parameters for callers of connect_samdb() and connect_samdb_ex()</title>
<updated>2023-12-21T02:05:38+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2023-12-13T01:03:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ba29bb54cada2e0d01a8b6f7a7587696d44fa1f9'/>
<id>ba29bb54cada2e0d01a8b6f7a7587696d44fa1f9</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-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: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
</feed>
