diff options
| author | jvoisin | 2023-08-20 19:02:03 +0200 |
|---|---|---|
| committer | jvoisin | 2023-08-20 20:51:19 +0200 |
| commit | bc50ed6c3de76c11b2dde92d0f28dd45941fc327 (patch) | |
| tree | 7cedd350931edc1ebcd23aeefd8cce3a8750c7a8 /tests | |
| parent | c17d47669ff12057f732f9ae3f69b22d52b4c6b5 (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/Makefile | 5 | ||||
| -rw-r--r-- | tests/test_malloc.c | 7 | ||||
| -rw-r--r-- | tests/test_vsnprintf_dynamic.c | 1 | ||||
| -rw-r--r-- | tests/test_vsnprintf_static.c | 1 | ||||
| -rw-r--r-- | tests/test_vsprintf.c | 1 |
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 | |||
| 103 | clang: CC=clang | 102 | clang: CC=clang |
| 104 | clang: GCOV=gcov | 103 | clang: GCOV=gcov |
| 105 | clang: CFLAGS+=-I/usr/include/x86_64-linux-musl | 104 | clang: CFLAGS+=-I/usr/include/x86_64-linux-musl |
| 106 | clang: CLFAGS+=-nostdlib | 105 | clang: CFLAGS+=-I../x86_64-linux-musl-native/include/ |
| 106 | clang: CFLAGS+=-Ix86_64-linux-musl-native/include/ | ||
| 107 | clang: CFLAGS+=-nostdinc | ||
| 107 | clang: clean all | 108 | clang: 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 | |||
| 5 | int 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 | ||
| 15 | int msg(int n, const char * format, ... ) { | 16 | int 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 | ||
| 15 | int msg(int n, const char * format, ... ) { | 16 | int 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 | ||
| 15 | int msg(const char * format, ... ) { | 16 | int msg(const char * format, ... ) { |
