Hi Jakub,
On 02/10/2025 03:30, Jakub Kicinski wrote:
We get a significant number of conflicts between net and net-next because of selftests Makefile changes. People tend to append new test cases at the end of the Makefile when there's no clear sort order. Sort all networking selftests Makefiles, use the following format:
VAR_NAME := \ entry1 \ entry2 \ entry3 \ # end of VAR_NAME
Some Makefiles are already pretty close to this.
Signed-off-by: Jakub Kicinski kuba@kernel.org
I think we need to apply this during the merge window, otherwise the conflicts will be crazy.
Thank you for having sorted these files to reduce future conflicts between net and net-next! (Hopefully this will not cause too much troubles when backporting some patches to stable versions, but I guess new tests will rarely be backported.)
(...)
diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile index 4c7e51336ab2..e3a8dbdc71cd 100644 --- a/tools/testing/selftests/net/mptcp/Makefile +++ b/tools/testing/selftests/net/mptcp/Makefile @@ -4,13 +4,31 @@ top_srcdir = ../../../../.. CFLAGS += -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES) -TEST_PROGS := mptcp_connect.sh mptcp_connect_mmap.sh mptcp_connect_sendfile.sh \
mptcp_connect_checksum.sh pm_netlink.sh mptcp_join.sh diag.sh \
simult_flows.sh mptcp_sockopt.sh userspace_pm.sh
+TEST_PROGS := \
- mptcp_connect.sh \
- mptcp_connect_mmap.sh \
- mptcp_connect_sendfile.sh \
- mptcp_connect_checksum.sh \
- pm_netlink.sh \
- mptcp_join.sh \
- diag.sh \
- simult_flows.sh \
- mptcp_sockopt.sh \
- userspace_pm.sh \
+# end of TEST_GEN_FILES
Strange, I think all other blocks are OK in this patch, except this one: the order is the same as before (so not sorted by alphabetical order), and the last line is not "# end of TEST_PROGS" as expected.
I'm sure this detail can be fixed when applying the patch, or with an extra one if that's easier, instead of sending a v2 and delaying this type of patch.
Acked-by: Matthieu Baerts (NGI0) matttbe@kernel.org
-TEST_GEN_FILES = mptcp_connect pm_nl_ctl mptcp_sockopt mptcp_inq mptcp_diag +TEST_GEN_FILES := \
- mptcp_connect \
- mptcp_diag \
- mptcp_inq \
- mptcp_sockopt \
- pm_nl_ctl \
+# end of TEST_GEN_FILES -TEST_FILES := mptcp_lib.sh settings +TEST_FILES := \
- mptcp_lib.sh \
- settings \
+# end of TEST_FILES TEST_INCLUDES := ../lib.sh $(wildcard ../lib/sh/*.sh)
(...)
Cheers, Matt