"Zhijian Li (Fujitsu)" via <qemu-devel@nongnu.org> writes: > Hi Philippe, > > Thanks for your testing. > > > On 08/03/2025 14:00, Philippe Mathieu-Daudé wrote: >> Hi, >> >> On 7/3/25 19:15, Fabiano Rosas wrote: >>> From: Li Zhijian <lizhij...@fujitsu.com> >>> >>> This qtest requires there is a RDMA(RoCE) link in the host. >>> In order to make the test work smoothly, introduce a >>> scripts/rdma-migration-helper.sh to >>> - setup a new Soft-RoCE(aka RXE) if it's root >>> - detect existing RoCE link >>> >>> Test will be skipped if there is no available RoCE link. >> >> Is it? Runing as user I'm getting: >> >> RDMA ERROR: RDMA host is not set! > > > It's unexpected behavior. > > It implies that the script terminated successfully with an exit > code of 0(there is a RDMA link), yet failed to display its canonical > IPv4 address. > > Stefan also mentioned the same error... > https://gitlab.com/qemu-project/qemu/-/jobs/9350004599#L5590 > > I couldn't reproduce your error. > > Could you share the output of this script with a normal user, > $ scripts/rdma-migration-helper.sh detect > > if your had a rdma/RXE link, please share the output of its ip > $ ip -4 -o addr show dev <NIC> > > Where the <NIC> is an interface associated with the RoCE(RXE), for example > > $ rdma link > link enp2s0_rxe/1 state ACTIVE physical_state LINK_UP netdev enp2s0 > > then the <NIC> is enp2s0 > > >> >> Apparently called via: >> >> qemu_start_incoming_migration() >> -> rdma_start_incoming_migration() >> -> qemu_rdma_dest_init() >> >>> # Start of rdma tests >>> # Running /x86_64/migration/precopy/rdma/plain >>> Command 'rdma' is not available, please install it first. >>> # To enable the test: >>> # (1) Run 'scripts/rdma-migration-helper.sh setup' with root and rerun >>> the test >>> # or >>> # (2) Run the test with root privilege >> >> Could this might be the issue, should we skip if not root, as calling >> the script in "detect" mode makes the new_rdma_link() method to succeed. > > It's expected the 'detect' should succeed and print a IPv4 address > >> >>> # >>> ok 1 /x86_64/migration/precopy/rdma/plain # SKIP No rdma link available >>> # End of rdma tests >>> >>> Note: Remove the newly added RXE link by executing 'modprobe -r rdma_rxe' >>> or by specifying 'clean' within this script. >> >> qtest_add() provides both setup() / teardown() methods.> > > This may require a minor refactor of the migration-test framework to > enable support for setup() and teardown() methods. > > Let me see... > > > >> Test leaving system in different state seems bogus to me. > > At this point, I'm unable to refute. It indeed dirty the > It indeed might dirty the system. > > > A palatable compromise might be that, regardless of whether one is a > root user or not, this test is only supported on hosts with RDMA link. > > Otherwise, it will provide an SKIP warning. > > # Run 'scripts/rdma-migration-helper.sh setup' with root and rerun the > test > # Optional: run 'scripts/rdma-migration-helper.sh clean' to revert the > 'setup' > > For local users, they can independently use this script to set up and clean > RDMA, > as they are aware of the modifications they have made to the system.
Yes, let's skip it unless the user has very explicitly set things up.