]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/nolibc: execute defconfig before other targets
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 23 Jan 2025 07:37:40 +0000 (08:37 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 3 Feb 2025 20:02:15 +0000 (21:02 +0100)
Some targets use the test kernel configuration.
Executing defconfig in the same make invocation as those targets results
in errors as the configuration may be in an inconsistent state during
reconfiguration.
Avoid this by introducing ordering dependencies between the defconfig
and some other targets.

Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250123-nolibc-config-v2-4-5701c35995d6@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/testing/selftests/nolibc/Makefile

index 4e075fda9e99da11746f1894e4ed5bc5bbeab43a..983985b7529b65b7ce4a00c28f3f915d83974eea 100644 (file)
@@ -219,7 +219,7 @@ all: run
 
 sysroot: sysroot/$(ARCH)/include
 
-sysroot/$(ARCH)/include:
+sysroot/$(ARCH)/include: | defconfig
        $(Q)rm -rf sysroot/$(ARCH) sysroot/sysroot
        $(QUIET_MKDIR)mkdir -p sysroot
        $(Q)$(MAKE) -C $(srctree) outputmakefile
@@ -269,10 +269,10 @@ defconfig:
                $(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) olddefconfig < /dev/null; \
        fi
 
-kernel:
+kernel: | defconfig
        $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) < /dev/null
 
-kernel-standalone: initramfs
+kernel-standalone: initramfs | defconfig
        $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs < /dev/null
 
 # run the tests after building the kernel