Skip to content

Commit

Permalink
Merge pull request iovisor#1646 from pchaigno/check-helpers-list-virt…
Browse files Browse the repository at this point in the history
…ual_bpf.h

scripts: check virtual_list.h's list of helpers
  • Loading branch information
yonghong-song committed Mar 23, 2018
2 parents 19e3372 + 253691a commit c5c1747
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 c5c1747

Please sign in to comment.