Label comparison fixed
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 10 May 2013 15:44:56 +0000 (17:44 +0200)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Thu, 23 Jan 2014 13:32:19 +0000 (14:32 +0100)
[Issue#] N/A
[Problem] Test is sometimes failing
[Cause] Wrong comparison method
[Solution] Strcmp has been used.

[Verification] Run security-server-tests-label

Change-Id: Ib9bbe59c2b2e2e61c18726e479a7642ce8ad1238

tests/security-server-tests/security_server_tests_label.cpp

index a1025de..1aeccf0 100644 (file)
@@ -89,7 +89,7 @@ RUNNER_TEST(tc_security_server_get_smacklabel_cookie) {
         RUNNER_ASSERT_MSG(false, "No match in SMACK labels sizes");
     }
 
-    res = memcmp(label_smack, label_ss, sizeof(label_smack));
+    res = strcmp(label_smack, label_ss);
     if (0 != res) {
         if (NULL != label_smack)
             free(label_smack);