TESTS: the CONTROL mode page has SPF==0

When scanning for the CONTROL mode page we must also check that SPF==0
since otherwise we might pick up CONTROL EXTENSIONS or other subpages
that may be returned.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2015-04-19 17:27:20 -07:00
parent 60a0289d74
commit 669998e9d7

View File

@@ -67,7 +67,8 @@ test_modesense6_control(void)
CU_ASSERT_TRUE(ms->mode_data_length >= 3);
for (ap_page = ms->pages; ap_page; ap_page = ap_page->next) {
if (ap_page->page_code == SCSI_MODEPAGE_CONTROL) {
if (ap_page->page_code == SCSI_MODEPAGE_CONTROL &&
ap_page->spf == 0) {
break;
}
}