diff options
Diffstat (limited to 'tools/build')
-rw-r--r-- | tools/build/Makefile.feature | 5 | ||||
-rw-r--r-- | tools/build/feature/Makefile | 14 | ||||
-rw-r--r-- | tools/build/feature/test-all.c | 15 | ||||
-rw-r--r-- | tools/build/feature/test-libelf-gelf_getnote.c | 7 | ||||
-rw-r--r-- | tools/build/feature/test-libelf-getshdrstrndx.c | 8 | ||||
-rw-r--r-- | tools/build/feature/test-sdt.c | 7 |
6 files changed, 54 insertions, 2 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 57c8f98..a120c6b 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -40,6 +40,8 @@ FEATURE_TESTS_BASIC := \ libbfd \ libelf \ libelf-getphdrnum \ + libelf-gelf_getnote \ + libelf-getshdrstrndx \ libelf-mmap \ libnuma \ numa_num_possible_cpus \ @@ -60,7 +62,8 @@ FEATURE_TESTS_BASIC := \ zlib \ lzma \ get_cpuid \ - bpf + bpf \ + sdt # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list # of all feature tests diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 3d88f09..a0b29a3 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -17,6 +17,8 @@ FILES= \ test-cplus-demangle.bin \ test-libelf.bin \ test-libelf-getphdrnum.bin \ + test-libelf-gelf_getnote.bin \ + test-libelf-getshdrstrndx.bin \ test-libelf-mmap.bin \ test-libnuma.bin \ test-numa_num_possible_cpus.bin \ @@ -43,7 +45,8 @@ FILES= \ test-zlib.bin \ test-lzma.bin \ test-bpf.bin \ - test-get_cpuid.bin + test-get_cpuid.bin \ + test-sdt.bin FILES := $(addprefix $(OUTPUT),$(FILES)) @@ -98,6 +101,12 @@ $(OUTPUT)test-libelf-mmap.bin: $(OUTPUT)test-libelf-getphdrnum.bin: $(BUILD) -lelf +$(OUTPUT)test-libelf-gelf_getnote.bin: + $(BUILD) -lelf + +$(OUTPUT)test-libelf-getshdrstrndx.bin: + $(BUILD) -lelf + $(OUTPUT)test-libnuma.bin: $(BUILD) -lnuma @@ -205,6 +214,9 @@ $(OUTPUT)test-get_cpuid.bin: $(OUTPUT)test-bpf.bin: $(BUILD) +$(OUTPUT)test-sdt.bin: + $(BUILD) + -include $(OUTPUT)*.d ############################### diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index a282e8c..699e436 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -49,6 +49,14 @@ # include "test-libelf-getphdrnum.c" #undef main +#define main main_test_libelf_gelf_getnote +# include "test-libelf-gelf_getnote.c" +#undef main + +#define main main_test_libelf_getshdrstrndx +# include "test-libelf-getshdrstrndx.c" +#undef main + #define main main_test_libunwind # include "test-libunwind.c" #undef main @@ -137,6 +145,10 @@ # include "test-libcrypto.c" #undef main +#define main main_test_sdt +# include "test-sdt.c" +#undef main + int main(int argc, char *argv[]) { main_test_libpython(); @@ -149,6 +161,8 @@ int main(int argc, char *argv[]) main_test_dwarf(); main_test_dwarf_getlocations(); main_test_libelf_getphdrnum(); + main_test_libelf_gelf_getnote(); + main_test_libelf_getshdrstrndx(); main_test_libunwind(); main_test_libaudit(); main_test_libslang(); @@ -168,6 +182,7 @@ int main(int argc, char *argv[]) main_test_get_cpuid(); main_test_bpf(); main_test_libcrypto(); + main_test_sdt(); return 0; } diff --git a/tools/build/feature/test-libelf-gelf_getnote.c b/tools/build/feature/test-libelf-gelf_getnote.c new file mode 100644 index 0000000..d78cf4d --- /dev/null +++ b/tools/build/feature/test-libelf-gelf_getnote.c @@ -0,0 +1,7 @@ +#include <stdlib.h> +#include <gelf.h> + +int main(void) +{ + return gelf_getnote(NULL, 0, NULL, NULL, NULL); +} diff --git a/tools/build/feature/test-libelf-getshdrstrndx.c b/tools/build/feature/test-libelf-getshdrstrndx.c new file mode 100644 index 0000000..f0c3b47 --- /dev/null +++ b/tools/build/feature/test-libelf-getshdrstrndx.c @@ -0,0 +1,8 @@ +#include <libelf.h> + +int main(void) +{ + size_t dst; + + return elf_getshdrstrndx(0, &dst); +} diff --git a/tools/build/feature/test-sdt.c b/tools/build/feature/test-sdt.c new file mode 100644 index 0000000..e4531a6 --- /dev/null +++ b/tools/build/feature/test-sdt.c @@ -0,0 +1,7 @@ +#include <sys/sdt.h> + +int main(void) +{ + DTRACE_PROBE(provider, name); + return 0; +} |