vmtest: #121 follow-ups. Loop increase bpf-next git fetch depth

- The previously introduced git fetch depth of bpf-next tree is not sufficient
when bpf-next tree is far ahead from libbpf checkpoint commit, so increase the
depth up to 128 max. Since 128 may be an overkill for a general case, increase
exponentially in a loop until max is reached.

- Do not fetch bpf-next twice
- Remove setup_example.sh
This commit is contained in:
Julia Kartseva
2020-02-18 18:04:26 -08:00
committed by Andrii Nakryiko
parent 583bddce6b
commit f72fe00e70
5 changed files with 15 additions and 28 deletions

View File

@@ -17,8 +17,8 @@ if [ ! -d "${REPO_PATH}" ]; then
cd ${REPO_PATH}
git init
git remote add bpf-next ${BPF_NEXT_ORIGIN}
git fetch --depth ${GIT_FETCH_DEPTH} bpf-next
git reset --hard ${LINUX_SHA}
else
cd ${REPO_PATH}
for depth in 32 64 128; do
git fetch --depth ${depth} bpf-next
git reset --hard ${LINUX_SHA} && break
done
fi