Skip to content

Commit

Permalink
scripts: check virtual_list.h's list of helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
pchaigno committed Mar 23, 2018
1 parent 19e3372 commit 253691a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/check-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ if [ $? -ne 0 ]; then
((ret++))
fi

virtual=$(grep -oP "(?<=^\sFN\()\w+" src/cc/compat/linux/virtual_bpf.h | tail -n +2 | sort -u)
dif=$(diff <(echo "$compat") <(echo "$virtual"))
if [ $? -ne 0 ]; then
echo "The lists of helpers in src/cc/compat/linux/bpf.h and src/cc/compat/linux/virtual_bpf.h differ:"
echo "$dif"
((ret++))
fi

export=$(grep -oP "(?<=BPF_FUNC_)\w+" src/cc/export/helpers.h | sort -u)
dif=$(diff <(echo "$compat") <(echo "$export"))
if [ $? -ne 0 ]; then
Expand Down

0 comments on commit 253691a

Please sign in to comment.