Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-vmtest@v2 and build-selftests@v2 #150

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Commits on Nov 7, 2024

  1. Configuration menu
    Copy the full SHA
    73e00a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e07035 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    70bdc5f View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. run-vmtest@v2: remove unused img input, make vmlinuz optional

    Previously the first run-vmtest action step would always search for
    vmlinux image in KERNEL_ROOT, and then copy it to path specified by
    inputs.vmlinuz
    
    However, the caller may want to pass vmlinux image directly.
    
    Change this behavior: search only inputs.vmlinuz was not passed.
    
    Signed-off-by: Ihor Solodrai <[email protected]>
    theihor committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    46b3858 View commit details
    Browse the repository at this point in the history
  2. run-vmtest@v2: make the scripts more reusable

    Various changes in the scripts aimed to make run-vmtest action usable
    by libbpf/libbpf workflows:
    
    * Change how ALLOWLIST and DENYLIST are set up. A script executing in
      qemu (vmtest) is now expecting a single $ALLOWLIST_FILE and
      $DENYLIST_FILE which are parsed by read_lists as usual. This change
      makes it easier for an action caller to modify the lists, as they are
      often composed from a number of files.
    
    * Update vmtest init command (executed in qemu before the tests), to
      create a link from /boot to vmlinux being tested. This is necessary
      when older kernels are tested.
    
    * Allow some env variables to be defined outside of the scripts to
      give the caller more control over the action. That is, before
      setting a default value, check if the variable is set.
    
    * Remove env vars like $THISDIR, $PROJECT_NAME etc. in favor of
      $GITHUB_ACTION_PATH, $GITHUB_WORKSPACE and $KERNEL_ROOT
    
    * Move selftests running scripts from ci/vmtest to run-vmtest, so that
      they are local to the action
    
    Signed-off-by: Ihor Solodrai <[email protected]>
    theihor committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    58a9063 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2024

  1. run-vmtest: more flexible configuration

    Adjust run-vmtest scripts so that the action is callable from
    libbpf/libbpf, particularly with pre-built kernels.
    
    More environment variables can now be set by a caller to direct the
    scripts behavior: SELFTESTS_BPF, VERISTAT_CONFIGS, VMLINUX, VMLINUZ
    
    A symlink to standard vmlinux location is created before vmtest is
    executed to accomodate older kernels.
    
    The command passed tp vmtest is refactored, separating generic vmtet
    init and VMTEST_SCRIPT execution.
    
    Search and processing of json test summaries is now noop in case when
    no summaries are found.
    
    Signed-off-by: Ihor Solodrai <[email protected]>
    theihor committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    d2edfb9 View commit details
    Browse the repository at this point in the history
  2. get-linux-source: introduce FETCH_DEPTH env variable

    FETCH_DEPTH now controls how to get linux source. If it's 0, the
    snapshot is searched for and downloaded if found.  Otherwise git clone
    --depth $FETCH_DEPTH is executed, and .git is preserved.
    
    Signed-off-by: Ihor Solodrai <[email protected]>
    theihor committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    e67a7e4 View commit details
    Browse the repository at this point in the history
  3. build-selftests: v2 of the action inputs

    Changes in action inputs:
      * kernel-root is now a required input
      * kernel, kbuild-output and max-make-jobs are removed
    
    kernel-root input is required, because to build selftests
    one must to clone a kernel source tree first.
    
    The build script behavior can be directed more granularly with env
    variables:
      * KBUILD_OUTPUT now defaults to the kernel-root
      * VMLINUX_BTF now can be set externally
      * MAX_MAKE_JOBS can be set as env variable if desired
    
    Preparation script logic is removed: the rationale is that the caller
    is responsible for setting up required environment before building.
    
    Signed-off-by: Ihor Solodrai <[email protected]>
    theihor committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    0af20a5 View commit details
    Browse the repository at this point in the history
  4. ci workflows: cached kernel build and updated actions

    Introduce CACHED_KERNEL_BUILD variable and change download/build steps
    to make use of the cached incremental build on libbpf/ci workflows.
    
    Change parameters passed to build-selftests.
    
    Add a step preparing allow/denylist before running vmtest.
    
    Signed-off-by: Ihor Solodrai <[email protected]>
    theihor committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    73fe629 View commit details
    Browse the repository at this point in the history