SCSI: Implement MODE SELECT(6) parameter parsing and unit tests#164
SCSI: Implement MODE SELECT(6) parameter parsing and unit tests#164jarz wants to merge 1 commit intodingusdev:masterfrom
Conversation
- Add shared `scsiparseutils` module to parse SCSI-2 MODE SELECT(6) parameter lists (headers, block descriptors, and variable-length mode pages). - Integrate parser into `ScsiHardDisk` and `ScsiCdrom` to replace TODO stubs. Incoming MODE SELECT commands are now validated and detailed structure is logged for debugging. - Add `test_modeselect.cpp` test suite with 44 unit tests covering parsing edge cases (truncation, overflow, multi-page). - Add `DPPC_BUILD_SCSI_TESTS` CMake option (default OFF) and `testscsi` target. - Add documentation in `ScsiCdrom` regarding the `BlockStorageDevice` refactoring needed to support 512 <-> 2048 byte block size switching.
|
First of all, thank you very much for your contribution! I'd like to let you know that I'm currently refactoring SCSI emulation in DingusPPC. That implies that the whole architecture is about to be changed because the current one suffers from code duplication. One of the follow-up questions is what to do with parsed mode data. For the moment being, our SCSI emulation just discards mode select data. No guest software package has seriously "complained" so far. |
e2755c2 to
20dfe79
Compare
scsiparseutilsmodule to parse SCSI-2 MODE SELECT(6) parameter lists (headers, block descriptors, and variable-length mode pages).ScsiHardDiskandScsiCdromto replace TODO stubs. Incoming MODE SELECT commands are now validated and detailed structure is logged for debugging.test_modeselect.cpptest suite with 44 unit tests covering parsing edge cases (truncation, overflow, multi-page).DPPC_BUILD_SCSI_TESTSCMake option (default OFF) andtestscsitarget.ScsiCdromregarding theBlockStorageDevicerefactoring needed to support 512 <-> 2048 byte block size switching.