<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/util/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>lib:util: Use C99 initializer in tfork test</title>
<updated>2019-01-28T09:29:22+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2019-01-07T16:33:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7983b03a89ece230c1702296b113702422f9b0f8'/>
<id>7983b03a89ece230c1702296b113702422f9b0f8</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@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: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: Count a trailing line that doesn't end in a newline</title>
<updated>2018-12-19T07:08:28+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2018-12-14T03:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5118985841aa0363147d552f243ab5a7d90dbdaf'/>
<id>5118985841aa0363147d552f243ab5a7d90dbdaf</id>
<content type='text'>
If the final line of a file does not contain a newline then it isn't
included in the line count.

Change i to point to the next slot in the array instead of the current
one.  This means that that the current line won't be thrown away if no
newline is seen.

Without changing i to unsigned int, the -O3 --picky -developer build
fails with:

[ 745/4136] Compiling lib/util/util_file.c

==&gt; /builds/samba-team/devel/samba/samba-o3.stderr &lt;==
../../lib/util/util_file.c: In function ‘file_lines_parse’:
../../lib/util/util_file.c:251:8: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
  while (i &gt; 0 &amp;&amp; ret[i-1][0] == 0) {
        ^
cc1: all warnings being treated as errors

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

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Wed Dec 19 08:08:28 CET 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the final line of a file does not contain a newline then it isn't
included in the line count.

Change i to point to the next slot in the array instead of the current
one.  This means that that the current line won't be thrown away if no
newline is seen.

Without changing i to unsigned int, the -O3 --picky -developer build
fails with:

[ 745/4136] Compiling lib/util/util_file.c

==&gt; /builds/samba-team/devel/samba/samba-o3.stderr &lt;==
../../lib/util/util_file.c: In function ‘file_lines_parse’:
../../lib/util/util_file.c:251:8: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
  while (i &gt; 0 &amp;&amp; ret[i-1][0] == 0) {
        ^
cc1: all warnings being treated as errors

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

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Wed Dec 19 08:08:28 CET 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>tfork: add a README how to run test torture test under valgrind</title>
<updated>2018-11-28T14:57:43+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2018-11-20T14:50:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=8bde5ea169afa62e82fb2443877b4eef6f28fece'/>
<id>8bde5ea169afa62e82fb2443877b4eef6f28fece</id>
<content type='text'>
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Wed Nov 28 15:57:43 CET 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Wed Nov 28 15:57:43 CET 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>tfork: add a suppresssions file for drd</title>
<updated>2018-11-28T11:59:28+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2018-11-20T15:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0a0daebaab81343e66d0c48faa336b69b8e13e3b'/>
<id>0a0daebaab81343e66d0c48faa336b69b8e13e3b</id>
<content type='text'>
drd reports:

 initialized twice: cond 0x514f188
    at 0x4C3A399: pthread_cond_init_intercept (drd_pthread_intercepts.c:1022)
    by 0x4C3A399: pthread_cond_init@* (drd_pthread_intercepts.c:1030)
    by 0x50F3FF3: tfork_atfork_child (tfork.c:250)
    by 0x9A4B95D: fork (fork.c:204)
    by 0x50F4834: tfork_start_waiter_and_worker (tfork.c:581)
    by 0x50F4CDB: tfork_create (tfork.c:780)
    by 0x2F7469: tfork_thread (tfork.c:431)
    by 0x4C358F8: vgDrd_thread_wrapper (drd_pthread_intercepts.c:444)
    by 0x8D46593: start_thread (pthread_create.c:463)
    by 0x9A7EE6E: clone (clone.S:95)
 cond 0x514f188 was first observed at:
    at 0x4C3A399: pthread_cond_init_intercept (drd_pthread_intercepts.c:1022)
    by 0x4C3A399: pthread_cond_init@* (drd_pthread_intercepts.c:1030)
    by 0x50F413A: tfork_global_initialize (tfork.c:287)
    by 0x8D4DEA6: __pthread_once_slow (pthread_once.c:116)
    by 0x4C377FD: pthread_once_intercept (drd_pthread_intercepts.c:800)
    by 0x4C377FD: pthread_once (drd_pthread_intercepts.c:806)
    by 0x50F4C0E: tfork_create (tfork.c:743)
    by 0x2F7469: tfork_thread (tfork.c:431)
    by 0x4C358F8: vgDrd_thread_wrapper (drd_pthread_intercepts.c:444)
    by 0x8D46593: start_thread (pthread_create.c:463)
    by 0x9A7EE6E: clone (clone.S:95)

This is intentional, the reinit is in a child process. Cf the comment in
tfork.c.

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drd reports:

 initialized twice: cond 0x514f188
    at 0x4C3A399: pthread_cond_init_intercept (drd_pthread_intercepts.c:1022)
    by 0x4C3A399: pthread_cond_init@* (drd_pthread_intercepts.c:1030)
    by 0x50F3FF3: tfork_atfork_child (tfork.c:250)
    by 0x9A4B95D: fork (fork.c:204)
    by 0x50F4834: tfork_start_waiter_and_worker (tfork.c:581)
    by 0x50F4CDB: tfork_create (tfork.c:780)
    by 0x2F7469: tfork_thread (tfork.c:431)
    by 0x4C358F8: vgDrd_thread_wrapper (drd_pthread_intercepts.c:444)
    by 0x8D46593: start_thread (pthread_create.c:463)
    by 0x9A7EE6E: clone (clone.S:95)
 cond 0x514f188 was first observed at:
    at 0x4C3A399: pthread_cond_init_intercept (drd_pthread_intercepts.c:1022)
    by 0x4C3A399: pthread_cond_init@* (drd_pthread_intercepts.c:1030)
    by 0x50F413A: tfork_global_initialize (tfork.c:287)
    by 0x8D4DEA6: __pthread_once_slow (pthread_once.c:116)
    by 0x4C377FD: pthread_once_intercept (drd_pthread_intercepts.c:800)
    by 0x4C377FD: pthread_once (drd_pthread_intercepts.c:806)
    by 0x50F4C0E: tfork_create (tfork.c:743)
    by 0x2F7469: tfork_thread (tfork.c:431)
    by 0x4C358F8: vgDrd_thread_wrapper (drd_pthread_intercepts.c:444)
    by 0x8D46593: start_thread (pthread_create.c:463)
    by 0x9A7EE6E: clone (clone.S:95)

This is intentional, the reinit is in a child process. Cf the comment in
tfork.c.

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tfork: add a suppresssions file for helgrind</title>
<updated>2018-11-28T11:59:28+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2018-11-19T14:18:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b92d790515306c6458b56cd7341e87134821f5cd'/>
<id>b92d790515306c6458b56cd7341e87134821f5cd</id>
<content type='text'>
tfork_atexit_unknown[1|2]:

  No idea what triggers this, definitely not tfork itself.

tfork_pthread_get_specific:

 Helgrind reports:

 Possible data race during read of size 4 at 0x5141304 by thread #3
 Locks held: none
    at 0x50E602E: tfork_global_get (tfork.c:301)
    by 0x50E69B1: tfork_create (tfork.c:737)
    by 0x2F7419: tfork_thread (tfork.c:431)
    by 0x4C35AC5: mythread_wrapper (hg_intercepts.c:389)
    by 0x8D38593: start_thread (pthread_create.c:463)
    by 0x9A70E6E: clone (clone.S:95)

 This conflicts with a previous write of size 4 by thread #2
 Locks held: none
    at 0x8D3F7B7: pthread_key_create (pthread_key_create.c:41)
    by 0x50E5F79: tfork_global_initialize (tfork.c:280)
    by 0x8D3FEA6: __pthread_once_slow (pthread_once.c:116)
    by 0x50E6999: tfork_create (tfork.c:728)
    by 0x2F7419: tfork_thread (tfork.c:431)
    by 0x4C35AC5: mythread_wrapper (hg_intercepts.c:389)
    by 0x8D38593: start_thread (pthread_create.c:463)
    by 0x9A70E6E: clone (clone.S:95)
  Location 0x5141304 is 0 bytes inside global var "tfork_global_key"
  declared at tfork.c:122

  This is nonsense, tfork_global_get() calls pthread_getspecific, so
  we're looking at the pthread_key_create()/pthread_[g|s]etspecific()
  API here which works with threads by design.

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tfork_atexit_unknown[1|2]:

  No idea what triggers this, definitely not tfork itself.

tfork_pthread_get_specific:

 Helgrind reports:

 Possible data race during read of size 4 at 0x5141304 by thread #3
 Locks held: none
    at 0x50E602E: tfork_global_get (tfork.c:301)
    by 0x50E69B1: tfork_create (tfork.c:737)
    by 0x2F7419: tfork_thread (tfork.c:431)
    by 0x4C35AC5: mythread_wrapper (hg_intercepts.c:389)
    by 0x8D38593: start_thread (pthread_create.c:463)
    by 0x9A70E6E: clone (clone.S:95)

 This conflicts with a previous write of size 4 by thread #2
 Locks held: none
    at 0x8D3F7B7: pthread_key_create (pthread_key_create.c:41)
    by 0x50E5F79: tfork_global_initialize (tfork.c:280)
    by 0x8D3FEA6: __pthread_once_slow (pthread_once.c:116)
    by 0x50E6999: tfork_create (tfork.c:728)
    by 0x2F7419: tfork_thread (tfork.c:431)
    by 0x4C35AC5: mythread_wrapper (hg_intercepts.c:389)
    by 0x8D38593: start_thread (pthread_create.c:463)
    by 0x9A70E6E: clone (clone.S:95)
  Location 0x5141304 is 0 bytes inside global var "tfork_global_key"
  declared at tfork.c:122

  This is nonsense, tfork_global_get() calls pthread_getspecific, so
  we're looking at the pthread_key_create()/pthread_[g|s]etspecific()
  API here which works with threads by design.

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tfork/test: ensure all threads start with SIGCHLD unblocked</title>
<updated>2018-11-28T11:59:27+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2018-11-19T15:47:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f8e24596d53b41827135fc48d0603173265b41b1'/>
<id>f8e24596d53b41827135fc48d0603173265b41b1</id>
<content type='text'>
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>torture: Remove unnecesssary #include &lt;fcntl.h&gt;</title>
<updated>2018-09-15T13:18:25+00:00</updated>
<author>
<name>Christof Schmitt</name>
<email>cs@samba.org</email>
</author>
<published>2018-09-15T00:00:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=18ab3ea7bcc0ae8c66ece8094446017c7ceb736b'/>
<id>18ab3ea7bcc0ae8c66ece8094446017c7ceb736b</id>
<content type='text'>
This is now provided through system/filesys.h.

Signed-off-by: Christof Schmitt &lt;cs@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is now provided through system/filesys.h.

Signed-off-by: Christof Schmitt &lt;cs@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Fix the build on FreeBSD</title>
<updated>2018-08-31T16:42:31+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2018-08-31T04:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b7d77ce4b38de7deae4875122c40cb038f4f4c98'/>
<id>b7d77ce4b38de7deae4875122c40cb038f4f4c98</id>
<content type='text'>
FreeBSD needs to explicitly #include &lt;unistd.h&gt; for geteuid() and close()

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Fri Aug 31 18:42:31 CEST 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FreeBSD needs to explicitly #include &lt;unistd.h&gt; for geteuid() and close()

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Fri Aug 31 18:42:31 CEST 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>torture: Add test for directory_create_or_exist</title>
<updated>2018-08-30T19:19:31+00:00</updated>
<author>
<name>Christof Schmitt</name>
<email>cs@samba.org</email>
</author>
<published>2018-08-29T19:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=83f0ac5c6da48c1a68f6a7b29992398735abb421'/>
<id>83f0ac5c6da48c1a68f6a7b29992398735abb421</id>
<content type='text'>
Signed-off-by: Christof Schmitt &lt;cs@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Christof Schmitt &lt;cs@samba.org&gt;
Autobuild-Date(master): Thu Aug 30 21:19:31 CEST 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Christof Schmitt &lt;cs@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Christof Schmitt &lt;cs@samba.org&gt;
Autobuild-Date(master): Thu Aug 30 21:19:31 CEST 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:util: Fix parameter aliasing in tfork test</title>
<updated>2018-05-17T15:30:09+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2018-05-09T15:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6f06a0154f5769cb85f6e189eecd78cd7805090a'/>
<id>6f06a0154f5769cb85f6e189eecd78cd7805090a</id>
<content type='text'>
../lib/util/tests/tfork.c:483:24: error: passing argument 1 to
    restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
   ret = pthread_create(&amp;threads[i],
                        ^~~~~~~~~~~
../lib/util/tests/tfork.c:486:10:
          (void *)&amp;threads[i]);
          ~~~~~~~~~~~~~~~~~~~

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Guenther Deschner &lt;gd@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
../lib/util/tests/tfork.c:483:24: error: passing argument 1 to
    restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
   ret = pthread_create(&amp;threads[i],
                        ^~~~~~~~~~~
../lib/util/tests/tfork.c:486:10:
          (void *)&amp;threads[i]);
          ~~~~~~~~~~~~~~~~~~~

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Guenther Deschner &lt;gd@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
