<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/util/tests, branch talloc-2.3.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>tests-util: Adding test to verify "allow no conversion" flag</title>
<updated>2019-06-30T12:47:24+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-06-03T08:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=d5383297f0389d01d42479b074f5e81619e03ddb'/>
<id>d5383297f0389d01d42479b074f5e81619e03ddb</id>
<content type='text'>
The internal string conversion routines smb_strtoul(l) return
an error if the provided string could not be converted to an integer.
This can be the case if the string is empty or if it starts with non-numeric
characters which cannot be converted.
The standard C library, however, does allow this and simply returns 0 as the
converted value.
If this behaviour is wanted, it can be enabled by using
the "SMB_STR_ALLOW_NO_CONVERSION" flag.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Sun Jun 30 12:47:24 UTC 2019 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The internal string conversion routines smb_strtoul(l) return
an error if the provided string could not be converted to an integer.
This can be the case if the string is empty or if it starts with non-numeric
characters which cannot be converted.
The standard C library, however, does allow this and simply returns 0 as the
converted value.
If this behaviour is wanted, it can be enabled by using
the "SMB_STR_ALLOW_NO_CONVERSION" flag.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Sun Jun 30 12:47:24 UTC 2019 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>tests-util: Adding test to verify "full-string-conversion" flag</title>
<updated>2019-06-30T11:32:19+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-06-03T08:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=dac981a3887fe79650b38e63799e344b22c8f5f1'/>
<id>dac981a3887fe79650b38e63799e344b22c8f5f1</id>
<content type='text'>
The standard string to integer conversion routines stop at the first
character which cannot be converted to a number.
However, if such a character is found, it is not considered an error.
With the flag "SMB_STR_FULL_STR_CONV" enabled, an error will be returned
if the string could not be converted entirely.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard string to integer conversion routines stop at the first
character which cannot be converted to a number.
However, if such a character is found, it is not considered an error.
With the flag "SMB_STR_FULL_STR_CONV" enabled, an error will be returned
if the string could not be converted entirely.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests-util: Adding test to verify "allow-negative" flag</title>
<updated>2019-06-30T11:32:18+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-06-03T08:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ed533debc40f3173326c65a90ae344d01ec1d427'/>
<id>ed533debc40f3173326c65a90ae344d01ec1d427</id>
<content type='text'>
The standard string to integer conversion routines allow strings
with a leading "-" to indicate a negative number.
However, the returned value is always an unsigned value representing
the bit-pattern of this negative value.
Typically, this behaviour is NOT wanted and therefore the standard
behavior of the internal smb_strtoul(l) return an erros in such situations.
It can be enabled though by using the flag SMB_STR_ALLOW_NEGATIVE.
This test verifies the correct processing.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard string to integer conversion routines allow strings
with a leading "-" to indicate a negative number.
However, the returned value is always an unsigned value representing
the bit-pattern of this negative value.
Typically, this behaviour is NOT wanted and therefore the standard
behavior of the internal smb_strtoul(l) return an erros in such situations.
It can be enabled though by using the flag SMB_STR_ALLOW_NEGATIVE.
This test verifies the correct processing.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Update all consumers of strtoul_err(), strtoull_err() to new API</title>
<updated>2019-06-30T11:32:18+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-06-04T06:57:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a8bbd60fd9d10afa0aaf9359782428b8836a9732'/>
<id>a8bbd60fd9d10afa0aaf9359782428b8836a9732</id>
<content type='text'>
Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests-util: Adding test to verify "no-conversion" detection</title>
<updated>2019-06-30T11:32:18+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-04-10T08:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ba021e3cfb2d8497f0e62001782387547e996ded'/>
<id>ba021e3cfb2d8497f0e62001782387547e996ded</id>
<content type='text'>
The standard string to integer conversion routines return zero
if a string was to be converted which did not reflect a number.
It is not flag'ed as an error.
The wrapper functions strtoul_err() and strtoull_err() are expected
to exactly do this.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard string to integer conversion routines return zero
if a string was to be converted which did not reflect a number.
It is not flag'ed as an error.
The wrapper functions strtoul_err() and strtoull_err() are expected
to exactly do this.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests-util: Adding test to verify negative "number" detection</title>
<updated>2019-06-30T11:32:17+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-04-10T08:44:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9af0614bcb1750e29a1018e7c6fb6f655cb594fd'/>
<id>9af0614bcb1750e29a1018e7c6fb6f655cb594fd</id>
<content type='text'>
Verify that a string representing a negative number is throwing an error.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Verify that a string representing a negative number is throwing an error.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests-util: Adding strtoul(l)_err() test leaving errno untouched</title>
<updated>2019-06-30T11:32:17+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-04-10T08:24:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c878fbcec9cefbcc1f3a966689cd7375eaf8632f'/>
<id>c878fbcec9cefbcc1f3a966689cd7375eaf8632f</id>
<content type='text'>
The wrapper functions strtoul_err() and strtoull_err() trigger
other functions/routines which modify errno.
However, callers of those wrapper functions expect errno to be unchanged.
This test verifies the expectation.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The wrapper functions strtoul_err() and strtoull_err() trigger
other functions/routines which modify errno.
However, callers of those wrapper functions expect errno to be unchanged.
This test verifies the expectation.

Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Christof Schmitt &lt;cs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util/tests: clang fix Value stored to 'lines' is never read warning</title>
<updated>2019-06-04T22:13:07+00:00</updated>
<author>
<name>Noel Power</name>
<email>noel.power@suse.com</email>
</author>
<published>2019-05-23T13:52:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a0ccec6291a219ded9b1a86ddaa18a61456699da'/>
<id>a0ccec6291a219ded9b1a86ddaa18a61456699da</id>
<content type='text'>
Fixes

