linux-stable/Documentation
Benjamin Poirier 2a0683be5b selftests: Introduce Makefile variable to list shared bash scripts
Some tests written in bash source other files in a parent directory. For
example, drivers/net/bonding/dev_addr_lists.sh sources
net/forwarding/lib.sh. If a subset of tests is exported and run outside the
source tree (for example by using `make -C tools/testing/selftests gen_tar
TARGETS="drivers/net/bonding"`), these other files must be made available
as well.

Commit ae108c48b5 ("selftests: net: Fix cross-tree inclusion of scripts")
addressed this problem by symlinking and copying the sourced files but this
only works for direct dependencies. Commit 25ae948b44 ("selftests/net:
add lib.sh") changed net/forwarding/lib.sh to source net/lib.sh. As a
result, that latter file must be included as well when the former is
exported. This was not handled and was reverted in commit 2114e83381
("selftests: forwarding: Avoid failures to source net/lib.sh"). In order to
allow reinstating the inclusion of net/lib.sh from net/forwarding/lib.sh,
add a mechanism to list dependent files in a new Makefile variable and
export them. This allows sourcing those files using the same expression
whether tests are run in-tree or exported.

Dependencies are not resolved recursively so transitive dependencies must
be listed in TEST_INCLUDES. For example, if net/forwarding/lib.sh sources
net/lib.sh; the Makefile related to a test that sources
net/forwarding/lib.sh from a parent directory must list:
TEST_INCLUDES := \
	../../../net/forwarding/lib.sh \
	../../../net/lib.sh

v2:
Fix rst syntax in Documentation/dev-tools/kselftest.rst (Jakub Kicinski)

v1 (from RFC):
* changed TEST_INCLUDES to take relative paths, like other TEST_* variables
  (Vladimir Oltean)
* preserved common "$(MAKE) OUTPUT=... -C ... target" ordering in Makefile
  (Petr Machata)

Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-31 10:55:11 +00:00
..
ABI cxl for v6.8 2024-01-18 16:22:43 -08:00
PCI
RAS
RCU
accel
accounting
admin-guide Various smb client fixes, including multichannel and for SMB3.1.1 POSIX extensions 2024-01-20 16:48:07 -08:00
arch arm64 fixes for -rc1 2024-01-19 13:36:15 -08:00
block Documentation: block: ioprio: Update schedulers 2024-01-18 08:21:14 -07:00
bpf bpf, docs: Clarify definitions of various instructions 2024-01-26 19:05:38 +01:00
cdrom
core-api A handful of late-arriving documentation fixes. 2024-01-17 11:49:11 -08:00
cpu-freq
crypto Another moderately busy cycle for documentation, including: 2024-01-11 19:46:52 -08:00
dev-tools selftests: Introduce Makefile variable to list shared bash scripts 2024-01-31 10:55:11 +00:00
devicetree dt-bindings: net: starfive,jh7110-dwmac: Add JH7100 SoC compatible 2024-01-31 10:51:34 +00:00
doc-guide
driver-api pci-v6.8-changes 2024-01-17 16:23:17 -08:00
fault-injection
fb fbdev/intelfb: Remove driver 2024-01-12 12:38:37 +01:00
features riscv: Add support for BATCHED_UNMAP_TLB_FLUSH 2024-01-11 08:01:53 -08:00
filesystems ovl: mark xwhiteouts directory with overlay.opaque='x' 2024-01-23 12:39:48 +02:00
firmware-guide
firmware_class
fpga
gpu amd-drm-next-6.8-2024-01-05: 2024-01-09 09:07:50 +10:00
hid
hwmon
i2c
iio
images
infiniband
input
isdn
kbuild
kernel-hacking
leds
litmus-tests
livepatch
locking locking/mutex: Clarify that mutex_unlock(), and most other sleeping locks, can still use the lock object after it's unlocked 2024-01-08 09:55:31 +01:00
maintainer
mhi
misc-devices
mm
netlabel
netlink dpll: expose fractional frequency offset value to user 2024-01-05 07:58:19 -08:00
networking Documentation: mlx5.rst: Add note for eswitch MD 2024-01-27 14:29:20 +00:00
nvdimm
nvme
pcmcia
peci
power
process Kbuild updates for v6.8 2024-01-18 17:57:07 -08:00
rust LoongArch changes for v6.8 2024-01-19 13:30:49 -08:00
scheduler
scsi
security
sound
sphinx A handful of late-arriving documentation fixes. 2024-01-17 11:49:11 -08:00
sphinx-static
spi
staging rpmsg updates for v6.8 2024-01-17 15:05:27 -08:00
target
tee
timers
tools
trace tracing updates for 6.8: 2024-01-18 14:35:29 -08:00
translations A handful of late-arriving documentation fixes. 2024-01-17 11:49:11 -08:00
usb usb: gadget: ncm: Add support to update wMaxSegmentSize via configfs 2024-01-04 16:01:14 +01:00
userspace-api fbdev fixes and cleanups for 6.8-rc1: 2024-01-12 14:38:08 -08:00
virt KVM x86 MMU changes for 6.8: 2024-01-08 08:10:32 -05:00
w1
watchdog
wmi
.gitignore
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
atomic_bitops.txt
atomic_t.txt
conf.py
docutils.conf
dontdiff
index.rst
memory-barriers.txt
subsystem-apis.rst