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:
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user