Skip to content

Commit 279ebaa

Browse files
committed
Merge: selftest: add kselftest for CAN subsystem
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1741 JIRA: https://issues.redhat.com/browse/RHEL-118603 Upstream Status: all mainline in net.git Conflicts: see individual patches Tested: boot-tested only Signed-off-by: Davide Caratti <dcaratti@redhat.com> Approved-by: Antoine Tenart <atenart@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Jan Stancek <jstancek@redhat.com>
2 parents cf60c21 + 78e286b commit 279ebaa

File tree

8 files changed

+476
-1
lines changed

8 files changed

+476
-1
lines changed

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5113,6 +5113,7 @@ F: include/uapi/linux/can/gw.h
51135113
F: include/uapi/linux/can/isotp.h
51145114
F: include/uapi/linux/can/raw.h
51155115
F: net/can/
5116+
F: tools/testing/selftests/net/can/
51165117

51175118
CAN-J1939 NETWORK LAYER
51185119
M: Robin van der Gracht <robin@protonic.nl>
@@ -16291,6 +16292,7 @@ X: net/bluetooth/
1629116292
X: net/mac80211/
1629216293
X: net/rfkill/
1629316294
X: net/wireless/
16295+
X: tools/testing/selftests/net/can/
1629416296

1629516297
NETWORKING [IPSEC]
1629616298
M: Steffen Klassert <steffen.klassert@secunet.com>

redhat/kernel.spec.template

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3256,7 +3256,7 @@ pushd tools/testing/selftests
32563256
export CFLAGS="%{build_cflags}"
32573257
export CXXFLAGS="%{build_cxxflags}"
32583258

3259-
TARGETS="bpf cgroup kmod mm net net/forwarding net/mptcp net/netfilter net/packetdrill tc-testing memfd drivers/net/hw iommu cachestat pid_namespace rlimits timens pidfd capabilities clone3 exec filesystems firmware landlock mount mount_setattr move_mount_set_group nsfs openat2 proc safesetid seccomp tmpfs uevent vDSO"
3259+
TARGETS="bpf cgroup kmod mm net net/can net/forwarding net/mptcp net/netfilter net/packetdrill tc-testing memfd drivers/net/hw iommu cachestat pid_namespace rlimits timens pidfd capabilities clone3 exec filesystems firmware landlock mount mount_setattr move_mount_set_group nsfs openat2 proc safesetid seccomp tmpfs uevent vDSO"
32603260
%{make} %{?_smp_mflags} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_CXXFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" ARCH=$Arch V=1 TARGETS="$TARGETS" SKIP_TARGETS="" $force_targets VMLINUX_H="${RPM_VMLINUX_H}"
32613261

32623262
# Restore the original level of source fortification
@@ -3637,6 +3637,12 @@ find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/drivers/net/
36373637
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/drivers/net/bonding/{} \;
36383638
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/drivers/net/bonding/{} \;
36393639
popd
3640+
# install net/can selftests
3641+
pushd tools/testing/selftests/net/can
3642+
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/net/can/{} \;
3643+
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/net/can/{} \;
3644+
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/net/can/{} \;
3645+
popd
36403646
# install net/forwarding selftests
36413647
pushd tools/testing/selftests/net/forwarding
36423648
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/net/forwarding/{} \;

tools/testing/selftests/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ TARGETS += mqueue
6363
TARGETS += nci
6464
TARGETS += net
6565
TARGETS += net/af_unix
66+
TARGETS += net/can
6667
TARGETS += net/forwarding
6768
TARGETS += net/hsr
6869
TARGETS += net/mptcp
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
test_raw_filter
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
top_srcdir = ../../../../..
4+
5+
CFLAGS += -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES)
6+
7+
TEST_PROGS := test_raw_filter.sh
8+
9+
TEST_GEN_FILES := test_raw_filter
10+
11+
include ../../lib.mk
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_CAN=m
2+
CONFIG_CAN_DEV=m
3+
CONFIG_CAN_VCAN=m

0 commit comments

Comments
 (0)