]> git.saurik.com Git - apple/xnu.git/blob - san/tools/validate_blacklist.sh
xnu-4903.241.1.tar.gz
[apple/xnu.git] / san / tools / validate_blacklist.sh
1 #!/bin/bash
2
3 # Ensure all blacklisted files exist. Paths with wildcards are ignored.
4 # Run against a blacklist with fully-qualified paths.
5
6 IFS=$'\n'
7
8 blacklist_files=`sed -n -e '
9 # ignore paths with wildcards
10 /\*/ d
11
12 # strip leading 'src:'
13 /^src/ {
14 s/^src://
15 p
16 }
17 ' $1`
18
19 ret=0
20
21 for f in $blacklist_files ; do
22 if ! [[ -e $f ]] ; then
23 echo "KASan: blacklisted file $f not found" >&2
24 ret=1
25 fi
26 done
27
28 exit $ret