diff --git a/src/test/test_bt.sh b/src/test/test_bt.sh
index 56e6cc40f8be9a4989ef79c8ee44012c7fbcc9f8..f55f451f92eea2536cccc5986697afc80ee9bfeb 100755
--- a/src/test/test_bt.sh
+++ b/src/test/test_bt.sh
@@ -3,6 +3,7 @@
 
 exitcode=0
 
+"${builddir:-.}/src/test/test-bt-cl" backtraces || exit 77
 "${builddir:-.}/src/test/test-bt-cl" assert | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode=1
 "${builddir:-.}/src/test/test-bt-cl" crash  | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode=1
 
diff --git a/src/test/test_bt_cl.c b/src/test/test_bt_cl.c
index 01c621eb0ed418ba67b7d401caefe81372c8b1cc..dabaee6e0a5dc342690f0be5d1764d9db1af0095 100644
--- a/src/test/test_bt_cl.c
+++ b/src/test/test_bt_cl.c
@@ -84,15 +84,24 @@ main(int argc, char **argv)
 
   if (argc < 2) {
     puts("I take an argument. It should be \"assert\" or \"crash\" or "
-         "\"none\"");
+         "\"backtraces\" or \"none\"");
     return 1;
   }
+
+#if !(defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
+   defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION))
+    puts("Backtrace reporting is not supported on this platform");
+    return 77;
+#endif
+
   if (!strcmp(argv[1], "assert")) {
     crashtype = 1;
   } else if (!strcmp(argv[1], "crash")) {
     crashtype = 0;
   } else if (!strcmp(argv[1], "none")) {
     crashtype = -1;
+  } else if (!strcmp(argv[1], "backtraces")) {
+    return 0;
   } else {
     puts("Argument should be \"assert\" or \"crash\" or \"none\"");
     return 1;