Re: [PATCH blktests v1 2/3] nvme/rc: Avoid triggering host nvme-cli autoconnect

From: Max Gurtovoy
Date: Mon Jul 10 2023 - 12:30:36 EST




On 10/07/2023 18:03, Daniel Wagner wrote:
On Mon, Jul 10, 2023 at 03:31:23PM +0300, Max Gurtovoy wrote:
I think it is more than just commit message.

Okay, starting to understand what's the problem.

A lot of code that we can avoid was added regarding the --context cmdline
argument.

Correct and it's not optional to get the tests passing for the fc transport.

why the fc needs the --context to pass tests ?


Maybe it's worth cleaning it..

It really solves the problem that the autoconnect setup of nvme-cli is
distrubing the tests (*). The only other way I found to stop the autoconnect is
by disabling the udev rule completely. If autoconnect isn't enabled the context
isn't necessary. Though changing system configuration from blktests seems at bit
excessive.

we should not stop any autoconnect during blktests. The autoconnect and all the system admin services should run normally.
The blktests should not interfere with regular system configuration and should not use any sysadmin file/services/devices.

It should create its own subsystems, nqn's, id's, namespaces, etc..


Another option is to detect if autoconect is enabled and report this when
starting the tests. In this case we could remove the context part completely.

the --context might be used in the some sysadmin scripts or so. I don't see a point to do so in the blktests since we create a new association between initiator and target on each test (or on each group of tests).

Obviously, I would prefer to keep it but I am certaintaly not against dropping
it and make blktests a bit simpler if this is the preference. I just need to
remember to disable the autoconnect stuff when using blktests.

(*) Sure we can fix this but at this point. Though I think it's a bit strange
for a test suite to depend/interact with external components in this way.