TESTS: Dont try to eject the media if preventallow is not supported

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2015-09-19 16:29:29 -07:00
parent e725788eeb
commit fae0d70260
3 changed files with 10 additions and 1 deletions

View File

@@ -37,6 +37,11 @@ test_preventallow_eject(void)
logging(LOG_VERBOSE, "Set the PREVENT flag");
ret = preventallow(sd, 1);
if (ret == -2) {
logging(LOG_NORMAL, "[SKIPPED] PREVENTALLOW is not implemented");
CU_PASS("PREVENTALLOW is not implemented");
return;
}
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Try to eject the medium");

View File

@@ -44,7 +44,6 @@ test_preventallow_itnexus_loss(void)
}
logging(LOG_VERBOSE, "Set the PREVENT flag");
ret = preventallow(sd, 1);
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Try to eject the medium");

View File

@@ -37,6 +37,11 @@ test_preventallow_simple(void)
logging(LOG_VERBOSE, "Test we can set PREVENT flag");
ret = preventallow(sd, 1);
if (ret == -2) {
logging(LOG_NORMAL, "[SKIPPED] PREVENTALLOW is not implemented");
CU_PASS("PREVENTALLOW is not implemented");
return;
}
CU_ASSERT_EQUAL(ret, 0);
logging(LOG_VERBOSE, "Test we can clear PREVENT flag");