Skip to content

Fix assertion when creating a removable media drive with an empty filename#1308

Merged
uweseimet merged 1 commit intodevelopfrom
issue_1307
Nov 5, 2023
Merged

Fix assertion when creating a removable media drive with an empty filename#1308
uweseimet merged 1 commit intodevelopfrom
issue_1307

Conversation

@uweseimet
Copy link
Copy Markdown
Contributor

Must have been a very old bug. Fixed:

>piscsi -id 0 -t SCRM ""
+----+-----+------+-------------------------------------
| ID | LUN | TYPE | IMAGE FILE
+----+-----+------+-------------------------------------
|  0 |   0 | SCRM | NO MEDIUM
+----+-----+------+-------------------------------------

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Nov 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@uweseimet uweseimet marked this pull request as ready for review November 4, 2023 14:45
@uweseimet uweseimet marked this pull request as draft November 4, 2023 14:46
@uweseimet uweseimet marked this pull request as ready for review November 4, 2023 14:47
@uweseimet uweseimet changed the title Fix assertion when creating a removable media drive without filename Fix assertion when creating a removable media drive with an empty filename Nov 4, 2023
Copy link
Copy Markdown
Member

@rdmark rdmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you add a unit test for this scenario already?

@uweseimet
Copy link
Copy Markdown
Contributor Author

uweseimet commented Nov 5, 2023

@rdmark No, amything that has to do with the command line is hard or impossible to unit test, but #1295 might help with that. Instead of running scsidump against piscsi you could programmatically run scsictl against piscsi. Then you can send any scsictl command and any SCSI command to piscsi in-process and verify the results. This would test both piscsi and scsictl at the same time.

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.

Assertion when creating a removable media drive with an empty filename

2 participants