Skip to content

Commit

Permalink
Add length computation test for ModeSelect6
Browse files Browse the repository at this point in the history
Signed-off-by: Klaus Kämpf <[email protected]>
  • Loading branch information
kkaempf committed Jan 5, 2024
1 parent db7f215 commit ccaa729
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cpp/test/scsi_command_util_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ TEST(ScsiCommandUtilTest, ModeSelect6)
Property(&scsi_exception::get_sense_key, sense_key::illegal_request),
Property(&scsi_exception::get_asc, asc::invalid_field_in_parameter_list))))
<< "Not enough command parameters";

// check length computation
buf[3] = 8;
buf[10] = 2;
buf[12] = 1;
buf[13] = 10;
buf[14] = 0x24;
buf[24] = 0;
EXPECT_NO_THROW(ModeSelect(scsi_command::eCmdModeSelect6, cdb, buf, LENGTH, 512))
<< "Multi-page length computation";
}

TEST(ScsiCommandUtilTest, ModeSelect10)
Expand Down

0 comments on commit ccaa729

Please sign in to comment.