diff mbox

extras: New test/build infrastructure

Message ID b092720c-61a0-2d3e-f505-01f2c8d9b39f@redhat.com
State New
Headers show

Commit Message

Florian Weimer Nov. 25, 2016, 4:16 p.m. UTC
On 11/25/2016 04:59 PM, Florian Weimer wrote:
> I have split up test-skeleton.c into its components.  The new test
> skeleton should be compatible with compilation in C90 mode.  I expect to
> use some of these helper functions for future build support on the host
> (that is, these routines will have to be compiled twice, once against
> the built libc, and once against the host libc).
>
> I converted a few tests to make sure that this works as expected.
>
> I do not propose bulk migration at this point.  Some obscure use cases
> are not supported by the exported hooks.
>
> If you think this goes in the right direction, I will port over my
> container-based nss_files testing, and the resolver test suite to this
> infrastructure.  It also eliminates the need for the hack in my fix for
> bug 16421 I posted earlier.
>
> Tested on aarch64, ppc64le, s390x, x86_64.

Testing on i386 revealed that the following change to the temporary file 
infrastructure is needed.

Florian
diff mbox

Patch

diff --git a/extras/temp_file.c b/extras/temp_file.c
index 32b6560..a409d7a 100644
--- a/extras/temp_file.c
+++ b/extras/temp_file.c
@@ -16,6 +16,10 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+/* This is required to get an mkstemp which can create large files on
+   some 32-bit platforms. */
+#define _FILE_OFFSET_BITS 64
+
 #include <extras/temp_file.h>
 #include <extras/temp_file-internal.h>
 #include <extras/extras.h>