test_modesense6_control_swp: skip test if target cannot change swp

Signed-off-by: Vadim Finkelstein <vadim@pi-coral.com>
This commit is contained in:
Craig Rodrigues
2015-06-03 18:52:04 +00:00
parent a8e42680ed
commit 1995298914
2 changed files with 13 additions and 1 deletions

View File

@@ -43,6 +43,10 @@ test_modesense6_control_swp(void)
logging(LOG_VERBOSE, "Set SWP to enable write protect");
ret = set_swp(sd);
if (ret == -2) {
CU_PASS("[SKIPPED] Target does not support changing SWP");
return;
}
CU_ASSERT_EQUAL(ret, 0);
if (ret) {
goto finished;