PiSCSI / piscsi

PiSCSI allows a Raspberry Pi to function as emulated SCSI devices (hard disk, CD-ROM, and others) for vintage SCSI-based computers and devices. This is a fork of the RaSCSI project by GIMONS.
https://piscsi.org
BSD 3-Clause "New" or "Revised" License
545 stars 82 forks source link

Multiple fixes for ModeSelect #1405

Closed kkaempf closed 10 months ago

kkaempf commented 11 months ago

This PR covers multiple issues

Fixes #1402

kkaempf commented 11 months ago

@rdmark frankly, I'm at loss with fixing the tests :-( Is there any documentation ?

rdmark commented 11 months ago

@kkaempf The closest we have to documentation is the issue ticket where the tests were initially introduced! https://github.com/PiSCSI/piscsi/issues/794

Running the tests should be as easy as installing the googletest libraries, and then running make test. You can also see the failing CI jobs here in this PR.

The actual test code should be fairly self-explanatory I think, but let me know if you need further pointers ;)

kkaempf commented 10 months ago

The test output is quite unhelpful 😞

[ RUN      ] ScsiCommandUtilTest.ModeSelect6
unknown file: Failure
C++ exception with description "std::exception" thrown in the test body.
[  FAILED  ] ScsiCommandUtilTest.ModeSelect6 (0 ms)
kkaempf commented 10 months ago

Tests fixed (somewhat hackish imho)

rdmark commented 10 months ago

@kkaempf What makes you say the tests are hackish?

kkaempf commented 10 months ago

@kkaempf What makes you say the tests are hackish?

I can't say (yet ?) that I actually know what I'm doing there 🙈

kkaempf commented 10 months ago

This should be complete now I believe.

rdmark commented 10 months ago

Rebasing with the develop branch. This is where all new code goes. We then rebase with main after each stable release.

sonarcloud[bot] commented 10 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud