Skip to content

Conversation

@igaw
Copy link
Collaborator

@igaw igaw commented Jul 31, 2025

blktests nvme/003 using the loop transport fails because nvme_ctrl_alloc tries to strdup NULL pointers (address or sysfs_dir).

Introduce a 'safe' strdup version and start this version.

Reported-by: Tomáš Bžatek [email protected]
Reported-by: Yi Zhang [email protected]
Fixes: e642498 ("tree: free ctrl attributes when (re)configure ctrl")

Fixes: #1045 #linux-nvme/nvme-cli#2885

blktests nvme/003 using the loop transport fails because nvme_ctrl_alloc
tries to strdup NULL pointers (address or sysfs_dir).

Introduce a 'safe' strdup version and start this version.

Reported-by: Tomáš Bžatek <[email protected]>
Reported-by: Yi Zhang <[email protected]>
Fixes: e642498 ("tree: free ctrl attributes when (re)configure ctrl")
Signed-off-by: Daniel Wagner <[email protected]>
@igaw
Copy link
Collaborator Author

igaw commented Jul 31, 2025

I am running blktests tr=loop with this version. Looks good so far. @MaisenbacherD do you think it would be simple to get a nightly build with blktests setup? I think you are finished with the heavy lifting for the in tree tests. Now it would be awesome to have blktests also run with the latest nvme-cli.

@igaw igaw merged commit 97886cb into linux-nvme:master Jul 31, 2025
12 checks passed
@igaw igaw deleted the fix-strdup branch July 31, 2025 10:51
@tbzatek
Copy link
Contributor

tbzatek commented Jul 31, 2025

Thanks!

@MaisenbacherD
Copy link
Contributor

I am running blktests tr=loop with this version. Looks good so far. @MaisenbacherD do you think it would be simple to get a nightly build with blktests setup? I think you are finished with the heavy lifting for the in tree tests. Now it would be awesome to have blktests also run with the latest nvme-cli.

Yes, this should be fairly easy to set up now.
I will post a PR for this soon. :)

@MaisenbacherD
Copy link
Contributor

We have blktests running in nvme-cli: linux-nvme/nvme-cli#2915
For now, we are running the blktests with the libnvme version from subprojects/libnvme.wrap of nvme-cli.

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.

segfaults with the loop transport

3 participants