mirror of
https://github.com/sched-ext/scx.git
synced 2026-12-03 23:30:51 +00:00
test_bpf_builder_new ends up creating some files in the directory specified by the environment variable OUT_DIR. This fails if, for example, you use a read only VM that can see that directory but not write to it. Use `tempfile::tempdir` to set this variable to a writeable temporary directory and clean it up automatically at the end of the test. Example files created: ``` $OUT_DIR/scx_utils-bpf_h $OUT_DIR/scx_utils-bpf_h/vmlinux.h $OUT_DIR/scx_utils-bpf_h/.gitignore $OUT_DIR/scx_utils-bpf_h/lib $OUT_DIR/scx_utils-bpf_h/lib/cpumask.h $OUT_DIR/scx_utils-bpf_h/lib/percpu.h $OUT_DIR/scx_utils-bpf_h/lib/sdt_task.h $OUT_DIR/scx_utils-bpf_h/bpf-compat $OUT_DIR/scx_utils-bpf_h/bpf-compat/gnu $OUT_DIR/scx_utils-bpf_h/bpf-compat/gnu/stubs.h ``` Test plan: - `cargo test` - CI