Thread (20 messages) 20 messages, 3 authors, 2024-10-31

Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft

From: Stanislav Fomichev <hidden>
Date: 2024-10-30 15:37:10
Also in: linux-kselftest, lkml

On 10/30, Mina Almasry wrote:
On Wed, Oct 30, 2024 at 8:13 AM Stanislav Fomichev [off-list ref] wrote:
quoted
On 10/30, Mina Almasry wrote:
quoted
On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev [off-list ref] wrote:
quoted
The goal of the series is to simplify and make it possible to use
ncdevmem in an automated way from the ksft python wrapper.

ncdevmem is slowly mutated into a state where it uses stdout
to print the payload and the python wrapper is added to
make sure the arrived payload matches the expected one.

v6:
- fix compilation issue in 'Unify error handling' patch (Jakub)
Since I saw a compilation failures on a couple of iterations I
cherry-picked this locally and tested compilation. I'm seeing this:
Are you cherry picking the whole series or just this patch? It looks
too broken.
quoted
sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw
TARGETS=ncdevmem 2>&1
make: Entering directory
'/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw'
  CC       ncdevmem
In file included from ncdevmem.c:63:
/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:23:43:
warning: ‘enum ethtool_header_flags’ declared inside parameter list
will not be visible outside of this definition or declaration
   23 | const char *ethtool_header_flags_str(enum ethtool_header_flags value);
      |                                           ^~~~~~~~~~~~~~~~~~~~
/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:25:41:
warning: ‘enum ethtool_module_fw_flash_status’ declared inside
parameter list will not be visible outside of this definition or
declaration
   25 | ethtool_module_fw_flash_status_str(enum
ethtool_module_fw_flash_status value);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:6766:45:
error: field ‘status’ has incomplete type
 6766 |         enum ethtool_module_fw_flash_status status;
      |                                             ^~~~~~
This has been fixed via '#include <linux/ethtool_netlink.h>'
quoted
ncdevmem.c: In function ‘do_server’:
ncdevmem.c:517:37: error: storage size of ‘token’ isn’t known
  517 |                 struct dmabuf_token token;
And this, and the rest, don't make sense at all?

I'll double check on my side.
Oh, whoops, I forgot to headers_install first. This works for me:

➜  cos-kernel git:(tcpdevmem-fixes-1) ✗ sudo make headers_install &&
sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw
TARGETS=ncdevmem 2>&1
  INSTALL ./usr/include
make: Entering directory
'/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw'
make: Nothing to be done for 'all'.
make: Leaving directory
'/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw'
➜  cos-kernel git:(tcpdevmem-fixes-1) ✗ find . -iname ncdevmem
./tools/testing/selftests/drivers/net/hw/ncdevmem

Sorry for the noise :D
Whew, thanks and no worries!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help