Skip to content

Commit

Permalink
ci: sync with docs
Browse files Browse the repository at this point in the history
  • Loading branch information
whentojump committed Jul 3, 2024
1 parent c168ecb commit 04c8d84
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
15 changes: 5 additions & 10 deletions ci/2_pull_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@
cd $MCDC_HOME

# This meta repository
git clone https://github.com/xlab-uiuc/linux-mcdc.git --branch llvm19
git clone https://github.com/xlab-uiuc/linux-mcdc.git --branch v0.6-wip
# LLVM if we want to build it from source (optional)
git clone https://github.com/llvm/llvm-project.git --branch main
git clone https://github.com/llvm/llvm-project.git --depth 5
# Linux kernel
git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --branch v5.15.153 --depth 5

# Use the snapshot of LLVM on June 11 2024
cd $MCDC_HOME/llvm-project
git checkout f5dcfb9968a3

# Apply kernel patches
cd $MCDC_HOME/linux
git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0001-clang_instr_profile-add-Clang-s-Source-based-Code-Co.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0002-kbuild-clang_instr_profile-disable-instrumentation-i.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0003-clang_instr_profile-add-Clang-s-MC-DC-support.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0004-kbuild-clang_instr_profile-disable-instrumentation-i.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0001-llvm-cov-add-Clang-s-Source-based-Code-Coverage-supp.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0002-kbuild-llvm-cov-disable-instrumentation-in-odd-or-se.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0003-llvm-cov-add-Clang-s-MC-DC-support.patch
6 changes: 3 additions & 3 deletions ci/4_build_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ make LLVM=1 olddefconfig
./scripts/config -e CONFIG_KUNIT_ALL_TESTS
make LLVM=1 olddefconfig

./scripts/config -e CONFIG_INSTR_PROFILE_CLANG
./scripts/config -e CONFIG_SCC_CLANG
./scripts/config -e CONFIG_MCDC_CLANG
./scripts/config -e CONFIG_LLVM_COV_KERNEL
./scripts/config -e CONFIG_LLVM_COV_KERNEL_MCDC
./scripts/config --set-val LLVM_COV_KERNEL_MCDC_MAX_CONDITIONS 44
make LLVM=1 olddefconfig

cat << EOF
Expand Down
4 changes: 2 additions & 2 deletions ci/5_boot_kernel_and_collect_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

GUEST_COMMANDS="true"
GUEST_COMMANDS="$GUEST_COMMANDS; uname -a"
GUEST_COMMANDS="$GUEST_COMMANDS; ls /sys/kernel/debug/clang_instr_profile"
GUEST_COMMANDS="$GUEST_COMMANDS; cp /sys/kernel/debug/clang_instr_profile/profraw ."
GUEST_COMMANDS="$GUEST_COMMANDS; ls /sys/kernel/debug/llvm-cov"
GUEST_COMMANDS="$GUEST_COMMANDS; cp /sys/kernel/debug/llvm-cov/profraw ."

cd $MCDC_HOME/linux
$MCDC_HOME/linux-mcdc/scripts/q -c "$GUEST_COMMANDS"
Expand Down

0 comments on commit 04c8d84

Please sign in to comment.