libsmack-tests: change expected result for revoking unknown subject.
authorRafal Krypa <r.krypa@samsung.com>
Fri, 1 Feb 2013 16:49:21 +0000 (17:49 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Tue, 5 Feb 2013 16:23:37 +0000 (17:23 +0100)
[Issue#]       N/A
[Bug]          Libsmack test expects revoking of unknown subject to fail.
[Cause]        That behaviour was present in kernel, but improper.
[Solution]     Expect revoke to succeed. The kernel has been fixed already.
[Verification] Build, install, run libsmack tests.

Change-Id: Ib0d9e3b3564288f6c4f32398545e1ef8325d5850

tests/libsmack-tests/test_cases.cpp

index 1ad076b..bc8901c 100644 (file)
@@ -397,9 +397,9 @@ RUNNER_TEST(smack02_aplying_rules_into_kernel)
 
     //int smack_revoke_subject(const char *subject);
     result = smack_revoke_subject("snickers");  //this subject do not exist in kernel rules
-    RUNNER_ASSERT_MSG(result == -1, "Error in rmoving not existing subject from kernel");   //  <----- TODO: this one should be changed (== 0) after fixing revoke_subject in kernel
+    RUNNER_ASSERT_MSG(result == 0, "Error in removing not existing subject from kernel");
     result = smack_revoke_subject("spy");       //this subject exist in kernel rules
-    RUNNER_ASSERT_MSG(result == 0, "Error in rmoving existing subject from kernel");
+    RUNNER_ASSERT_MSG(result == 0, "Error in removing existing subject from kernel");
 
     result = smack_have_access("spy", "book", "rwx");                   //testing access after revoke_subject() from kernel
     RUNNER_ASSERT_MSG(result == 0, "Error in acces aplied to kernel");  //now spy should have no access