<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/ctdb/tests/src, 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>ctdb-tests: Fix CID 1659221 - Error handling issues (CHECKED_RETURN)</title>
<updated>2025-07-28T06:45:51+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>mschwenke@ddn.com</email>
</author>
<published>2025-07-26T02:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7c7455926d9163286d9bf0e5cb3c3f2032e88bcd'/>
<id>7c7455926d9163286d9bf0e5cb3c3f2032e88bcd</id>
<content type='text'>
Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;

Autobuild-User(master): Anoop C S &lt;anoopcs@samba.org&gt;
Autobuild-Date(master): Mon Jul 28 06:45:51 UTC 2025 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;

Autobuild-User(master): Anoop C S &lt;anoopcs@samba.org&gt;
Autobuild-Date(master): Mon Jul 28 06:45:51 UTC 2025 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Fix CID 1373387 - Time of check time of use (TOCTOU)</title>
<updated>2025-07-28T05:45:28+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2016-10-07T03:30:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=e8e118e5b38fe86c038b1ed1c2e0815923d13008'/>
<id>e8e118e5b38fe86c038b1ed1c2e0815923d13008</id>
<content type='text'>
Coverity doesn't like the fopen(3) after stat(2).  This is test code
that runs in a simple test environment, so this doesn't really matter.

However, reorder the code to put the stat(2) after the fopen(3).  This
means that the test still does all the same checks and it should now
make Coverity happy.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverity doesn't like the fopen(3) after stat(2).  This is test code
that runs in a simple test environment, so this doesn't really matter.

However, reorder the code to put the stat(2) after the fopen(3).  This
means that the test still does all the same checks and it should now
make Coverity happy.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Add tests for tunables directory loading</title>
<updated>2025-07-22T23:02:34+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>mschwenke@ddn.com</email>
</author>
<published>2025-06-27T07:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6863799ce93b655f2f412f304b1556b9f09dd1a9'/>
<id>6863799ce93b655f2f412f304b1556b9f09dd1a9</id>
<content type='text'>
The missing 2nd file testcase becomes the missing directory testcase,
because you can't easily have both.  See the comment in
tunable_test.c.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The missing 2nd file testcase becomes the missing directory testcase,
because you can't easily have both.  See the comment in
tunable_test.c.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Allow tunables unit test to process a second file</title>
<updated>2025-07-22T23:02:34+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>mschwenke@ddn.com</email>
</author>
<published>2025-06-25T12:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=de069d6b950531b3c2ad4584ae661980bd25a982'/>
<id>de069d6b950531b3c2ad4584ae661980bd25a982</id>
<content type='text'>
The second file is optional.

Make $tfile the default to avoid having to update all of the single
file testcases.

Add test cases for second file.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The second file is optional.

Make $tfile the default to avoid having to update all of the single
file testcases.

Add test cases for second file.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Add logging support to the tunables unit test</title>
<updated>2025-07-22T23:02:34+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>mschwenke@ddn.com</email>
</author>
<published>2025-06-28T02:01:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7d010715c591fc05871078958c08eb7207729c65'/>
<id>7d010715c591fc05871078958c08eb7207729c65</id>
<content type='text'>
Make tunable_test respect CTDB_DEBUGLEVEL.  Using test_options.[ch]
would be overkill here.  This means including logging.c - we can't
link to the subsystem containing logging.c because the file being
tested (tunable.c) is part of that subsystem.

Support logging in the test script.  tunable_ok() builds the logging
output for the good path.  Set the debug level to NOTICE and update
expected results for individual failure path tests.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make tunable_test respect CTDB_DEBUGLEVEL.  Using test_options.[ch]
would be overkill here.  This means including logging.c - we can't
link to the subsystem containing logging.c because the file being
tested (tunable.c) is part of that subsystem.

Support logging in the test script.  tunable_ok() builds the logging
output for the good path.  Set the debug level to NOTICE and update
expected results for individual failure path tests.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-common: Require separate initialisation of tunable defaults</title>
<updated>2025-07-22T23:02:34+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>mschwenke@ddn.com</email>
</author>
<published>2025-06-25T10:46:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2ec739a039e3a9af82e614afeae54359fb05b288'/>
<id>2ec739a039e3a9af82e614afeae54359fb05b288</id>
<content type='text'>
Dropping this from ctdb_tunable_load_file() allows that function to be
called multiple times for different files.  The caller sets the
defaults.

