77 test-matrix test-matrix-elfuse-aarch64 test-matrix-qemu-aarch64 \
88 test-full test-multi-vcpu test-rwx test-sysroot-rename \
99 test-case-collision test-case-collision-fallback test-sysroot-create-paths \
10- test-proctitle-low-stack \
10+ test-proctitle-host test-proctitle- low-stack \
1111 test-sysroot-procfs-exec test-timeout-disable test-fuse-alpine \
1212 test-sysroot-nofollow test-sysroot-chdir perf
1313
@@ -23,6 +23,8 @@ check-syscall-coverage:
2323# # Run the unit test suite plus busybox applet validation
2424check : $(ELFUSE_BIN ) $(TEST_DEPS ) check-syscall-coverage
2525 @bash tests/driver.sh -e $(ELFUSE_BIN ) -d $(TEST_DIR ) -v
26+ @printf " \n$( BLUE) ━━━ proctitle argv-tail regression ━━━$( RESET) \n"
27+ @$(MAKE ) --no-print-directory test-proctitle-host
2628 @printf " \n$( BLUE) ━━━ proctitle low-stack regression ━━━$( RESET) \n"
2729 @$(MAKE ) --no-print-directory test-proctitle-low-stack
2830 @printf " \n$( BLUE) ━━━ busybox applet validation ━━━$( RESET) \n"
@@ -35,7 +37,8 @@ check: $(ELFUSE_BIN) $(TEST_DEPS) check-syscall-coverage
3537 @$(MAKE ) --no-print-directory test-timeout-disable
3638
3739test-sysroot-rename : $(ELFUSE_BIN ) $(BUILD_DIR ) /test-sysroot-rename
38- @tmpdir=$$(mktemp -d ) ; \
40+ @set -e; \
41+ tmpdir=$$(mktemp -d ) ; \
3942 trap ' rm -rf "$$tmpdir"; rm -f /tmp/elfuse-sysroot-rename-dst.txt' EXIT; \
4043 mkdir -p " $$ tmpdir/tmp" ; \
4144 printf ' inside-sysroot\n' > " $$ tmpdir/tmp/elfuse-sysroot-rename-src.txt" ; \
@@ -74,7 +77,8 @@ test-case-collision-fallback: $(ELFUSE_BIN) $(BUILD_DIR)/test-case-collision
7477 $(ELFUSE_BIN ) --sysroot " $$ tmpdir" $(BUILD_DIR ) /test-case-collision
7578
7679test-sysroot-create-paths : $(ELFUSE_BIN ) $(BUILD_DIR ) /test-sysroot-create-paths
77- @tmpdir=$$(mktemp -d ) ; \
80+ @set -e; \
81+ tmpdir=$$(mktemp -d ) ; \
7882 guest_tmp=" /tmp/elfuse-sysroot-create-paths/file.txt" ; \
7983 mounted_tmp=" $$ tmpdir/case-sysroot/tmp/elfuse-sysroot-create-paths/file.txt" ; \
8084 host_out_dir=" $$ tmpdir/host-out" ; \
@@ -113,8 +117,7 @@ test-gdbstub: $(ELFUSE_BIN) $(TEST_DIR)/test-hello
113117# # Alias for check (backward compat)
114118test-all : check
115119
116- # ── Coreutils integration test ───────────────────────────────────
117-
120+ # Coreutils integration test
118121FIXTURES_DIR ?= $(CURDIR ) /externals/test-fixtures
119122
120123ifeq ($(origin GUEST_COREUTILS ) , undefined)
@@ -171,8 +174,7 @@ test-coreutils: $(ELFUSE_BIN)
171174 bash tests/test-coreutils.sh $(ELFUSE_BIN ) $(COREUTILS_BIN ) ; \
172175 fi
173176
174- # ── Busybox integration test ─────────────────────────────────────
175-
177+ # Busybox integration test
176178ifneq ($(wildcard $(BUILD_DIR ) /busybox) ,)
177179 BUSYBOX_BIN ?= $(BUILD_DIR ) /busybox
178180else ifdef GUEST_BUSYBOX
@@ -256,8 +258,7 @@ test-proctitle-low-stack: $(ELFUSE_BIN) $(BUSYBOX_DEPS)
256258 fi
257259 @bash tests/test-proctitle-low-stack.sh $(ELFUSE_BIN ) $(BUSYBOX_BIN )
258260
259- # ── Static binary integration tests ──────────────────────────────
260-
261+ # Static binary integration tests
261262ifdef GUEST_STATIC_BINS
262263 ifneq ($(wildcard $(GUEST_STATIC_BINS)/bin),)
263264 STATIC_BINS_DIR ?= $(GUEST_STATIC_BINS ) /bin
@@ -278,8 +279,7 @@ test-static-bins: $(ELFUSE_BIN)
278279 bash tests/test-static-bins.sh $(ELFUSE_BIN ) $(STATIC_BINS_DIR ) ; \
279280 fi
280281
281- # ── Dynamic linking tests ────────────────────────────────────────
282-
282+ # Dynamic linking tests
283283# Musl sysroot with dynamic linker + libc.so.
284284SYSROOT_DIR ?= $(GUEST_SYSROOT )
285285ifdef GUEST_DYNAMIC_COREUTILS
@@ -299,13 +299,24 @@ test-dynamic: $(ELFUSE_BIN)
299299 @printf " $( BLUE) ▸ Running$( RESET) dynamic hello-dynamic (--sysroot)\n"
300300 $(ELFUSE_BIN ) --sysroot $(SYSROOT_DIR ) $(GUEST_DYNAMIC_TESTS ) /bin/hello-dynamic
301301
302- # # Run guest FUSE validation against the Alpine musl sysroot
302+ # # Run guest FUSE validation
303+ # test-fuse-basic is statically linked and accesses exactly one host path:
304+ # /mnt/fuse (open + access). /dev/fuse is intercepted by elfuse internally.
305+ # A minimal sysroot under build/ that contains only /mnt/fuse is therefore
306+ # sufficient coverage; the earlier dependency on the full Alpine fixture
307+ # tree was incidental and broke `make distclean && make check` whenever
308+ # the Alpine CDN pruned a pinned package version.
309+ #
310+ # An explicit SYSROOT_DIR override is still honored for users who want
311+ # the test to run against their own sysroot (e.g. the Alpine fixtures
312+ # fetched separately for the broader matrix runner).
303313test-fuse-alpine : $(ELFUSE_BIN ) $(BUILD_DIR ) /test-fuse-basic
304- @if [ -z " $( SYSROOT_DIR) " ] || [ ! -d " $( SYSROOT_DIR) " ]; then \
305- printf " $( YELLOW) SKIP$( RESET) Alpine sysroot not found. Set SYSROOT_DIR=/path/to/sysroot or run tests/fetch-fixtures.sh.\n" ; \
306- exit 0; \
307- fi
308- @bash tests/test-fuse-alpine.sh $(ELFUSE_BIN ) $(SYSROOT_DIR ) $(BUILD_DIR ) /test-fuse-basic
314+ @sysroot=" $( SYSROOT_DIR) " ; \
315+ if [ -z " $$ sysroot" ] || [ ! -d " $$ sysroot" ]; then \
316+ sysroot=" $( BUILD_DIR) /fuse-scratch-sysroot" ; \
317+ mkdir -p " $$ sysroot/mnt/fuse" ; \
318+ fi ; \
319+ bash tests/test-fuse-alpine.sh $(ELFUSE_BIN ) " $$ sysroot" $(BUILD_DIR ) /test-fuse-basic
309320
310321# # Run dynamically-linked coreutils tests (--sysroot)
311322test-dynamic-coreutils : $(ELFUSE_BIN )
@@ -323,8 +334,7 @@ test-dynamic-coreutils: $(ELFUSE_BIN)
323334 bash tests/test-dynamic-coreutils.sh $(ELFUSE_BIN ) $(SYSROOT_DIR ) $(DYNAMIC_COREUTILS_BIN ) ; \
324335 fi
325336
326- # ── glibc dynamic linking tests ───────────────────────────────────
327-
337+ # glibc dynamic linking tests
328338# glibc sysroot with dynamic linker + libc.so.
329339GLIBC_SYSROOT_DIR ?= $(GUEST_GLIBC_SYSROOT )
330340ifdef GUEST_GLIBC_DYNAMIC_COREUTILS
@@ -358,8 +368,7 @@ test-glibc-coreutils: $(ELFUSE_BIN)
358368 SUITE_SUMMARY=" glibc results" \
359369 bash tests/test-dynamic-coreutils.sh $(ELFUSE_BIN ) $(GLIBC_SYSROOT_DIR ) $(GLIBC_DYNAMIC_COREUTILS_BIN )
360370
361- # ── Performance benchmark ─────────────────────────────────────────
362-
371+ # Performance benchmark
363372ifneq ($(wildcard $(BUILD_DIR ) /busybox) ,)
364373 PERF_BIN ?= $(BUILD_DIR ) /perf-bin
365374 PERF_DEPS := $(addprefix $(PERF_BIN ) /,grep wc cat sort)
@@ -385,8 +394,7 @@ test-perf: $(ELFUSE_BIN) $(PERF_DEPS)
385394# # Alias for test-perf
386395perf : test-perf
387396
388- # ── Test matrix (elfuse + qemu, aarch64) ────────────────────────────────
389-
397+ # Test matrix (elfuse + qemu, aarch64)
390398# # Run full test matrix (all modes: elfuse + qemu, aarch64)
391399test-matrix : $(ELFUSE_BIN ) $(TEST_DEPS )
392400 @bash tests/test-matrix.sh all
@@ -399,8 +407,7 @@ test-matrix-elfuse-aarch64: $(ELFUSE_BIN) $(TEST_DEPS)
399407test-matrix-qemu-aarch64 : $(ELFUSE_BIN ) $(TEST_DEPS )
400408 @bash tests/test-matrix.sh qemu-aarch64
401409
402- # ── Full test suite ──────────────────────────────────────────────────
403-
410+ # Full test suite
404411# # Run the complete test suite (aarch64: unit + busybox + gdbstub + coreutils + static + dynamic)
405412test-full : $(ELFUSE_BIN )
406413 @printf " \n$( CYAN) ╔══════════════════════════════════════════════════════╗$( RESET) \n"
@@ -438,15 +445,19 @@ test-full: $(ELFUSE_BIN)
438445 printf " $( CYAN) ╚══════════════════════════════════════════════════════╝$( RESET) \n" ; \
439446 [ " $$ fail" -eq 0 ]
440447
441- # ── Multi-vCPU validation test ─────────────────────────────────────
448+ # Multi-vCPU validation test
442449# Build rules in top-level Makefile; these are just run targets.
443450
444451# # Run multi-vCPU validation tests (5 tests)
445452test-multi-vcpu : $(BUILD_DIR ) /test-multi-vcpu
446453 $(BUILD_DIR ) /test-multi-vcpu
447454
448- # ── RWX page table entry test ───────────────────────────────────
449-
455+ # RWX page table entry test
450456# # Run RWX page table entry test (does HVF allow W+X?)
451457test-rwx : $(BUILD_DIR ) /test-rwx
452458 $(BUILD_DIR ) /test-rwx
459+
460+ # Proctitle argv-tail regression
461+ # # Run the deterministic argv-tail overshoot guard test
462+ test-proctitle-host : $(BUILD_DIR ) /test-proctitle-host
463+ $(BUILD_DIR ) /test-proctitle-host
0 commit comments