diff --git a/tests/s390x-asm-unsupported-pc-relative-addr/test.sh b/tests/s390x-asm-unsupported-pc-relative-addr/test.sh index 7ee5791..d081313 100755 --- a/tests/s390x-asm-unsupported-pc-relative-addr/test.sh +++ b/tests/s390x-asm-unsupported-pc-relative-addr/test.sh @@ -1,8 +1,12 @@ #!/bin/bash -eux -cd "$(mktemp -d)" +tmp=$(mktemp -d) +pushd "$tmp" # This asm has an invalid PC relative address. echo "start: la %r2,_end-start(%r2)" > test.S # clang should fail to build and inform properly about the issue. clang -c -o test.o test.S |& tee clang.output ||: grep -q "Unsupported PC-relative address" clang.output +popd +# On failure, the script will abort and tmp won't be removed. +rm -rf "$tmp" diff --git a/tests/shlibs-cet-support/test.sh b/tests/shlibs-cet-support/test.sh index b86e85a..55684e4 100755 --- a/tests/shlibs-cet-support/test.sh +++ b/tests/shlibs-cet-support/test.sh @@ -1,9 +1,13 @@ #!/bin/bash -eux -cd "$(mktemp -d)" +tmp=$(mktemp -d) +pushd "$tmp" for lib in $(rpm -ql llvm-libs | grep -E '\.so(\..+)?$'); do [[ -L $lib ]] && continue # Skip symlinks readelf -n "$lib" > notes.log grep -q "SHSTK" notes.log grep -q "IBT" notes.log done +popd +# On failure, the script will abort and tmp won't be removed. +rm -rf "$tmp"