From 8cc8fb98a794bc8c8fa40fd525cac0166ccc0546 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 9 Oct 2016 15:10:01 -0700 Subject: [PATCH] TESTS: Skip the whole startstopunit test if the medium is not removable Signed-off-by: Ronnie Sahlberg --- test-tool/test_startstopunit_simple.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test-tool/test_startstopunit_simple.c b/test-tool/test_startstopunit_simple.c index 59a452a..369bdf5 100644 --- a/test-tool/test_startstopunit_simple.c +++ b/test-tool/test_startstopunit_simple.c @@ -42,13 +42,10 @@ test_startstopunit_simple(void) EXPECT_STATUS_GOOD); CU_ASSERT_EQUAL(ret, 0); } else { - logging(LOG_VERBOSE, "Media is not removable. STARTSTOPUNIT should fail"); - ret = startstopunit(sd, 1, 0, 0, 0, 1, 0, - EXPECT_STATUS_GENERIC_BAD); - if (!inq->rmb) { - CU_ASSERT_NOT_EQUAL(ret, 0); - return; - } + const char *err = "[SKIPPED] Media is not removable."; + logging(LOG_NORMAL, "%s", err); + CU_PASS(err); + return; }