#!/bin/bash base_dir="$(dirname "$(readlink -f "$0")")" cd "$base_dir" source ./env if [ "$#" -lt 1 ] ; then >&2 echo -e "Missing argument: test name. Usage example:\n" \ "$0 math/test-matherr" exit 1 fi test_file="$(echo "$1" | sed 's|glibc/build/||')" glibc_base="$base_dir/glibc/build" test_path="$glibc_base/$test_file" eh_frame_check="$base_dir/eh_frame_check/testing/eh_frame_check.py" if [ ! -x "$test_path" ] ; then >&2 echo "File $test_path does not exist or is not executable." exit 1 fi gdb -q -x "$eh_frame_check" \ -args $glibc_base/elf/ld-linux-x86-64.so.2 \ --library-path "$LIB_PATH" \ "$test_path"