2019-07-29 09:44:25

by Chen, Rong A

[permalink] [raw]
Subject: [can] 60649d4e0a: ltp.can_rcv_own_msgs.fail

FYI, we noticed the following commit (built with gcc-7):

commit: 60649d4e0af6c26b6c423dea9c57f39e823fc0c5 ("can: remove obsolete empty ioctl() handler")
https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git master

in testcase: ltp
with following parameters:

test: can

test-description: The LTP testsuite contains a collection of tools for testing the Linux kernel and related features.
test-url: http://linux-test-project.github.io/


on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>



<<<test_start>>>
tag=can_rcv_own_msgs stime=1564179096
cmdline="can_run_tests.sh can_rcv_own_msgs"
contacts=""
analysis=exit
<<<test_output>>>
SIOCGIFINDEX: Operation not supported
can_rcv_own_msgs 1 TFAIL: Test can_rcv_own_msgs FAIL
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=3
<<<test_end>>>


To reproduce:

# build kernel
cd linux
cp config-5.3.0-rc1-00114-g60649d4 .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 INSTALL_MOD_PATH=<mod-install-dir> modules_install
cd <mod-install-dir>
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz


git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in this email



Thanks,
Rong Chen


Attachments:
(No filename) (1.71 kB)
config-5.3.0-rc1-00114-g60649d4 (202.97 kB)
job-script (4.78 kB)
dmesg.xz (17.71 kB)
ltp (5.80 kB)
Download all attachments

2019-07-29 17:45:28

by Oliver Hartkopp

[permalink] [raw]
Subject: Re: [can] 60649d4e0a: ltp.can_rcv_own_msgs.fail

Hello Marc,

On 29/07/2019 11.41, kernel test robot wrote:
> FYI, we noticed the following commit (built with gcc-7):
>
> commit: 60649d4e0af6c26b6c423dea9c57f39e823fc0c5 ("can: remove obsolete empty ioctl() handler")
> https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git master

the kernel test robot is right.

The patch ("can: remove obsolete empty ioctl() handler") leads to a
return value of -EOPNOTSUPP instead of the former -ENOIOCTLCMD.

As we can see in socket.c ...

https://elixir.bootlin.com/linux/v5.3-rc2/source/net/socket.c#L1041

/*
* If this ioctl is unknown try to hand it down
* to the NIC driver.
*/
if (err != -ENOIOCTLCMD)
return err;

... we need to return -ENOIOCTLCMD to pass the SIOCGIFINDEX ioctl to the
NIC layer.

Therefore the entire commit needs to be *reverted* to restore the
required functionality.

> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <[email protected]>

Many thanks,
Oliver