Skip to content

Commit 69b03fc

Browse files
authored
[ethtool]: disable unit test when building ethtool on armhf/arm64 (#7226)
Compiling ethtool from source is causing ethtool unit tests to fail on ARM Platforms. These tests are failing: (By default netlink-interface is enabled while compiling ethtool) Link: ([Test File Link](https://salsa.debian.org/kernel-team/ethtool/-/blob/debian/1%255.9-1/test-cmdline.c#L28)) ``` FAIL: test-cmdline ================== E: ethtool 16_char_devname! returns 1 E: ethtool 127_char_devname0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde returns 1 E: ethtool --change devname xcvr external returns 0 E: ethtool --change devname speed 100 duplex half port tp autoneg on advertise 0x1 phyad 1 xcvr external wol p sopass 01:23:45:67:89:ab msglvl 1 returns 0 FAIL test-cmdline (exit status: 1) ``` Tested this on Local ARM Emulated Container: ``` (Docker Container Emulating ARM) vkarri@3a03c70eed35:/tmp/ethtool$ ./ethtool 16_char_devname! netlink interface initialization failed, device name longer than 15 not supported vkarri@3a03c70eed35:/tmp/ethtool$ echo $? 1 (Expected 0) vkarri@3a03c70eed35:~/ethtool$ ./ethtool 16_char_devnameee netlink interface initialization failed, device name longer than 15 not supported Checked for dependencies: (all are present) vkarri@3a03c70eed35:~/ethtool$ apt-cache policy libmnl0 libmnl0: Installed: 1.0.4-2 Candidate: 1.0.4-2 Version table: *** 1.0.4-2 500 500 http://deb.debian.org/debian buster/main armhf Packages 500 http://packages.trafficmanager.net/debian/debian buster/main armhf Packages 100 /var/lib/dpkg/status vkarri@3a03c70eed35:~/ethtool$ apt-cache policy libc6 libc6: Installed: 2.28-10 Candidate: 2.28-10 Version table: *** 2.28-10 500 500 http://deb.debian.org/debian buster/main armhf Packages 500 http://packages.trafficmanager.net/debian/debian buster/main armhf Packages 100 /var/lib/dpkg/status ``` #### How I did it Disabled netlink-interface for ethtool. Even though Netlink is not available, it doesn't seem to impact what ethtool was supposed to do. In fact the older version which was in use before this PR [#5725](#5725) did not have netlink support and everything seemed to work well Article on Netlink-Support for ethtool: https://lwn.net/Articles/783633/ Signed-off-by: Vivek Reddy Karri <[email protected]>
1 parent ee13837 commit 69b03fc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

rules/ethtool.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
ETHTOOL_VERSION_BASE = 5.9
44
export ETHTOOL_VERSION_BASE
55

6-
ETHTOOL = ethtool_$(ETHTOOL_VERSION_BASE)-1_amd64.deb
6+
ETHTOOL = ethtool_$(ETHTOOL_VERSION_BASE)-1_$(CONFIGURED_ARCH).deb
77
$(ETHTOOL)_SRC_PATH = $(SRC_PATH)/ethtool
88
SONIC_MAKE_DEBS += $(ETHTOOL)
99

10-
ETHTOOL_DBG = ethtool-dbgsym_$(ETHTOOL_VERSION_BASE)-1_amd64.deb
10+
ETHTOOL_DBG = ethtool-dbgsym_$(ETHTOOL_VERSION_BASE)-1_$(CONFIGURED_ARCH).deb
1111
$(eval $(call add_extra_package,$(ETHTOOL),$(ETHTOOL_DBG)))
1212

1313
export ETHTOOL ETHTOOL_DBG

src/ethtool/Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
1212
pushd ethtool
1313
git checkout tags/debian/1%$(ETHTOOL_VERSION_BASE)-1
1414
# Build package
15+
ifneq (,(filter $(CONFIGURED_ARCH),arm64 armhf))
16+
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
17+
else
1518
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
19+
endif
20+
1621
popd
1722
mv $(DERIVED_TARGET) $* $(DEST)/
1823

0 commit comments

Comments
 (0)