fseek(pFile, 0L, SEEK_END);
smack_file_length = ftell(pFile);
RUNNER_ASSERT_MSG(smack_file_length>0,
- "SMACK file empty, but privileges list was not empty.. Errno: " << errno);
+ "SMACK file empty with persistant mode 1. Errno: " << errno);
if (pFile != NULL)
fclose(pFile);
//// File exists?
pFile = fopen(SMACK_RULES_DIR APP_ID, "rb");
- RUNNER_ASSERT_MSG(pFile==NULL,
- "SMACK file created!.");
+ RUNNER_ASSERT_MSG(pFile != NULL,
+ "SMACK file NOT created!. Errno: " << errno);
+
+ //// Is it empty?
+ fseek(pFile, 0L, SEEK_END);
+ smack_file_length = ftell(pFile);
+ RUNNER_ASSERT_MSG(smack_file_length==0,
+ "SMACK file not empty with persistant mode 0. Errno: " << errno);
+
+ if (pFile != NULL)
+ fclose(pFile);
// Clean up
result = app_revoke_permissions(APP_ID);
fseek(pFile, 0L, SEEK_END);
smack_file_length = ftell(pFile);
RUNNER_ASSERT_MSG(smack_file_length>0,
- "SMACK file empty, but privileges list was not empty.. Errno: " << errno);
+ "SMACK file empty with persistant mode 1. Errno: " << errno);
if (pFile != NULL)
fclose(pFile);
fseek(pFile, 0L, SEEK_END);
smack_file_length = ftell(pFile);
RUNNER_ASSERT_MSG(smack_file_length>0,
- "SMACK file empty, but privileges list was not empty.. Errno: " << errno);
+ "SMACK file empty with persistant mode 1. Errno: " << errno);
if (pFile != NULL)
fclose(pFile);
fseek(pFile, 0L, SEEK_END);
smack_file_length = ftell(pFile);
RUNNER_ASSERT_MSG(smack_file_length>0,
- "SMACK file empty, but privileges list was not empty.. Errno: " << errno);
+ "SMACK file empty with persistant mode 1. Errno: " << errno);
if (pFile != NULL)
fclose(pFile);
// Adding imaginairy friend as second
result = app_add_friend(APP_FRIEND_1, APP_FRIEND_2);
- RUNNER_ASSERT_MSG(result != PC_OPERATION_SUCCESS,
- " Error making friends (first) with imaginairy friend succeeded. Result: "
+ RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+ " Error making friends (first) with imaginairy friend failed. Result: "
<< result);
// Adding imaginairy friend as first
result = app_add_friend(APP_FRIEND_2, APP_FRIEND_1);
- RUNNER_ASSERT_MSG(result != PC_OPERATION_SUCCESS,
- " Error making friends (second) with imaginairy friend succeeded. Result: "
+ RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+ " Error making friends (second) with imaginairy friend failed. Result: "
<< result);
// Clean up
result = app_revoke_permissions(APP_FRIEND_1);