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

@@ -1,11 +1,19 @@
#!/bin/bash
set -eux
GIT_FETCH_DEPTH="${GIT_FETCH_DEPTH}" ${VMTEST_ROOT}/checkout_latest_kernel.sh $1
REPO_PATH=$1
${VMTEST_ROOT}/checkout_latest_kernel.sh ${REPO_PATH}
cd ${REPO_PATH}
if [[ "${KERNEL}" = 'LATEST' ]]; then
cp ${VMTEST_ROOT}/configs/latest.config .config
make -j $((4*$(nproc))) olddefconfig all
fi
# Fix runqslower build
# TODO(hex@): remove after the patch is merged from bpf to bpf-next tree
cd $1
wget https://lore.kernel.org/bpf/908498f794661c44dca54da9e09dc0c382df6fcb.1580425879.git.hex@fb.com/t.mbox.gz
gunzip t.mbox.gz
git apply t.mbox