Skip to content

Commit d7d271e

Browse files
committed
selftests/nolibc: execute defconfig before other targets
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Thomas Weißschuh <[email protected]>
1 parent 25d5ef9 commit d7d271e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/nolibc/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ all: run
219219

220220
sysroot: sysroot/$(ARCH)/include
221221

222-
sysroot/$(ARCH)/include:
222+
sysroot/$(ARCH)/include: | defconfig
223223
$(Q)rm -rf sysroot/$(ARCH) sysroot/sysroot
224224
$(QUIET_MKDIR)mkdir -p sysroot
225225
$(Q)$(MAKE) -C $(srctree) outputmakefile
@@ -269,10 +269,10 @@ defconfig:
269269
$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) olddefconfig < /dev/null; \
270270
fi
271271

272-
kernel:
272+
kernel: | defconfig
273273
$(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) < /dev/null
274274

275-
kernel-standalone: initramfs
275+
kernel-standalone: initramfs | defconfig
276276
$(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs < /dev/null
277277

278278
# run the tests after building the kernel

0 commit comments

Comments
 (0)