In the test script, factor out the handling of a single tunables file
in a similar way.  Ignoring missing/unreadable files is OK because
this function will only be called for test successes (hence "ok" in
the name).  There will never be existing, unreadable files.  The code
being tested ignores missing files, so do that here too.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dropping this from ctdb_tunable_load_file() allows that function to be
called multiple times for different files.  The caller sets the
defaults.

In the test script, factor out the handling of a single tunables file
in a similar way.  Ignoring missing/unreadable files is OK because
this function will only be called for test successes (hence "ok" in
the name).  There will never be existing, unreadable files.  The code
being tested ignores missing files, so do that here too.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Add test code for ctdb_sys_have_ip()</title>
<updated>2024-10-07T15:58:38+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>mschwenke@ddn.com</email>
</author>
<published>2024-09-29T02:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=33e28deeef9cf991637a09a2c9474c88244e578b'/>
<id>33e28deeef9cf991637a09a2c9474c88244e578b</id>
<content type='text'>
Do not add any automated test cases because they will always be racy.
This allows manual testing of the function.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: John Mulligan &lt;jmulligan@redhat.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not add any automated test cases because they will always be racy.
This allows manual testing of the function.

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: John Mulligan &lt;jmulligan@redhat.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: add USENODESCOMMAND directive to fake ctdb</title>
<updated>2024-08-06T00:43:36+00:00</updated>
<author>
<name>John Mulligan</name>
<email>jmulligan@redhat.com</email>
</author>
<published>2024-07-31T20:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=8a5b743c436216f05926fabfec4a23be7f782b94'/>
<id>8a5b743c436216f05926fabfec4a23be7f782b94</id>
<content type='text'>
Add a single line USENODESCOMMAND directive to the fake ctdb in order to
enable use of a nodes script instead of a nodes file. For simplicity
the fake ctdb always uses `nodes.sh` in the CTDB_BASE.

Signed-off-by: John Mulligan &lt;jmulligan@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a single line USENODESCOMMAND directive to the fake ctdb in order to
enable use of a nodes script instead of a nodes file. For simplicity
the fake ctdb always uses `nodes.sh` in the CTDB_BASE.

Signed-off-by: John Mulligan &lt;jmulligan@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-conf: add boolean arg for verbosity when loading config</title>
<updated>2024-08-06T00:43:36+00:00</updated>
<author>
<name>John Mulligan</name>
<email>jmulligan@redhat.com</email>
</author>
<published>2024-08-01T18:25:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ac926a506d5d3d0cfb8caeb135fe496b284ef5f6'/>
<id>ac926a506d5d3d0cfb8caeb135fe496b284ef5f6</id>
<content type='text'>
In a future commit we will add support for loading the config file from
the `ctdb` command line tool. Prior to this change the config file load
func always called D_NOTICE that causes the command to emit new text and
thus break all the tests that rely on the specific test output (not to
mention something users could notice). This change plumbs a new
`verbose` argument into some of the config file loading functions.
Generally, all existing functions will have verbose set to true to match
the existing behavior. Future callers of this function can set it to
false in order to avoid emitting the extra text.

Signed-off-by: John Mulligan &lt;jmulligan@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a future commit we will add support for loading the config file from
the `ctdb` command line tool. Prior to this change the config file load
func always called D_NOTICE that causes the command to emit new text and
thus break all the tests that rely on the specific test output (not to
mention something users could notice). This change plumbs a new
`verbose` argument into some of the config file loading functions.
Generally, all existing functions will have verbose set to true to match
the existing behavior. Future callers of this function can set it to
false in order to avoid emitting the extra text.

Signed-off-by: John Mulligan &lt;jmulligan@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Use ctdb_read_nodes() in the fake ctdbd</title>
<updated>2024-07-23T11:37:34+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>mschwenke@ddn.com</email>
</author>
<published>2024-07-05T07:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=fe97d04f18084c6ac76106fce28e55db4b72b8cc'/>
<id>fe97d04f18084c6ac76106fce28e55db4b72b8cc</id>
<content type='text'>
Remove unused copy of ctdb_read_nodes_file().

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unused copy of ctdb_read_nodes_file().

Signed-off-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
