diff options
Diffstat (limited to 'tools/build/feature')
-rw-r--r-- | tools/build/feature/Makefile | 10 | ||||
-rw-r--r-- | tools/build/feature/test-all.c | 7 | ||||
-rw-r--r-- | tools/build/feature/test-fortify-source.c | 1 | ||||
-rw-r--r-- | tools/build/feature/test-gettid.c | 11 | ||||
-rw-r--r-- | tools/build/feature/test-hello.c | 1 | ||||
-rw-r--r-- | tools/build/feature/test-libslang-include-subdir.c | 7 | ||||
-rw-r--r-- | tools/build/feature/test-setns.c | 1 |
7 files changed, 36 insertions, 2 deletions
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 4b8244ee65ce..0658b8cd0e53 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -31,6 +31,7 @@ FILES= \ test-libpython.bin \ test-libpython-version.bin \ test-libslang.bin \ + test-libslang-include-subdir.bin \ test-libcrypto.bin \ test-libunwind.bin \ test-libunwind-debug-frame.bin \ @@ -54,6 +55,7 @@ FILES= \ test-get_cpuid.bin \ test-sdt.bin \ test-cxx.bin \ + test-gettid.bin \ test-jvmti.bin \ test-jvmti-cmlr.bin \ test-sched_getcpu.bin \ @@ -181,7 +183,10 @@ $(OUTPUT)test-libaudit.bin: $(BUILD) -laudit $(OUTPUT)test-libslang.bin: - $(BUILD) -I/usr/include/slang -lslang + $(BUILD) -lslang + +$(OUTPUT)test-libslang-include-subdir.bin: + $(BUILD) -lslang $(OUTPUT)test-libcrypto.bin: $(BUILD) -lcrypto @@ -267,6 +272,9 @@ $(OUTPUT)test-sdt.bin: $(OUTPUT)test-cxx.bin: $(BUILDXX) -std=gnu++11 +$(OUTPUT)test-gettid.bin: + $(BUILD) + $(OUTPUT)test-jvmti.bin: $(BUILD) diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index a59c53705093..88145e8cde1a 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -38,6 +38,10 @@ # include "test-get_current_dir_name.c" #undef main +#define main main_test_gettid +# include "test-gettid.c" +#undef main + #define main main_test_glibc # include "test-glibc.c" #undef main @@ -182,7 +186,7 @@ # include "test-disassembler-four-args.c" #undef main -#define main main_test_zstd +#define main main_test_libzstd # include "test-libzstd.c" #undef main @@ -195,6 +199,7 @@ int main(int argc, char *argv[]) main_test_libelf(); main_test_libelf_mmap(); main_test_get_current_dir_name(); + main_test_gettid(); main_test_glibc(); main_test_dwarf(); main_test_dwarf_getlocations(); diff --git a/tools/build/feature/test-fortify-source.c b/tools/build/feature/test-fortify-source.c index c9f398d87868..c8a57194f9f2 100644 --- a/tools/build/feature/test-fortify-source.c +++ b/tools/build/feature/test-fortify-source.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> int main(void) diff --git a/tools/build/feature/test-gettid.c b/tools/build/feature/test-gettid.c new file mode 100644 index 000000000000..ef24e42d3f1b --- /dev/null +++ b/tools/build/feature/test-gettid.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0 +// Copyright (C) 2019, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> +#define _GNU_SOURCE +#include <unistd.h> + +int main(void) +{ + return gettid(); +} + +#undef _GNU_SOURCE diff --git a/tools/build/feature/test-hello.c b/tools/build/feature/test-hello.c index c9f398d87868..c8a57194f9f2 100644 --- a/tools/build/feature/test-hello.c +++ b/tools/build/feature/test-hello.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> int main(void) diff --git a/tools/build/feature/test-libslang-include-subdir.c b/tools/build/feature/test-libslang-include-subdir.c new file mode 100644 index 000000000000..3ea47ec7590e --- /dev/null +++ b/tools/build/feature/test-libslang-include-subdir.c @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <slang/slang.h> + +int main(void) +{ + return SLsmg_init_smg(); +} diff --git a/tools/build/feature/test-setns.c b/tools/build/feature/test-setns.c index 4a1581ae7a55..2757c201ed50 100644 --- a/tools/build/feature/test-setns.c +++ b/tools/build/feature/test-setns.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <sched.h> |