lib/util/tests/file.c:153:2: warning: Value stored to 'lines' is never read &lt;--[clang]

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes

lib/util/tests/file.c:153:2: warning: Value stored to 'lines' is never read &lt;--[clang]

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix uClibc build on 64bit platforms by including stdint.h</title>
<updated>2019-05-19T17:34:20+00:00</updated>
<author>
<name>Fabrice Fontaine</name>
<email>fontaine.fabrice@gmail.com</email>
</author>
<published>2019-05-18T10:42:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=519d72c57857bfa51ab84a478be687e5c34f9a2c'/>
<id>519d72c57857bfa51ab84a478be687e5c34f9a2c</id>
<content type='text'>
Fixes an error detected by buildroot autobuilders:
http://autobuild.buildroot.net/results/573/573e2268e205e10d1352fa81122d8f225fdb4575/build-end.log

/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27:
error: conflicting types for 'uintptr_t'
 typedef unsigned long int uintptr_t;
                           ^
In file included from ../lib/ldb/tests/ldb_msg.c:17:0:
../third_party/cmocka/cmocka.h:126:28: note: previous declaration of 'uintptr_t' was here
       typedef unsigned int uintptr_t;

The define __WORDSIZE is missing when cmocka.h decides how to
define uintptr_t, this patch includes stdint.h when needed.

Patch sent upstream:
https://lists.samba.org/archive/samba-technical/2018-January/125306.html

[updated for samba-4.8.4, v2 sent upstream
 https://lists.samba.org/archive/samba-technical/2018-August/129732.html,
 updated for samba-4.9.1]

Signed-off-by: Bernd Kuhls &lt;bernd.kuhls@t-online.de&gt;
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/samba4/0003-Fix-uClibc-build-on-64bit-platforms-by-including-std.patch]
Signed-off-by: Fabrice Fontaine &lt;fontaine.fabrice@gmail.com&gt;
Reviewed-by: Ralph Böhme &lt;slow@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes an error detected by buildroot autobuilders:
http://autobuild.buildroot.net/results/573/573e2268e205e10d1352fa81122d8f225fdb4575/build-end.log

/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27:
error: conflicting types for 'uintptr_t'
 typedef unsigned long int uintptr_t;
                           ^
In file included from ../lib/ldb/tests/ldb_msg.c:17:0:
../third_party/cmocka/cmocka.h:126:28: note: previous declaration of 'uintptr_t' was here
       typedef unsigned int uintptr_t;

The define __WORDSIZE is missing when cmocka.h decides how to
define uintptr_t, this patch includes stdint.h when needed.

Patch sent upstream:
https://lists.samba.org/archive/samba-technical/2018-January/125306.html

[updated for samba-4.8.4, v2 sent upstream
 https://lists.samba.org/archive/samba-technical/2018-August/129732.html,
 updated for samba-4.9.1]

Signed-off-by: Bernd Kuhls &lt;bernd.kuhls@t-online.de&gt;
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/samba4/0003-Fix-uClibc-build-on-64bit-platforms-by-including-std.patch]
Signed-off-by: Fabrice Fontaine &lt;fontaine.fabrice@gmail.com&gt;
Reviewed-by: Ralph Böhme &lt;slow@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:util: Add a test for byteorder.h</title>
<updated>2019-05-17T20:44:36+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2019-05-16T06:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0b8b04dbd3f053f11da15a8f28bbd5cbd9f4d48b'/>
<id>0b8b04dbd3f053f11da15a8f28bbd5cbd9f4d48b</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Fri May 17 20:44:36 UTC 2019 on sn-devel-184
</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: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Fri May 17 20:44:36 UTC 2019 on sn-devel-184
</pre>
</div>
</content>
</entry>
</feed>
