Remove temporary files
Ensure s390x-asm-unsupported-pc-relative-addr and shlibs-cet-support remove temporary files after a successful execution.
This commit is contained in:
parent
336e421c1a
commit
de1663d7a9
2 changed files with 10 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue