Skip to content

nvme: Delete lports in _nvmet_target_cleanup - #262

Open
Mr-Bossman wants to merge 1 commit into
linux-blktests:masterfrom
Mr-Bossman:dev/jesse/fixes
Open

nvme: Delete lports in _nvmet_target_cleanup#262
Mr-Bossman wants to merge 1 commit into
linux-blktests:masterfrom
Mr-Bossman:dev/jesse/fixes

Conversation

@Mr-Bossman

Copy link
Copy Markdown
Contributor

Delete the lports in _nvmet_target_cleanup, which is called when when the test ends. Additionally, ignore file not found errors when deleting the lports, in _cleanup_nvmet as they might have already been deleted by _nvmet_target_cleanup.

This will also fix the issue of common/nvme: line 186: echo: write error: No such file or directory being printed after the test has finished which will happen when running tests with NVMET_TRTYPES=fc ./check tests/nvme/*

Delete the lports in `_nvmet_target_cleanup`, which is called when
when the test ends. Additionally, ignore file not found errors when
deleting the lports, in `_cleanup_nvmet` as they might have already been
deleted by `_nvmet_target_cleanup`.

Signed-off-by: Jesse Taube <jtaubepe@redhat.com>
@kawasaki

Copy link
Copy Markdown
Collaborator

It is still not clear for me why the change is required. My understanding is that,

  • most of nvme group test cases call _setup_nvmet()
  • _setup_nvmet() calls "_register_test_cleanup _cleanup_nvmet"
  • then _cleanup_nvmet() is called for most of nvme group test cases regardless whether the test case passed or failed
  • _cleanup_nvmet() deletes lport ( and calls stop_soft_rdma )

Then _nvmet_target_cleanup() should not need to delete lport.

I guess you needed this change to avoid some failures. What kind of failure do you observe?

@Mr-Bossman

Copy link
Copy Markdown
Contributor Author

It is still not clear for me why the change is required. My understanding is that,

  • most of nvme group test cases call _setup_nvmet()
  • _setup_nvmet() calls "_register_test_cleanup _cleanup_nvmet"
  • then _cleanup_nvmet() is called for most of nvme group test cases regardless whether the test case passed or failed
  • _cleanup_nvmet() deletes lport ( and calls stop_soft_rdma )

Then _nvmet_target_cleanup() should not need to delete lport.

I guess you needed this change to avoid some failures. What kind of failure do you observe?

For some reason when _cleanup_nvmet calls _nvme_fcloop_del_lport this error happens common/nvme: line 186: echo: write error: No such file or directory moving _nvme_fcloop_del_lport to _nvmet_target_cleanup fixes this issue.

IMO _nvmet_target_cleanup should cleanup as much as possible and not leave stuff etxra stuff for _cleanup_nvmet to do which is why i also added stop_soft_rdma.

@kawasaki

Copy link
Copy Markdown
Collaborator

Thanks, I'm interested in the failure. May I know how to recreate the failure? I would like to take a closer look in it.

At the blktests master branch tip, the line 186 of common/nvme is not in _nvme_fcloop_del_lport(), but in _nvme_fcloop_del_tport(). When you see the failure, line 186 is in _nvme_fcloop_del_lport(), right?

k
IMO, we should have less duplication between _cleanup_nvmet() and _nvmet_target_cleanup(). Then I would like to fully understand why the duplication is required.

@Mr-Bossman

Copy link
Copy Markdown
Contributor Author

This happens on Centos 10, same with #263. sorry for the lack of updates, I have been a bit busy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants