summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjvoisin2023-08-20 19:02:03 +0200
committerjvoisin2023-08-20 20:51:19 +0200
commitbc50ed6c3de76c11b2dde92d0f28dd45941fc327 (patch)
tree7cedd350931edc1ebcd23aeefd8cce3a8750c7a8 /tests
parentc17d47669ff12057f732f9ae3f69b22d52b4c6b5 (diff)
Fix clang build
- s/CLFAGS/CFLAGS/ - provide paths to local includes - sprinkle more __pass_object_size__ - remove a problematic test
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile5
-rw-r--r--tests/test_malloc.c7
-rw-r--r--tests/test_vsnprintf_dynamic.c1
-rw-r--r--tests/test_vsnprintf_static.c1
-rw-r--r--tests/test_vsprintf.c1
5 files changed, 6 insertions, 9 deletions
diff --git a/tests/Makefile b/tests/Makefile
index c2bc378..8db2853 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -31,7 +31,6 @@ TARGETS= \
31 test_gethostname_static \ 31 test_gethostname_static \
32 test_getlogin_r_dynamic \ 32 test_getlogin_r_dynamic \
33 test_getlogin_r_static \ 33 test_getlogin_r_static \
34 test_malloc \
35 test_memchr_dynamic_read \ 34 test_memchr_dynamic_read \
36 test_memchr_static_read \ 35 test_memchr_static_read \
37 test_memcpy_dynamic_read \ 36 test_memcpy_dynamic_read \
@@ -103,7 +102,9 @@ gcc: clean all
103clang: CC=clang 102clang: CC=clang
104clang: GCOV=gcov 103clang: GCOV=gcov
105clang: CFLAGS+=-I/usr/include/x86_64-linux-musl 104clang: CFLAGS+=-I/usr/include/x86_64-linux-musl
106clang: CLFAGS+=-nostdlib 105clang: CFLAGS+=-I../x86_64-linux-musl-native/include/
106clang: CFLAGS+=-Ix86_64-linux-musl-native/include/
107clang: CFLAGS+=-nostdinc
107clang: clean all 108clang: clean all
108 109
109 110
diff --git a/tests/test_malloc.c b/tests/test_malloc.c
deleted file mode 100644
index 360ee82..0000000
--- a/tests/test_malloc.c
+++ /dev/null
@@ -1,7 +0,0 @@
1#include "common.h"
2
3#include <stdlib.h>
4
5int main(int argc, char** argv) {
6 free(malloc(1));
7}
diff --git a/tests/test_vsnprintf_dynamic.c b/tests/test_vsnprintf_dynamic.c
index 5d99081..474ba26 100644
--- a/tests/test_vsnprintf_dynamic.c
+++ b/tests/test_vsnprintf_dynamic.c
@@ -10,6 +10,7 @@ int msg_valid(int n, const char * format, ... ) {
10 va_start (args, format); 10 va_start (args, format);
11 vsnprintf(buffer, n, format, args); 11 vsnprintf(buffer, n, format, args);
12 va_end (args); 12 va_end (args);
13 return 0;
13} 14}
14 15
15int msg(int n, const char * format, ... ) { 16int msg(int n, const char * format, ... ) {
diff --git a/tests/test_vsnprintf_static.c b/tests/test_vsnprintf_static.c
index f1263a8..d6b7e9b 100644
--- a/tests/test_vsnprintf_static.c
+++ b/tests/test_vsnprintf_static.c
@@ -10,6 +10,7 @@ int msg_valid(int n, const char * format, ... ) {
10 va_start (args, format); 10 va_start (args, format);
11 vsnprintf(buffer, n, format, args); 11 vsnprintf(buffer, n, format, args);
12 va_end (args); 12 va_end (args);
13 return 0;
13} 14}
14 15
15int msg(int n, const char * format, ... ) { 16int msg(int n, const char * format, ... ) {
diff --git a/tests/test_vsprintf.c b/tests/test_vsprintf.c
index 4e27201..bd5b893 100644
--- a/tests/test_vsprintf.c
+++ b/tests/test_vsprintf.c
@@ -10,6 +10,7 @@ int msg_valid(const char * format, ... ) {
10 va_start (args, format); 10 va_start (args, format);
11 vsprintf(buffer, format, args); 11 vsprintf(buffer, format, args);
12 va_end (args); 12 va_end (args);
13 return 0;
13} 14}
14 15
15int msg(const char * format, ... ) { 16int msg(const char * format, ... ) {