diff --git a/cpp/test/mocks.h b/cpp/test/mocks.h index 047d73ada3..574bb72429 100644 --- a/cpp/test/mocks.h +++ b/cpp/test/mocks.h @@ -363,6 +363,7 @@ class MockSCSIHD : public SCSIHD //NOSONAR Ignore inheritance hierarchy depth in FRIEND_TEST(ScsiHdTest, DECSpecialFunctionControlPage); FRIEND_TEST(ScsiHdTest, GetSectorSizes); FRIEND_TEST(ScsiHdTest, ModeSelect); + FRIEND_TEST(ScsiHdTest, SetSectorSize); FRIEND_TEST(ScsiHdTest, PageCode1); FRIEND_TEST(ScsiHdTest, MultiplePages); diff --git a/cpp/test/scsihd_test.cpp b/cpp/test/scsihd_test.cpp index 693d960af0..9e84ecde34 100644 --- a/cpp/test/scsihd_test.cpp +++ b/cpp/test/scsihd_test.cpp @@ -192,3 +192,15 @@ TEST(ScsiHdTest, MultiplePages) hd.SetSectorSizeInBytes(2048); // pass the "page 3" sector_size test in scsi_command_util::ModeSelect EXPECT_NO_THROW(hd.ModeSelect(scsi_command::eCmdModeSelect6, cmd, buf, buf.size())) << "Multiple pages are supported"; } + +// Test for the ModeSelect6, page code 1 (issued by Alpha VMS) +TEST(ScsiHdTest, PageCode1) +{ + MockSCSIHD hd(0, false); + vector cmd = { 0x15, 0x10, 0x00, 0x00, 0x19, 0x00 }; + vector buf = { 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00 + , 0x01, 0x0a, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + EXPECT_NO_THROW(hd.ModeSelect(scsi_command::eCmdModeSelect6, cmd, buf, buf.size())) << "Page code 1 is supported"; +}