Remove the test case. We cannot unwind on ARM (not supported by the platform), but only on x86 (32/64 bit) and also riscv4

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2023-08-01 21:42:02 +02:00
parent 945df7f846
commit fbaefcfa0c
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
3 changed files with 3 additions and 12 deletions

View File

@ -285,7 +285,7 @@ find_library(LIBGMP NAMES libgmp${CMAKE_STATIC_LIBRARY_SUFFIX} gmp)
find_library(LIBNETTLE NAMES libnettle${CMAKE_STATIC_LIBRARY_SUFFIX} nettle HINTS /usr/local/lib64)
find_library(LIBIDN NAMES libidn${CMAKE_STATIC_LIBRARY_SUFFIX} idn)
find_library(LIBDL NAMES libdl${CMAKE_STATIC_LIBRARY_SUFFIX} dl)
target_link_libraries(pihole-FTL rt Threads::Threads ${LIBHOGWEED} ${LIBGMP} ${LIBNETTLE} ${LIBIDN} ${LIBDL})
target_link_libraries(pihole-FTL rt Threads::Threads ${LIBHOGWEED} ${LIBGMP} ${LIBNETTLE} ${LIBIDN} -ldl ${LIBDL})
find_library(LIBUNWIND NAMES libunwind${CMAKE_STATIC_LIBRARY_SUFFIX} unwind)
if(LIBUNWIND)

View File

@ -59,6 +59,7 @@ static char * __attribute__ ((nonnull (1))) getthread_name(char buffer[16])
return buffer;
}
#if defined(USE_UNWIND) || defined(__GLIBC__)
static void print_addr2line(const char *symbol, const void *addr)
{
// Only do this analysis for our own binary (skip trying to analyse libc.so, etc.)
@ -116,6 +117,7 @@ static int phdr_callback(struct dl_phdr_info *info, size_t size, void *data)
}
return 0;
}
#endif
void generate_backtrace(void) {
#ifdef USE_UNWIND

View File

@ -1351,14 +1351,3 @@
[[ $status == 0 ]]
run bash -c "rm ${filename}"
}
@test "Backtrace generation works for articifial crash test" {
run bash -c './pihole-FTL crash'
printf "%s\n" "${lines[@]}"
[[ "${lines[@]}" == *"--> FTL crashed! <--"* ]]
[[ "${lines[@]}" == *"1: ./pihole-FTL(signal_handler+"* ]]
[[ "${lines[@]}" == *"/app/src/signals.c:337"* ]]
[[ "${lines[@]}" == *"03: ./pihole-FTL(main+"* ]]
[[ "${lines[@]}" == *"/app/src/main.c:73"* ]]
[[ $status == 1 ]]
}