From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Branch: master
tests: pass AARCH64_PORT_STUB macro when building aarch64 image
This patch also fixes compilation of tst-stdio.cc on aarch64.
Signed-off-by: Waldemar Kozaczuk <
jwkoz...@gmail.com>
---
diff --git a/modules/tests/Makefile b/modules/tests/Makefile
--- a/modules/tests/Makefile
+++ b/modules/tests/Makefile
@@ -69,7 +69,7 @@ endif
COMMON = $(autodepend) $(INCLUDES)
ifeq ($(arch),aarch64)
- COMMON += --sysroot $(aarch64_gccbase)
+ COMMON += --sysroot $(aarch64_gccbase) -DAARCH64_PORT_STUB
endif
COMMON += -g -O2 -fPIC -DBOOST_TEST_DYN_LINK \
diff --git a/tests/tst-stdio.cc b/tests/tst-stdio.cc
--- a/tests/tst-stdio.cc
+++ b/tests/tst-stdio.cc
@@ -44,12 +44,14 @@ namespace utf = boost::unit_test;
//#include "BionicDeathTest.h"
//#include "utils.h"
+#ifndef AARCH64_PORT_STUB
// This #include is actually a test too. We have to duplicate the
// definitions of the RENAME_ constants because <linux/fs.h> also contains
// pollution such as BLOCK_SIZE which conflicts with lots of user code.
// Important to check that we have matching definitions.
// There's no _MAX to test that we have all the constants, sadly.
#include <linux/fs.h>
+#endif
#if defined(NOFORTIFY)
#define STDIO_TEST stdio_nofortify
@@ -2477,6 +2479,7 @@ TEST(STDIO_TEST, fread_with_locked_file) {
fclose(fp1);
}
+#ifndef AARCH64_PORT_STUB
TEST(STDIO_TEST, SEEK_macros) {
ASSERT_EQ(0, SEEK_SET);
ASSERT_EQ(1, SEEK_CUR);
@@ -2486,6 +2489,7 @@ TEST(STDIO_TEST, SEEK_macros) {
// So we'll notice if Linux grows another constant in <linux/fs.h>...
ASSERT_EQ(SEEK_MAX, SEEK_HOLE);
}
+#endif
TEST(STDIO_TEST, rename) {
TemporaryDir td;