Updating test macros (DPL enhancement - line printing in case of error)
authorPawel Broda <p.broda@partner.samsung.com>
Tue, 7 Jan 2014 13:56:20 +0000 (14:56 +0100)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Thu, 23 Jan 2014 14:21:37 +0000 (15:21 +0100)
[Issue#]        SSDWSSP-710
[Feature]       Provides backtrace in case of test failure.
[Cause]         Old macros (RUNNER_ASSERT & RUNNER_ASSERT_MSG) did not
                provide backtrace in case of test failure.
[Solution]      Replacing old macros with the new ones providing bactrace.
[Verification]  Run tests on the target.

Change-Id: I5c553c8b254c1bf268b7a604c1f6dc833b1f1075

24 files changed:
tests/common/access_provider.cpp
tests/common/dbus_access.cpp
tests/common/gdbbacktrace.cpp
tests/common/smack_access.cpp
tests/common/tests_common.cpp
tests/common/tests_common.h
tests/libprivilege-control-tests/common/db.cpp
tests/libprivilege-control-tests/common/db_sqlite.cpp
tests/libprivilege-control-tests/libprivilege-control_test_common.cpp
tests/libprivilege-control-tests/test_cases.cpp
tests/libprivilege-control-tests/test_cases_incorrect_params.cpp
tests/libprivilege-control-tests/test_cases_nosmack.cpp
tests/libprivilege-control-tests/test_cases_stress.cpp
tests/libsmack-tests/test_cases.cpp
tests/security-server-tests/common/security_server_tests_common.cpp
tests/security-server-tests/cookie_api.cpp
tests/security-server-tests/security_server_measurer_API_speed.cpp
tests/security-server-tests/security_server_tests_client_smack.cpp
tests/security-server-tests/security_server_tests_dbus.cpp
tests/security-server-tests/security_server_tests_open_for.cpp
tests/security-server-tests/security_server_tests_password.cpp
tests/security-server-tests/security_server_tests_stress.cpp
tests/security-server-tests/server.cpp
tests/security-server-tests/weird_arguments.cpp

index 8fd3fe5..2c344a0 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <map>
 
-#include <dpl/test/test_runner.h>
+#include <tests_common.h>
 
 #include <access_provider.h>
 
@@ -65,7 +65,7 @@ void AccessProvider::allowFunction(const std::string &functionName, const Tracke
     };
 
     auto it = translation.find(functionName);
-    RUNNER_ASSERT_MSG(it != translation.end(),
+    RUNNER_ASSERT_MSG_BT(it != translation.end(),
         tracker.str() << "Error no function " << functionName << " in security server.");
 
     m_smackAccess.add(m_mySubject, it->second, "w", tracker);
@@ -80,14 +80,14 @@ void AccessProvider::apply(const Tracker &tracker) {
 }
 
 void AccessProvider::applyAndSwithToUser(int uid, int gid, const Tracker &tracker) {
-    RUNNER_ASSERT_MSG(0 == smack_revoke_subject(m_mySubject.c_str()),
+    RUNNER_ASSERT_MSG_BT(0 == smack_revoke_subject(m_mySubject.c_str()),
         tracker.str() << "Error in smack_revoke_subject(" << m_mySubject << ")");
     apply(tracker);
-    RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(m_mySubject.c_str()),
+    RUNNER_ASSERT_MSG_BT(0 == smack_set_label_for_self(m_mySubject.c_str()),
         tracker.str() << "Error in smack_set_label_for_self.");
-    RUNNER_ASSERT_MSG(0 == setgid(gid),
+    RUNNER_ASSERT_MSG_BT(0 == setgid(gid),
         tracker.str() << "Error in setgid.");
-    RUNNER_ASSERT_MSG(0 == setuid(uid),
+    RUNNER_ASSERT_MSG_BT(0 == setuid(uid),
         tracker.str() << "Error in setuid.");
 }
 
index 5fd2a09..aead761 100644 (file)
@@ -23,8 +23,8 @@
  *              SystemD DBuS interface.
  */
 
-#include <dpl/test/test_runner.h>
 #include <dpl/log/log.h>
+#include <tests_common.h>
 
 #include <cstring>
 
@@ -51,7 +51,7 @@ DBusAccess::DBusAccess()
 
 void DBusAccess::connect() {
     m_conn = dbus_bus_get_private(DBUS_BUS_SYSTEM, &m_err);
-    RUNNER_ASSERT_MSG(dbus_error_is_set(&m_err) != 1, m_tracker.str() <<
+    RUNNER_ASSERT_MSG_BT(dbus_error_is_set(&m_err) != 1, m_tracker.str() <<
         "Error in dbus_bus_get: " << m_err.message);
     dbus_connection_set_exit_on_disconnect(m_conn, FALSE);
 }
@@ -59,7 +59,7 @@ void DBusAccess::connect() {
 void DBusAccess::requestName() {
     dbus_bus_request_name(m_conn, m_dbus_client_name.c_str(),
         DBUS_NAME_FLAG_REPLACE_EXISTING , &m_err);
-    RUNNER_ASSERT_MSG(dbus_error_is_set(&m_err) != 1, m_tracker.str() <<
+    RUNNER_ASSERT_MSG_BT(dbus_error_is_set(&m_err) != 1, m_tracker.str() <<
         "Error in dbus_bus_request_name: " << m_err.message);
 }
 
@@ -73,7 +73,7 @@ void DBusAccess::newMethodCall(const std::string& method) {
                                          dbus_systemd_object.c_str(),
                                          dbus_systemd_interface.c_str(),
                                          method.c_str());
-    RUNNER_ASSERT_MSG(NULL != m_msg, m_tracker.str() <<
+    RUNNER_ASSERT_MSG_BT(NULL != m_msg, m_tracker.str() <<
         "Error in dbus_message_new_method_call");
 }
 
@@ -84,16 +84,16 @@ void DBusAccess::appendToMsg() {
     dbus_message_iter_init_append(m_msg, &iter);
     int ret = dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING,
         &dbus_systemd_srv_unit_mode);
-    RUNNER_ASSERT_MSG(ret != 0, m_tracker.str() <<
+    RUNNER_ASSERT_MSG_BT(ret != 0, m_tracker.str() <<
         "Error in dbus_message_iter_append_basic");
 }
 
 void DBusAccess::sendMsgWithReply() {
     int ret = dbus_connection_send_with_reply(m_conn, m_msg, &m_pending, -1);
-    RUNNER_ASSERT_MSG(ret == 1, m_tracker.str() <<
+    RUNNER_ASSERT_MSG_BT(ret == 1, m_tracker.str() <<
         "Error in dbus_connection_send_with_reply");
 
-    RUNNER_ASSERT_MSG(NULL != m_pending, m_tracker.str() << "Pending call null");
+    RUNNER_ASSERT_MSG_BT(NULL != m_pending, m_tracker.str() << "Pending call null");
 
     dbus_connection_flush(m_conn);
     dbus_pending_call_block(m_pending);
@@ -103,7 +103,7 @@ void DBusAccess::sendMsgWithReply() {
 
 void DBusAccess::getMsgReply() {
     m_msg = dbus_pending_call_steal_reply(m_pending);
-    RUNNER_ASSERT_MSG(NULL != m_msg, m_tracker.str() <<
+    RUNNER_ASSERT_MSG_BT(NULL != m_msg, m_tracker.str() <<
         "Error in dbus_pending_call_steal_reply");
 }
 
@@ -111,13 +111,13 @@ void DBusAccess::handleMsgRestartReply() {
     char *object_path = NULL;
     DBusMessageIter iter;
 
-    RUNNER_ASSERT_MSG(dbus_message_iter_init(m_msg, &iter) != 0,
+    RUNNER_ASSERT_MSG_BT(dbus_message_iter_init(m_msg, &iter) != 0,
         m_tracker.str() << "Message has no arguments");
     if (DBUS_TYPE_OBJECT_PATH == dbus_message_iter_get_arg_type(&iter)) {
         dbus_message_iter_get_basic(&iter, &object_path);
         m_jobID = std::strrchr(object_path, '/') + 1;
     } else {
-        RUNNER_ASSERT_MSG(false, m_tracker.str() << "No job path in msg");
+        RUNNER_ASSERT_MSG_BT(false, m_tracker.str() << "No job path in msg");
     }
     dbus_message_unref(m_msg);
     dbus_pending_call_unref(m_pending);
@@ -132,10 +132,10 @@ DBusHandlerResult DBusAccess::signalFilter(DBusConnection *, DBusMessage *messag
 
     if (dbus_message_is_signal(message, a->m_signal_interface.c_str(), a->m_signal_member.c_str()))
     {
-        RUNNER_ASSERT_MSG(dbus_message_iter_init(message, &iter) != 0, a->m_tracker.str() <<
+        RUNNER_ASSERT_MSG_BT(dbus_message_iter_init(message, &iter) != 0, a->m_tracker.str() <<
             "No messages in reply");
 
-        RUNNER_ASSERT_MSG(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_UINT32,
+        RUNNER_ASSERT_MSG_BT(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_UINT32,
             a->m_tracker.str() << "Argument is not integer");
 
         dbus_message_iter_get_basic(&iter, &id);
@@ -157,7 +157,7 @@ DBusHandlerResult DBusAccess::signalFilter(DBusConnection *, DBusMessage *messag
 
 void DBusAccess::handleMsgRestartSignal() {
     dbus_bus_add_match(m_conn, m_signal_match.c_str(), &m_err);
-    RUNNER_ASSERT_MSG(dbus_error_is_set(&m_err) != 1, m_tracker.str() <<
+    RUNNER_ASSERT_MSG_BT(dbus_error_is_set(&m_err) != 1, m_tracker.str() <<
         "Error in dbus_bus_add_match: " << m_err.message);
 
     dbus_connection_add_filter(m_conn, signalFilter, reinterpret_cast<void *>(this), NULL);
index 8356b46..b31a3e1 100644 (file)
@@ -81,6 +81,7 @@ std::string backtrace_read(int fd)
     char read_buffer[MAX_BACKTRACE_LINE_LENGTH];
     std::ostringstream result;
 
+    result << std::endl;
     size_t line_number = 1;
     while (fgets(read_buffer, sizeof(read_buffer) - 1, bt_fd) != NULL) {
         if (backtrace_parse_line(read_buffer, result, line_number))
@@ -88,6 +89,11 @@ std::string backtrace_read(int fd)
     }
 
     fclose(bt_fd);
+
+    // check if gdbbacktrace() called directly from the test
+    if (line_number == 2)
+        return "";
+
     return result.str();
 }
 } // anonymous backtrace namespace end
index 4316da9..429ba54 100644 (file)
 
 #include <sys/smack.h>
 
-#include <dpl/test/test_runner.h>
+#include <tests_common.h>
 
 #include <smack_access.h>
 
 SmackAccess::SmackAccess()
   : m_handle(NULL)
 {
-    RUNNER_ASSERT_MSG(0 == smack_accesses_new(&m_handle),
+    RUNNER_ASSERT_MSG_BT(0 == smack_accesses_new(&m_handle),
         "Error in smack_accesses_new");
 }
 
@@ -39,7 +39,7 @@ void SmackAccess::add(
     const std::string &rights,
     const Tracker &tracker)
 {
-    RUNNER_ASSERT_MSG(0 == smack_accesses_add(m_handle,
+    RUNNER_ASSERT_MSG_BT(0 == smack_accesses_add(m_handle,
             subject.c_str(),
             object.c_str(),
             rights.c_str()),
@@ -47,7 +47,7 @@ void SmackAccess::add(
 }
 
 void SmackAccess::apply(const Tracker &tracker) {
-    RUNNER_ASSERT_MSG(0 == smack_accesses_apply(m_handle),
+    RUNNER_ASSERT_MSG_BT(0 == smack_accesses_apply(m_handle),
         tracker.str() << "Error in smack_accessses_apply.");
 }
 
index 4665c13..8c70372 100644 (file)
@@ -78,5 +78,5 @@ int drop_root_privileges(void)
 void setLabelForSelf(const int line, const char *label)
 {
     int ret = smack_set_label_for_self(label);
-    RUNNER_ASSERT_MSG(ret == 0, "Error in smack_set_label_for_self(): " << ret << ", line: " << line);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error in smack_set_label_for_self(): " << ret << ", line: " << line);
 }
index 57880c6..8dffaf8 100644 (file)
@@ -130,7 +130,7 @@ int drop_root_privileges(void);
     void Proc##Multi()
 
 #define RUNNER_ASSERT_MSG_BT(test, msg) RUNNER_ASSERT_MSG(test,\
-                                                          msg + std::string("\n") + gdbbacktrace())
+                                                          msg << gdbbacktrace())
 #define RUNNER_ASSERT_BT(test) RUNNER_ASSERT_MSG_BT(test, "")
 
 void closeFdPtr(int *fd);
@@ -146,7 +146,7 @@ namespace DB {
 
         Transaction() {
             db_result = perm_begin();
-            RUNNER_ASSERT_MSG(PC_OPERATION_SUCCESS == db_result,
+            RUNNER_ASSERT_MSG_BT(PC_OPERATION_SUCCESS == db_result,
                               "perm_begin returned: " << db_result);
         }
 
@@ -166,7 +166,7 @@ namespace DB {
         DB::Transaction db_transaction;
 
 #define DB_END }                                                                   \
-        RUNNER_ASSERT_MSG(PC_OPERATION_SUCCESS == DB::Transaction::db_result,      \
+        RUNNER_ASSERT_MSG_BT(PC_OPERATION_SUCCESS == DB::Transaction::db_result,      \
         "perm_end returned: " << DB::Transaction::db_result);
 
 // Common macros and labels used in tests
index 1ca54fb..5e7b01d 100644 (file)
@@ -21,7 +21,7 @@
  * @brief       libprivilege-control tests database record check functions
  */
 
-#include <dpl/test/test_runner.h>
+#include <tests_common.h>
 #include <privilege-control.h>
 #include <sstream>
 #include <string.h>
@@ -88,7 +88,7 @@ void TestLibPrivilegeControlDatabase::test_db_after__perm_app_enable_permissions
             continue;
 
         ret = base_name_from_perm(perm_list[i], permission_name);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
                           "DB: Error testing \"" << __FUNCTION__ <<
                           "\": permission : <" << perm_list[i] <<
                           "> cannot be converted to basename (iri parse error)");
@@ -106,7 +106,7 @@ void TestLibPrivilegeControlDatabase::app_label(const Tracker& tracker, const st
                "WHERE name == '" << app_name << "' ;";
     m_base.execute(tracker, sql.str(), result);
 
-    RUNNER_ASSERT_MSG(result.rows.size() == 1 && result.rows[0].size() == 1,
+    RUNNER_ASSERT_MSG_BT(result.rows.size() == 1 && result.rows[0].size() == 1,
                       "DB: Error testing \"" << tracker.str() << "\": querry : <" << sql.str() <<
                       "> returned [" << result.rows.size() << "] rows");
 }
@@ -120,7 +120,7 @@ void TestLibPrivilegeControlDatabase::app_not_label(const Tracker& tracker,
                "WHERE name == '" << app_name << "' ;";
     m_base.execute(tracker, sql.str(), result);
 
-    RUNNER_ASSERT_MSG(result.rows.size() == 0,
+    RUNNER_ASSERT_MSG_BT(result.rows.size() == 0,
                       "DB: Error testing \"" << tracker.str() << "\": querry : <" << sql.str() <<
                       "> returned [" << result.rows.size() << "] rows");
 }
@@ -145,7 +145,7 @@ void TestLibPrivilegeControlDatabase::app_permission(const Tracker& tracker,
                ";";
     m_base.execute(tracker, sql.str(), result);
 
-    RUNNER_ASSERT_MSG(result.rows.size() == 1,
+    RUNNER_ASSERT_MSG_BT(result.rows.size() == 1,
                       "DB: Error testing \"" << tracker.str() << "\": querry : <" << sql.str() <<
                       "> returned [" << result.rows.size() << "] rows");
 }
index 800488b..23ae2a4 100644 (file)
@@ -21,7 +21,7 @@
  * @brief       libprivilege-control tests API for sqlite3 database access
  */
 
-#include <dpl/test/test_runner.h>
+#include <tests_common.h>
 #include "db_sqlite.h"
 
 Sqlite3DBase::Sqlite3DBase(const std::string& db_path, int flags)
@@ -42,10 +42,10 @@ void Sqlite3DBase::open(const Tracker& tracker)
         return;
 
     int ret = sqlite3_open_v2(m_db_path.c_str(), &m_db_handle, m_flags, VFS_NOT_USED);
-    RUNNER_ASSERT_MSG(m_db_handle,
+    RUNNER_ASSERT_MSG_BT(m_db_handle,
                       "DB: Error testing \"" << tracker.str() <<
                       "\" Sqlite3DBase: Error opening the database: Unable to allocate memory.");
-    RUNNER_ASSERT_MSG(ret == SQLITE_OK,
+    RUNNER_ASSERT_MSG_BT(ret == SQLITE_OK,
                       "DB: Error testing \"" << tracker.str() <<
                       "\" Sqlite3DBase: Error opening the database: " <<
                       sqlite3_errmsg(m_db_handle));
@@ -54,7 +54,7 @@ void Sqlite3DBase::open(const Tracker& tracker)
 void Sqlite3DBase::close(const Tracker& tracker)
 {
     int ret = sqlite3_close(m_db_handle);
-    RUNNER_ASSERT_MSG(ret == SQLITE_OK,
+    RUNNER_ASSERT_MSG_BT(ret == SQLITE_OK,
                       "DB: Error testing \"" << tracker.str() <<
                       "\" Sqlite3DBase: Error closing the database: " <<
                       sqlite3_errmsg(m_db_handle));
@@ -79,7 +79,7 @@ void Sqlite3DBase::execute(const Tracker& tracker, const std::string& sql_querry
     }
     sqlite3_free(tmp);
 
-    RUNNER_ASSERT_MSG(ret == SQLITE_OK || ret == SQLITE_ABORT,
+    RUNNER_ASSERT_MSG_BT(ret == SQLITE_OK || ret == SQLITE_ABORT,
                       "DB: Error testing \"" << tracker.str() <<
                       "\" Sqlite3DBase: Error executing statement <" << sql_querry << "> : " <<
                       errmsg);
index dbe05a6..e1377df 100644 (file)
@@ -26,7 +26,6 @@
 #include <libprivilege-control_test_common.h>
 #include <tests_common.h>
 #include <sys/smack.h>
-#include <dpl/test/test_runner.h>
 
 #define CANARY_LABEL             "tiny_yellow_canary"
 
@@ -115,7 +114,7 @@ bool check_no_accesses(bool smack, const rules_t &rules)
 void read_gids(std::set<unsigned> &set, const char *file_path)
 {
     FILE *f = fopen(file_path, "r");
-    RUNNER_ASSERT_MSG(f != NULL, "Unable to open file " << file_path);
+    RUNNER_ASSERT_MSG_BT(f != NULL, "Unable to open file " << file_path);
     unsigned gid;
     while (fscanf(f, "%u\n", &gid) == 1) {
         set.insert(gid);
@@ -130,10 +129,10 @@ void check_groups(const char *dac_file)
     read_gids(groups_check, dac_file);
 
     int groups_cnt = getgroups(0, NULL);
-    RUNNER_ASSERT_MSG(groups_cnt > 0, "Wrong number of supplementary groupsCnt");
+    RUNNER_ASSERT_MSG_BT(groups_cnt > 0, "Wrong number of supplementary groupsCnt");
     gid_t *groups_list = (gid_t*) calloc(groups_cnt, sizeof(gid_t));
-    RUNNER_ASSERT_MSG(groups_list != NULL, "Memory allocation failed");
-    RUNNER_ASSERT(-1 != getgroups(groups_cnt, groups_list));
+    RUNNER_ASSERT_MSG_BT(groups_list != NULL, "Memory allocation failed");
+    RUNNER_ASSERT_BT(-1 != getgroups(groups_cnt, groups_list));
 
     for (int i = 0; i < groups_cnt; ++i) {
         //getgroups() can return multiple number of the same group
@@ -144,7 +143,7 @@ void check_groups(const char *dac_file)
         if (groups_check.erase(groups_list[i]) == 0) {
             // getgroups() may also return process' main group
             if (groups_list[i] != getgid())
-                RUNNER_ASSERT_MSG(false, "Application belongs to unknown group (GID=" << groups_list[i] << ")");
+                RUNNER_ASSERT_MSG_BT(false, "Application belongs to unknown group (GID=" << groups_list[i] << ")");
         }
     }
     free(groups_list);
@@ -152,7 +151,7 @@ void check_groups(const char *dac_file)
     for (std::set<unsigned>::iterator it = groups_check.begin(); it != groups_check.end(); it++) {
         groups_left.append(std::to_string(*it)).append(" ");
     }
-    RUNNER_ASSERT_MSG(groups_check.empty(), "Application doesn't belong to some required groups: " << groups_left);
+    RUNNER_ASSERT_MSG_BT(groups_check.empty(), "Application doesn't belong to some required groups: " << groups_left);
 }
 
 int file_exists(const char *path)
@@ -167,7 +166,7 @@ int file_exists(const char *path)
 
 void check_app_installed(int line_no, const char *app_path)
 {
-    RUNNER_ASSERT_MSG(file_exists(app_path) == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(file_exists(app_path) == 0, "Line: " << line_no <<
             " App not installed: " << app_path);
 }
 
@@ -191,39 +190,39 @@ int nftw_check_labels_app_dir(const char *fpath, const struct stat *sb,
     /* ACCESS */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_ACCESS);
     labelPtr.reset(label);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
-    RUNNER_ASSERT_MSG(labelPtr.get() != NULL, "ACCESS label on " << fpath << " is not set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(labelPtr.get() != NULL, "ACCESS label on " << fpath << " is not set");
     result = strcmp(APPID_DIR, labelPtr.get());
-    RUNNER_ASSERT_MSG(result == 0, "ACCESS label on " << fpath << " is incorrect");
+    RUNNER_ASSERT_MSG_BT(result == 0, "ACCESS label on " << fpath << " is incorrect");
 
     /* EXEC */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
     labelPtr.reset(label);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
     if (S_ISREG(sb->st_mode) && (sb->st_mode & S_IXUSR)) {
-        RUNNER_ASSERT_MSG(labelPtr.get() != NULL, "EXEC label on " << fpath << " is not set");
+        RUNNER_ASSERT_MSG_BT(labelPtr.get() != NULL, "EXEC label on " << fpath << " is not set");
         result = strcmp(APPID_DIR, labelPtr.get());
-        RUNNER_ASSERT_MSG(result == 0, "EXEC label on executable file " << fpath << " is incorrect");
+        RUNNER_ASSERT_MSG_BT(result == 0, "EXEC label on executable file " << fpath << " is incorrect");
     } else if (S_ISLNK(sb->st_mode)) {
         struct stat buf;
         char *target = realpath(fpath, NULL);
-        RUNNER_ASSERT_MSG(0 == stat(target, &buf),"Stat failed for " << fpath);
+        RUNNER_ASSERT_MSG_BT(0 == stat(target, &buf),"Stat failed for " << fpath);
         free(target);
         if (buf.st_mode != (buf.st_mode | S_IXUSR | S_IFREG)) {
-            RUNNER_ASSERT_MSG(labelPtr.get() == NULL, "EXEC label on " << fpath << " is set");
+            RUNNER_ASSERT_MSG_BT(labelPtr.get() == NULL, "EXEC label on " << fpath << " is set");
         } else {
-            RUNNER_ASSERT_MSG(labelPtr.get() != NULL, "EXEC label on " << fpath << " is not set");
+            RUNNER_ASSERT_MSG_BT(labelPtr.get() != NULL, "EXEC label on " << fpath << " is not set");
             result = strcmp(APPID_DIR, labelPtr.get());
-            RUNNER_ASSERT_MSG(result == 0, "EXEC label on link to executable file " << fpath << " is incorrect");
+            RUNNER_ASSERT_MSG_BT(result == 0, "EXEC label on link to executable file " << fpath << " is incorrect");
         }
     } else
-        RUNNER_ASSERT_MSG(labelPtr.get() == NULL, "EXEC label on " << fpath << " is set");
+        RUNNER_ASSERT_MSG_BT(labelPtr.get() == NULL, "EXEC label on " << fpath << " is set");
 
     /* TRANSMUTE */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_TRANSMUTE);
     labelPtr.reset(label);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
-    RUNNER_ASSERT_MSG(labelPtr.get() == NULL, "TRANSMUTE label on " << fpath << " is set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(labelPtr.get() == NULL, "TRANSMUTE label on " << fpath << " is set");
 
     return 0;
  }
@@ -248,22 +247,22 @@ int nftw_check_labels_non_app_dir(const char *fpath, const struct stat* /*sb*/,
     /* ACCESS */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_ACCESS);
     labelPtr.reset(label);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
     result = strcmp(CANARY_LABEL, labelPtr.get());
-    RUNNER_ASSERT_MSG(result == 0, "ACCESS label on " << fpath << " is overwritten");
+    RUNNER_ASSERT_MSG_BT(result == 0, "ACCESS label on " << fpath << " is overwritten");
 
     /* EXEC */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
     labelPtr.reset(label);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
     result = strcmp(CANARY_LABEL, labelPtr.get());
-    RUNNER_ASSERT_MSG(result == 0, "EXEC label on " << fpath << " is overwritten");
+    RUNNER_ASSERT_MSG_BT(result == 0, "EXEC label on " << fpath << " is overwritten");
 
     /* TRANSMUTE */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_TRANSMUTE);
     labelPtr.reset(label);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
-    RUNNER_ASSERT_MSG(labelPtr.get() == NULL, "TRANSMUTE label on " << fpath << " is set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(labelPtr.get() == NULL, "TRANSMUTE label on " << fpath << " is set");
 
     return 0;
 }
@@ -276,9 +275,9 @@ void check_app_has_permission(const char* app_id, const app_type_t app_type,
 
     for (int i = 0; perm_list[i] != NULL; i++) {
         result = perm_app_has_permission(app_id, app_type, perm_list[i], &has_permission);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "perm_app_has_permission failed with result: " << result);
-        RUNNER_ASSERT_MSG(has_permission == expected_result,
+        RUNNER_ASSERT_MSG_BT(has_permission == expected_result,
                           "Unexpected result, perm_app_has_permission returned: " << has_permission
                           << ", expected: " << expected_result);
     }
@@ -287,15 +286,15 @@ void checkOnlyAvAccess(const char *av_id, const char *app_id, const char *commen
 {
     int result;
     result = smack_have_access(av_id, app_id, "rwx");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         "Error while checking " << av_id << " rwx access to "
         << app_id << " " << comment << " Result: " << result);
     result = smack_have_access(av_id, app_id, "a");
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
         "Error while checking " << av_id << " a access to "
         << app_id << " " << comment << " Result: " << result);
     result = smack_have_access(av_id, app_id, "t");
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
         "Error while checking " << av_id << " t access to "
         << app_id << " " << comment << " Result: " << result);
 }
@@ -309,15 +308,15 @@ void checkOnlyAvAccessNosmack(const char *av_id, const char *app_id, const char
 {
     int result;
     result = smack_have_access(av_id, app_id, "rwx");
-    RUNNER_ASSERT_MSG(result == -1,
+    RUNNER_ASSERT_MSG_BT(result == -1,
             "smack_have_access should return error (SMACK is off). Result: " << result
             << " when testing " << comment);
     result = smack_have_access(av_id, app_id, "a");
-    RUNNER_ASSERT_MSG(result == -1,
+    RUNNER_ASSERT_MSG_BT(result == -1,
             "smack_have_access should return error (SMACK is off). Result: " << result
             << " when testing " << comment);
     result = smack_have_access(av_id, app_id, "t");
-    RUNNER_ASSERT_MSG(result == -1,
+    RUNNER_ASSERT_MSG_BT(result == -1,
             "smack_have_access should return error (SMACK is off). Result: " << result
             << " when testing " << comment);
 }
@@ -330,7 +329,7 @@ void test_revoke_permissions(int line_no, const char* app_id, const rules_t &rul
     DB_BEGIN
 
     result = perm_app_uninstall(app_id);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             "perm_app_uninstall returned " << result);
 
     // Close transaction to commit uninstallation before further actions
@@ -340,7 +339,7 @@ void test_revoke_permissions(int line_no, const char* app_id, const rules_t &rul
 
     // Install test apps
     result = perm_app_install(app_id);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             "perm_app_install returned " << result);
 
     // Close transaction to commit installation before further actions
@@ -351,20 +350,20 @@ void test_revoke_permissions(int line_no, const char* app_id, const rules_t &rul
     // TEST:
     // Revoke permissions
     result = perm_app_revoke_permissions(app_id);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
         "Error revoking app permissions. Result: " << result);
 
     DB_END
 
     // Are all the permissions revoked?
-    RUNNER_ASSERT_MSG(check_no_accesses(smack, rules), "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(check_no_accesses(smack, rules), "Line: " << line_no <<
             "Not all permisions revoked.");
 
     DB_BEGIN
 
     // Cleanup - uninstall test apps
     result = perm_app_uninstall(app_id);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             "perm_app_uninstall returned " << result);
 
     DB_END
@@ -378,20 +377,20 @@ void test_app_enable_permissions_efl(bool smack)
 
     // Prepare
     result = perm_app_uninstall(EFL_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall failed: " << result);
     result = perm_app_install(EFL_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_install failed: " << result);
 
     // Register a permission:
     result = perm_app_setup_permissions(EFL_APP_ID, APP_TYPE_EFL, PRIVS_EFL);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error registering app permissions. Result: " << result);
 
     DB_END
 
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, {{EFL_APP_ID,"test_book_efl", "r"}}),
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, {{EFL_APP_ID,"test_book_efl", "r"}}),
             "SMACK accesses not granted for EFL_APP");
 
     // Check if permission is assigned to app in db
@@ -401,7 +400,7 @@ void test_app_enable_permissions_efl(bool smack)
 
     // Cleanup
     result = perm_app_uninstall(EFL_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall failed: " << result);
 
     DB_END
@@ -418,21 +417,21 @@ void test_app_disable_permissions_efl(bool smack)
 
     // Prepare
     result = perm_app_uninstall(EFL_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall failed: " << result);
 
     result = perm_app_install(EFL_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_install failed: " << result);
 
     // Register a permission
     result = perm_app_setup_permissions(EFL_APP_ID, APP_TYPE_EFL, PRIVS_EFL);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error registering app permissions. Result: " << result);
 
     DB_END
 
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, {{EFL_APP_ID,"test_book_efl", "r"}}),
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, {{EFL_APP_ID,"test_book_efl", "r"}}),
             "SMACK accesses not granted for EFL_APP");
 
     // Check if permission is assigned to app in db
@@ -442,12 +441,12 @@ void test_app_disable_permissions_efl(bool smack)
 
     // Disable a permission
     result = perm_app_disable_permissions(EFL_APP_ID, APP_TYPE_EFL, PRIVS_EFL);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error disabling app permissions. Result: " << result);
 
     DB_END
 
-    RUNNER_ASSERT_MSG(check_no_accesses(smack, {{EFL_APP_ID,"test_book_efl", "r"}}),
+    RUNNER_ASSERT_MSG_BT(check_no_accesses(smack, {{EFL_APP_ID,"test_book_efl", "r"}}),
             "SMACK accesses not disabled for EFL_APP");
 
     // Check if permission is disabled in db
@@ -457,7 +456,7 @@ void test_app_disable_permissions_efl(bool smack)
 
     // Cleanup
     result = perm_app_uninstall(EFL_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall failed: " << result);
 
     DB_END
@@ -471,11 +470,11 @@ void test_app_disable_permissions(bool smack)
 
     // Prepare
     result = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall failed: " << result);
 
     result = perm_app_install(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_install failed: " << result);
 /**
  * Test - disable all granted permissions.
@@ -483,13 +482,13 @@ void test_app_disable_permissions(bool smack)
 
     // Prepare permissions that we want to disable
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             " Error registering app permissions. Result: " << result);
 
     DB_END
 
     // Are all the permissions enabled?
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, rules2), "Not all permisions enabled.");
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, rules2), "Not all permisions enabled.");
 
     // Check if permissions are enabled in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS2, true);
@@ -498,13 +497,13 @@ void test_app_disable_permissions(bool smack)
 
     // Disable permissions
     result = perm_app_disable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error disabling app permissions. Result: " << result);
 
     DB_END
 
     // Are all the permissions disabled?
-    RUNNER_ASSERT_MSG(check_no_accesses(smack, rules2), "Not all permisions disabled.");
+    RUNNER_ASSERT_MSG_BT(check_no_accesses(smack, rules2), "Not all permisions disabled.");
 
     // Check if permission is disabled in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS2, false);
@@ -517,26 +516,26 @@ void test_app_disable_permissions(bool smack)
 
     // Prepare permissions that will not be disabled
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             " Error adding app first permissions. Result: " << result);
 
     // Prepare permissions that we want to disable
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             " Error adding app second permissions. Result: " << result);
 
     // Disable second permissions
     result = perm_app_disable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error disabling app second permissions. Result: " << result);
 
     DB_END
 
     // Are all second permissions disabled?
-    RUNNER_ASSERT_MSG(check_no_accesses(smack, rules2), "Not all first permisions disabled.");
+    RUNNER_ASSERT_MSG_BT(check_no_accesses(smack, rules2), "Not all first permisions disabled.");
 
     // Are all first permissions not disabled?
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, rules_wgt2), "Some of second permissions disabled.");
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, rules_wgt2), "Some of second permissions disabled.");
 
     // Check if second permission is disabled in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS2, false);
@@ -547,13 +546,13 @@ void test_app_disable_permissions(bool smack)
 
     // Disable first permissions
     result = perm_app_disable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error disabling app first permissions. Result: " << result);
 
     DB_END
 
     // Are all second permissions disabled?
-    RUNNER_ASSERT_MSG(check_no_accesses(smack, rules_wgt2), "Not all second permisions disabled.");
+    RUNNER_ASSERT_MSG_BT(check_no_accesses(smack, rules_wgt2), "Not all second permisions disabled.");
 
     // Check if permission is disabled in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS, false);
@@ -566,24 +565,24 @@ void test_app_disable_permissions(bool smack)
 
     // Prepare permissions
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_R);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             " Error registering app r permissions. Result: " << result);
 
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_NO_R);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             " Error registering app no r permissions. Result: " << result);
 
     // Disable same permissions without r
     result = perm_app_disable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_NO_R);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error disabling app no r permissions. Result: " << result);
 
     DB_END
 
     // Is any r permissions disabled?
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, rules2_r), "Some of r permissions disabled.");
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, rules2_r), "Some of r permissions disabled.");
     // Are all no r permissions disabled?
-    RUNNER_ASSERT_MSG(check_no_accesses(smack, rules2_no_r), "Not all no r permissions disabled.");
+    RUNNER_ASSERT_MSG_BT(check_no_accesses(smack, rules2_no_r), "Not all no r permissions disabled.");
 
     // Check if second permission is enabled in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_R, true);
@@ -594,23 +593,23 @@ void test_app_disable_permissions(bool smack)
 
     // Prepare permissions
     result = perm_app_enable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_NO_R, 1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             " Error adding app no r permissions. Result: " << result);
 
     DB_END
 
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, rules2_no_r), "Not all no r permissions enabled.");
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, rules2_no_r), "Not all no r permissions enabled.");
 
     DB_BEGIN
 
     // Disable all permissions
     result = perm_app_disable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_R);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error disabling app permissions. Result: " << result);
 
     DB_END
 
-    RUNNER_ASSERT_MSG(check_no_accesses(smack, rules2_r), "Not all r permissions disabled.");
+    RUNNER_ASSERT_MSG_BT(check_no_accesses(smack, rules2_r), "Not all r permissions disabled.");
 
     // Check if permission is disabled in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_R, false);
@@ -619,7 +618,7 @@ void test_app_disable_permissions(bool smack)
 
     // Clean up after test:
     result = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 }
@@ -639,56 +638,56 @@ void test_appsettings_privilege(bool smack)
 
     //install some app 1
     ret = perm_app_install(APP_1);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Error in perm_app_install." << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Error in perm_app_install." << ret);
 
     mkdir(APP_1_DIR, S_IRWXU | S_IRGRP | S_IXGRP);
 
     //register settings folder for app 1
     ret = perm_app_setup_path(APP_1, APP_1_DIR, APP_PATH_SETTINGS_RW );
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Error in perm_app_setup_path: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Error in perm_app_setup_path: " << ret);
 
     //install "app_test" and give it appsettings privilege
     ret = perm_app_install(APP_TEST);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Error in perm_app_install.");
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Error in perm_app_install.");
 
 
     ret = perm_app_setup_permissions(APP_TEST, APP_TYPE_OSP, PRIV_APPSETTING);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
         " Error registering app permissions. Result: " << ret);
 
     DB_END
 
     //check if "app_test" has an RX access to the app "app_1"
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, {{APP_TEST, APP_1, "rx"}}), "access denied");
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, {{APP_TEST, APP_1, "rx"}}), "access denied");
 
     //check if "app_test" has an RWX access to a folder registered by "app_1"
     ret = smack_getlabel(APP_1_DIR, &label, SMACK_LABEL_ACCESS );
     app1DirLabelPtr.reset(label);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,"smack_getlabel failed");
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, {{APP_TEST, app1DirLabelPtr.get(), "rwx"}}), "access denied to smack label: " << app1DirLabelPtr.get());
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,"smack_getlabel failed");
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, {{APP_TEST, app1DirLabelPtr.get(), "rwx"}}), "access denied to smack label: " << app1DirLabelPtr.get());
 
 
     DB_BEGIN
 
     //intstall another app: "app_2"
     ret = perm_app_install(APP_2);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Error in perm_app_install.");
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Error in perm_app_install.");
 
     mkdir(APP_2_DIR, S_IRWXU | S_IRGRP | S_IXGRP);
     //register settings folder for that "app_2"
     ret = perm_app_setup_path(APP_2, APP_2_DIR, APP_PATH_SETTINGS_RW );
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Error in perm_app_setup_path: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Error in perm_app_setup_path: " << ret);
 
     DB_END
 
     //check if "app_test" has an RX access to the app "app_2"
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, {{APP_TEST, APP_2, "rx"}}), "access denied");
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, {{APP_TEST, APP_2, "rx"}}), "access denied");
 
     //check if "app_test" has an RWX access to a folder registered by "app_2"
     ret = smack_getlabel(APP_2_DIR, &label, SMACK_LABEL_ACCESS );
     app2DirLabelPtr.reset(label);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,"smack_getlabel failed");
-    RUNNER_ASSERT_MSG(check_all_accesses(smack, {{APP_TEST, app2DirLabelPtr.get(), "rwx"}}), "access denies");
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,"smack_getlabel failed");
+    RUNNER_ASSERT_MSG_BT(check_all_accesses(smack, {{APP_TEST, app2DirLabelPtr.get(), "rwx"}}), "access denies");
 
     rmdir(APP_1_DIR);
     rmdir(APP_2_DIR);
index 43bf2c8..c62c3f4 100644 (file)
@@ -94,29 +94,29 @@ int nftw_check_labels_app_shared_dir(const char *fpath, const struct stat *sb,
 
     /* ACCESS */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
-    RUNNER_ASSERT_MSG(label != NULL, "ACCESS label on " << fpath << " is not set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(label != NULL, "ACCESS label on " << fpath << " is not set");
     result = strcmp(APPID_SHARED_DIR, label);
-    RUNNER_ASSERT_MSG(result == 0, "ACCESS label on " << fpath << " is incorrect");
+    RUNNER_ASSERT_MSG_BT(result == 0, "ACCESS label on " << fpath << " is incorrect");
 
     result = smack_have_access(APP_ID, APPID_SHARED_DIR, "rwxatl");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         "Error rwxatl access was not given shared dir. Subject: " <<
         APP_ID << ". Object: " << APPID_SHARED_DIR << ". Result: " << result);
     /* EXEC */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
-    RUNNER_ASSERT_MSG(label == NULL, "EXEC label on " << fpath << " is set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(label == NULL, "EXEC label on " << fpath << " is set");
 
     /* TRANSMUTE */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_TRANSMUTE);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
     if (S_ISDIR(sb->st_mode)) {
-        RUNNER_ASSERT_MSG(label != NULL, "TRANSMUTE label on " << fpath << " is not set");
+        RUNNER_ASSERT_MSG_BT(label != NULL, "TRANSMUTE label on " << fpath << " is not set");
         result = strcmp("TRUE", label);
-        RUNNER_ASSERT_MSG(result == 0, "TRANSMUTE label on " << fpath << " is not set");
+        RUNNER_ASSERT_MSG_BT(result == 0, "TRANSMUTE label on " << fpath << " is not set");
     } else
-        RUNNER_ASSERT_MSG(label == NULL, "TRANSMUTE label on " << fpath << " is set");
+        RUNNER_ASSERT_MSG_BT(label == NULL, "TRANSMUTE label on " << fpath << " is set");
 
     return 0;
 }
@@ -134,19 +134,19 @@ int check_labels_dir(const char *fpath, const struct stat *sb,
 
     /* ACCESS */
     result = smack_lgetlabel(fpath, &label_gen, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
-    RUNNER_ASSERT_MSG(label_gen != NULL, "ACCESS label on " << fpath << " is not set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG_BT(label_gen != NULL, "ACCESS label on " << fpath << " is not set");
 
     /* EXEC */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
     if (result != 0) {
         free(label_gen);
-        RUNNER_ASSERT_MSG(false, "Could not get label for the path");
+        RUNNER_ASSERT_MSG_BT(false, "Could not get label for the path");
     }
     if (label != NULL) {
         free(label_gen);
         free(label);
-        RUNNER_ASSERT_MSG(false, "EXEC label on " << fpath << " is set.");
+        RUNNER_ASSERT_MSG_BT(false, "EXEC label on " << fpath << " is set.");
     }
 
     /* TRANSMUTE */
@@ -154,38 +154,38 @@ int check_labels_dir(const char *fpath, const struct stat *sb,
     if (result != 0) {
         free(label_gen);
         free(label);
-        RUNNER_ASSERT_MSG(false, "Could not get label for the path");
+        RUNNER_ASSERT_MSG_BT(false, "Could not get label for the path");
     }
     if (S_ISDIR(sb->st_mode)) {
         if (label == NULL) {
             free(label_gen);
             free(label);
-            RUNNER_ASSERT_MSG(false, "TRANSMUTE label on " << fpath << " is not set");
+            RUNNER_ASSERT_MSG_BT(false, "TRANSMUTE label on " << fpath << " is not set");
         }
         result = strcmp("TRUE", label);
         if (result != 0) {
             free(label_gen);
             free(label);
-            RUNNER_ASSERT_MSG(false, "TRANSMUTE label on " << fpath << " is not set to TRUE");
+            RUNNER_ASSERT_MSG_BT(false, "TRANSMUTE label on " << fpath << " is not set to TRUE");
         }
     } else if (label != NULL) {
         free(label_gen);
         free(label);
-        RUNNER_ASSERT_MSG(false, "TRANSMUTE label on " << fpath << " is set");
+        RUNNER_ASSERT_MSG_BT(false, "TRANSMUTE label on " << fpath << " is set");
     }
 
     free(label);
 
     if (0 > asprintf(&scanf_label_format, "%%%ds\\n", SMACK_LABEL_LEN)) {
         free(label_gen);
-        RUNNER_ASSERT_MSG(false, "asprintf failed");
+        RUNNER_ASSERT_MSG_BT(false, "asprintf failed");
     }
 
     file_db = fopen(labels_db_path, "r");
     if (file_db == NULL) {
         free(label_gen);
         free(scanf_label_format);
-        RUNNER_ASSERT_MSG(false, "Can not open database for apps");
+        RUNNER_ASSERT_MSG_BT(false, "Can not open database for apps");
     }
     while (fscanf(file_db, scanf_label_format, label_temp) == 1) {
         result = smack_have_access(label_temp, label_gen, access);
@@ -193,7 +193,7 @@ int check_labels_dir(const char *fpath, const struct stat *sb,
             fclose(file_db);
             free(label_gen);
             free(scanf_label_format);
-            RUNNER_ASSERT_MSG(false,
+            RUNNER_ASSERT_MSG_BT(false,
                 "Error " << access << " access was not given for subject: "
                 << label_temp << ". Result: " << result);
         }
@@ -204,7 +204,7 @@ int check_labels_dir(const char *fpath, const struct stat *sb,
     if (file_db == NULL) {
         free(label_gen);
         free(scanf_label_format);
-        RUNNER_ASSERT_MSG(false, "Can not open database for dirs");
+        RUNNER_ASSERT_MSG_BT(false, "Can not open database for dirs");
     }
 
     free(scanf_label_format);
@@ -217,17 +217,17 @@ int check_labels_dir(const char *fpath, const struct stat *sb,
 void osp_blahblah_check(int line_no, const std::vector<std::string> &rules)
 {
     std::ifstream smack_file(OSP_BLAHBLAH);
-    RUNNER_ASSERT_MSG(smack_file, "Line: " << line_no << " Failed to create " << OSP_BLAHBLAH);
+    RUNNER_ASSERT_MSG_BT(smack_file, "Line: " << line_no << " Failed to create " << OSP_BLAHBLAH);
 
     auto it = rules.begin();
     std::string line;
     while (std::getline(smack_file,line)) {
-        RUNNER_ASSERT_MSG(it != rules.end(), "Line: " << line_no << "Additional line in file: " << line);
-        RUNNER_ASSERT_MSG(*it == line, "Line: " << line_no << " " << *it << "!=" << line);
+        RUNNER_ASSERT_MSG_BT(it != rules.end(), "Line: " << line_no << "Additional line in file: " << line);
+        RUNNER_ASSERT_MSG_BT(*it == line, "Line: " << line_no << " " << *it << "!=" << line);
         it++;
     }
 
-    RUNNER_ASSERT_MSG(it == rules.end(), "Line: " << line_no << " Missing line in file: " << *it);
+    RUNNER_ASSERT_MSG_BT(it == rules.end(), "Line: " << line_no << " Missing line in file: " << *it);
 
     smack_file.close();
 }
@@ -235,7 +235,7 @@ void osp_blahblah_check(int line_no, const std::vector<std::string> &rules)
 void osp_blahblah_dac_check(int line_no, const std::vector<unsigned> &gids, std::string dac_file_path)
 {
     std::ifstream dac_file(dac_file_path);
-    RUNNER_ASSERT_MSG(dac_file, "Line: " << line_no << " Failed to create " << dac_file_path);
+    RUNNER_ASSERT_MSG_BT(dac_file, "Line: " << line_no << " Failed to create " << dac_file_path);
 
     auto it = gids.begin();
     std::string line;
@@ -243,12 +243,12 @@ void osp_blahblah_dac_check(int line_no, const std::vector<unsigned> &gids, std:
         std::istringstream is(line);
         unsigned gid;
         is >> gid;
-        RUNNER_ASSERT_MSG(it != gids.end(), "Line: " << line_no << "Additional line in file: " << gid);
-        RUNNER_ASSERT_MSG(*it == gid, "Line: " << line_no << " " << *it << "!=" << gid);
+        RUNNER_ASSERT_MSG_BT(it != gids.end(), "Line: " << line_no << "Additional line in file: " << gid);
+        RUNNER_ASSERT_MSG_BT(*it == gid, "Line: " << line_no << " " << *it << "!=" << gid);
         it++;
     }
 
-    RUNNER_ASSERT_MSG(it == gids.end(), "Line: " << line_no << " Missing line in file: " << *it);
+    RUNNER_ASSERT_MSG_BT(it == gids.end(), "Line: " << line_no << " Missing line in file: " << *it);
 
     dac_file.close();
 }
@@ -281,23 +281,23 @@ RUNNER_TEST(privilege_control02_app_label_dir)
     int result;
 
     result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_APP_DIR);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to clean up Smack labels in " << TEST_APP_DIR);
 
     result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_NON_APP_DIR);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to clean up Smack labels in " << TEST_NON_APP_DIR);
 
     DB_BEGIN
 
     result = perm_app_setup_path(APPID_DIR, TEST_APP_DIR, APP_PATH_PRIVATE);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_setup_path() failed");
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_setup_path() failed");
 
     DB_END
 
     result = nftw(TEST_APP_DIR, &nftw_check_labels_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for app dir");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to check Smack labels for app dir");
 
     result = nftw(TEST_NON_APP_DIR, &nftw_check_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for non-app dir");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to check Smack labels for non-app dir");
 }
 
 RUNNER_TEST_SMACK(privilege_control03_app_label_shared_dir)
@@ -307,36 +307,36 @@ RUNNER_TEST_SMACK(privilege_control03_app_label_shared_dir)
     DB_BEGIN
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_setup_path(APP_ID, TEST_APP_DIR, APP_PATH_GROUP_RW, APP_ID);
-    RUNNER_ASSERT_MSG(result != 0, "perm_app_setup_path(APP_ID, APP_ID) didn't fail");
+    RUNNER_ASSERT_MSG_BT(result != 0, "perm_app_setup_path(APP_ID, APP_ID) didn't fail");
 
     DB_END
 
     result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_APP_DIR);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to clean up Smack labels in " << TEST_APP_DIR);
 
     result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_NON_APP_DIR);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to clean up Smack labels in " << TEST_NON_APP_DIR);
 
     DB_BEGIN
 
     result = perm_app_setup_path(APP_ID, TEST_APP_DIR, APP_PATH_GROUP_RW, APPID_SHARED_DIR);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_setup_path() failed");
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_setup_path() failed");
 
     DB_END
 
     result = nftw(TEST_APP_DIR, &nftw_check_labels_app_shared_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for shared app dir");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to check Smack labels for shared app dir");
 
     result = nftw(TEST_NON_APP_DIR, &nftw_check_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for non-app dir");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to check Smack labels for non-app dir");
 
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 }
@@ -350,14 +350,14 @@ RUNNER_TEST_SMACK(privilege_control04_add_permissions)
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
 
     result = perm_app_setup_permissions(APP_ID, APP_TYPE_EFL, PRIVS_EFL);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " perm_app_setup_permissions failed with result: " << result);
 
     DB_END
@@ -367,12 +367,12 @@ RUNNER_TEST_SMACK(privilege_control04_add_permissions)
 
     // Check if the accesses are realy applied..
     result = test_have_all_accesses(rules_efl);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions not added.");
 
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 }
@@ -438,36 +438,36 @@ void set_app_privilege(int line_no,
     DB_BEGIN
 
     result = perm_app_uninstall(app_id);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             " perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_install(app_id);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             " perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     // TEST:
     result = perm_app_setup_permissions(app_id, APP_TYPE, privileges);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
         " Error registering app permissions. Result: " << result);
 
     DB_END
 
     result = test_have_all_accesses(rules);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions not added.");
 
     result = perm_app_set_privilege(app_id, type, app_path);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
             " Error in perm_app_set_privilege. Error: " << result);
 
     // Check if SMACK label really set
     char *label;
     result = smack_new_label_from_self(&label);
-    RUNNER_ASSERT_MSG(result >= 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result >= 0, "Line: " << line_no <<
             " Error getting current process label");
-    RUNNER_ASSERT_MSG(label != NULL, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(label != NULL, "Line: " << line_no <<
             " Process label is not set");
     result = strcmp(app_id, label);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             " Process label " << label << " is incorrect");
 
     check_groups(dac_file);
@@ -543,53 +543,53 @@ RUNNER_TEST(privilege_control11_add_api_feature)
 
     // argument validation
     result = perm_add_api_feature(APP_TYPE_OSP, NULL, NULL, NULL, 0);
-    RUNNER_ASSERT(result == PC_ERR_INVALID_PARAM);
+    RUNNER_ASSERT_BT(result == PC_ERR_INVALID_PARAM);
 
     result = perm_add_api_feature(APP_TYPE_OSP,"", NULL, NULL, 0);
-    RUNNER_ASSERT(result == PC_ERR_INVALID_PARAM);
+    RUNNER_ASSERT_BT(result == PC_ERR_INVALID_PARAM);
 
 
     // Already existing feature:
     // TODO: Database will be malformed. (Rules for these features will be removed.)
     result = perm_add_api_feature(APP_TYPE_OSP,"http://tizen.org/privilege/messaging.read", NULL, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_WGT,"http://tizen.org/privilege/messaging.sms", NULL, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     // empty features
     result = perm_add_api_feature(APP_TYPE_OSP,"blahblah", NULL, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_WGT,"blahblah", NULL, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
 
     // empty rules
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[0].c_str(), { NULL }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[1].c_str(), (const char*[]) { "", NULL }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[2].c_str(), (const char*[]) { " \t\n", "\t \n", "\n\t  ", NULL }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     // malformed rules
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[3].c_str(), (const char*[]) { "malformed", NULL }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[4].c_str(), (const char*[]) { "malformed malformed", NULL }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[5].c_str(), (const char*[]) { "-malformed malformed rwxat", NULL }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[6].c_str(), (const char*[]) { "~/\"\\ malformed rwxat", NULL }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[7].c_str(), (const char*[]) { "subject object rwxat something else", NULL }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
 
 
     // correct rules
@@ -600,19 +600,19 @@ RUNNER_TEST(privilege_control11_add_api_feature)
             "",
             NULL
         }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[9].c_str(), (const char*[]) {
             "Sub::jE,ct ~APP~ a-rwxl",
             NULL
         }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[10].c_str(), (const char*[]) {
             "Sub::sjE,ct ~APP~ a-RwXL", // TODO This fails.
             NULL
         }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
 
     // TODO For now identical/complementary rules are not merged.
@@ -623,29 +623,29 @@ RUNNER_TEST(privilege_control11_add_api_feature)
             "",
             NULL
         }, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
 
     // empty group ids
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[12].c_str(), (const char*[]) {"~APP~ b a",NULL},(const gid_t[]) {0,1,2},0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
     result = file_exists(OSP_BLAHBLAH_DAC[12].c_str());
-    RUNNER_ASSERT(result == -1);
+    RUNNER_ASSERT_BT(result == -1);
     remove_smack_files();
 
 
     // valid group ids
     result = perm_add_api_feature(APP_TYPE_OSP,BLAHBLAH_FEATURE[13].c_str(), (const char*[]) {"~APP~ b a",NULL},(const gid_t[]) {0,1,2},3);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
     osp_blahblah_dac_check(__LINE__, {0,1,2}, OSP_BLAHBLAH_DAC[13]);
     remove_smack_files();
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[14].c_str(), (const char*[]) {"~APP~ b a",NULL},(const gid_t[]) {0,1,2},1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
     osp_blahblah_dac_check(__LINE__, {0}, OSP_BLAHBLAH_DAC[14]);
     remove_smack_files();
 
     result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[15].c_str(), (const char*[]) {"~APP~ b a",NULL},(const gid_t[]) {1,1,1},3);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
     osp_blahblah_dac_check(__LINE__, {1,1,1},OSP_BLAHBLAH_DAC[15]);
     remove_smack_files();
 
@@ -664,11 +664,11 @@ RUNNER_TEST(privilege_control01_app_install)
     perm_app_uninstall(APP_ID);
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     // try install second time app with the same ID - it should pass.
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 }
@@ -683,7 +683,7 @@ RUNNER_TEST(privilege_control07_app_uninstall)
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 
@@ -709,14 +709,14 @@ RUNNER_TEST_SMACK(privilege_control10_app_register_av)
 
     // Adding two apps before antivir
     result = perm_app_install(APP_TEST_APP_1);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_install(APP_TEST_APP_2);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     // Adding antivir
     result = app_register_av(APP_TEST_AV_1);
-    RUNNER_ASSERT_MSG(result == 0, "app_register_av returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "app_register_av returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 
@@ -728,7 +728,7 @@ RUNNER_TEST_SMACK(privilege_control10_app_register_av)
 
     // Adding third app
     result = perm_app_install(APP_TEST_APP_3);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 
@@ -739,7 +739,7 @@ RUNNER_TEST_SMACK(privilege_control10_app_register_av)
 
     // Adding second antivir
     result = app_register_av(APP_TEST_AV_2);
-    RUNNER_ASSERT_MSG(result == 0, "app_register_av returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "app_register_av returned " << result << ". Errno: " << strerror(errno));
 
     // Checking app accesses
     checkOnlyAvAccess(APP_TEST_AV_1, APP_TEST_APP_1, "app_register_av(APP_TEST_AV_2)");
@@ -766,26 +766,26 @@ RUNNER_TEST_SMACK(privilege_control11_app_enable_permissions)
     DB_BEGIN
 
     result = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
     result = perm_app_install(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
 /**
  * Test - Enabling all permissions with persistant mode enabled
  */
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error registering app permissions. Result: " << result);
 
     DB_END
 
     // Check if the accesses are realy applied..
     result = test_have_all_accesses(rules2);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions not added.");
 
     // Check if permission is assigned to app in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS2, true);
@@ -794,7 +794,7 @@ RUNNER_TEST_SMACK(privilege_control11_app_enable_permissions)
 
     // Clean up
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
     DB_END
@@ -808,18 +808,18 @@ RUNNER_TEST_SMACK(privilege_control11_app_enable_permissions)
 
     DB_BEGIN
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error registering app permissions. Result: " << result);
 
     result = perm_app_enable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error enabling app permissions. Result: " << result);
 
     DB_END
 
     // Check if the accesses are realy applied..
     result = test_have_all_accesses(rules2);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions not added.");
 
     // Check if permission is assigned to app in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS2, true);
@@ -828,7 +828,7 @@ RUNNER_TEST_SMACK(privilege_control11_app_enable_permissions)
 
     // Clean up
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
     DB_END
@@ -843,14 +843,14 @@ RUNNER_TEST_SMACK(privilege_control11_app_enable_permissions)
     DB_BEGIN
 
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_R_AND_NO_R);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error registering app permissions. Result: " << result);
 
     DB_END
 
     // Check if the accesses are realy applied..
     result = test_have_all_accesses(rules2_no_r);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions not added.");
 
     // Check if permissions are assigned to app in db
     check_app_has_permission(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_R_AND_NO_R, true);
@@ -859,7 +859,7 @@ RUNNER_TEST_SMACK(privilege_control11_app_enable_permissions)
 
     // Clean up
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
     DB_END
@@ -875,33 +875,33 @@ RUNNER_TEST_SMACK(privilege_control11_app_enable_permissions)
 
     // Register permission for rules 2 no r
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_NO_R);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error registering app permissions without r. Result: " << result);
 
     DB_END
 
     // Check if the accesses are realy applied..
     result = test_have_all_accesses(rules2_no_r);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions without r not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions without r not added.");
 
     DB_BEGIN
 
     // Register permission for rules 2
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error registering app all permissions. Result: " << result);
 
     DB_END
 
     // Check if the accesses are realy applied..
     result = test_have_all_accesses(rules2);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions all not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions all not added.");
 
     DB_BEGIN
 
     // Clean up
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
 /**
@@ -910,40 +910,40 @@ RUNNER_TEST_SMACK(privilege_control11_app_enable_permissions)
 
     // Enable permission for rules 2 no r
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_NO_R);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error registering app permissions without r. Result: " << result);
 
     DB_END
 
     // Check if the accesses are realy applied..
     result = test_have_all_accesses(rules2_no_r);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions without r not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions without r not added.");
 
     DB_BEGIN
 
     // Enable permission for rules 2
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2_R);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error registering app permissions with only r. Result: " << result);
 
     DB_END
 
     // Check if the accesses are realy applied..
     result = test_have_all_accesses(rules2_r);
-    RUNNER_ASSERT_MSG(result == 1, "Permissions with only r not added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Permissions with only r not added.");
 
     DB_BEGIN
 
     // Clean up
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
 
 
     // Clean up after test:
     result = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 }
@@ -986,33 +986,33 @@ RUNNER_TEST_SMACK(privilege_control13_app_reset_permissions)
     DB_BEGIN
 
     result = perm_app_install(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     // Prepare permissions to reset
     result = perm_app_setup_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error registering app permissions. Result: " << result);
 
     // Reset permissions
     result = perm_app_reset_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error reseting app permissions. Result: " << result);
 
     DB_END
 
     // Are all second permissions not disabled?
     result = test_have_all_accesses(rules2);
-    RUNNER_ASSERT_MSG(result == 1, "Not all permissions added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Not all permissions added.");
 
     DB_BEGIN
 
     // Disable permissions
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error disabling app permissions. Result: " << result);
 
     result = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 }
@@ -1034,10 +1034,10 @@ RUNNER_TEST_SMACK(privilege_control14_app_add_friend)
     DB_BEGIN
 
     result = perm_app_revoke_permissions(APP_FRIEND_1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
     result = perm_app_revoke_permissions(APP_FRIEND_2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
     perm_app_uninstall(APP_FRIEND_1);
@@ -1045,35 +1045,35 @@ RUNNER_TEST_SMACK(privilege_control14_app_add_friend)
 
     // Installing friends to be
     result = perm_app_install(APP_FRIEND_1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error installing first app. Result: " << result);
     result = perm_app_install(APP_FRIEND_2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error installing second app. Result: " << result);
 
     // Making friends
     result = perm_app_add_friend(APP_FRIEND_1, APP_FRIEND_2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error making friends. Errno: " << result);
 
     DB_END
 
     // Checking if friends were made
     result = smack_have_access(APP_FRIEND_1, APP_FRIEND_2, "wrxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error first one sided friednship failed. Result: " << result);
     result = smack_have_access(APP_FRIEND_2, APP_FRIEND_1, "wrxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error second one sided friednship failed. Result: " << result);
 
     DB_BEGIN
 
     // Clean up
     result = perm_app_revoke_permissions(APP_FRIEND_1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
     result = perm_app_revoke_permissions(APP_FRIEND_2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
     perm_app_uninstall(APP_FRIEND_1);
@@ -1089,25 +1089,25 @@ RUNNER_TEST_SMACK(privilege_control14_app_add_friend)
 
     // Installing one friend
     result = perm_app_install(APP_FRIEND_1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error installing first app. Errno: " << result);
 
     // Adding imaginary friend as second
     result = perm_app_add_friend(APP_FRIEND_1, APP_FRIEND_2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error making friends (first) with imaginairy friend failed. Result: "
         << result);
     // Adding imaginary friend as first
     result = perm_app_add_friend(APP_FRIEND_2, APP_FRIEND_1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error making friends (second) with imaginairy friend failed. Result: "
         << result);
     // Clean up
     result = perm_app_revoke_permissions(APP_FRIEND_1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
     result = perm_app_revoke_permissions(APP_FRIEND_2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
     perm_app_uninstall(APP_FRIEND_1);
@@ -1130,10 +1130,10 @@ RUNNER_TEST_SMACK(privilege_control14_app_add_friend)
 
     // Installing friends to be
     result = perm_app_install(APP_FRIEND_1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error installing first app. Result: " << result);
     result = perm_app_install(APP_FRIEND_2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         " Error installing second app. Result: " << result);
 
     DB_END
@@ -1144,37 +1144,37 @@ RUNNER_TEST_SMACK(privilege_control14_app_add_friend)
         {
             // Adding rules before making friends
             result = smack_accesses_new(&rulesFriend);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                 "Error in smack_accesses_new. Result: " << result);
 
             result = smack_accesses_add(rulesFriend,
                 APP_FRIEND_1, APP_FRIEND_2, accessesFriend[i].c_str());
-            RUNNER_ASSERT_MSG(result == 0,
+            RUNNER_ASSERT_MSG_BT(result == 0,
                 "Unable to add modify rulesFirend (first). Result: " << result);
             result = smack_accesses_add(rulesFriend, APP_FRIEND_2,
                 APP_FRIEND_1, accessesFriend[j].c_str());
-            RUNNER_ASSERT_MSG(result == 0,
+            RUNNER_ASSERT_MSG_BT(result == 0,
                 "Unable to add modify rulesFirend (second). Result: " << result);
 
             result = smack_accesses_apply(rulesFriend);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                 "Error in smack_accesses_apply. Result: " << result);
 
             DB_BEGIN
 
             // Adding friends
             result = perm_app_add_friend(APP_FRIEND_1, APP_FRIEND_2);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                 " Error making friends. Result: " << result);
 
             DB_END
 
             // Checking if friends were made
             result = smack_have_access(APP_FRIEND_1, APP_FRIEND_2, "wrxat");
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                 " Error first one sided friednship failed. Result: " << result);
             result = smack_have_access(APP_FRIEND_2, APP_FRIEND_1, "wrxat");
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                 " Error second one sided friednship failed. Result: " << result);
 
             // Deleting all rules between friends
@@ -1194,10 +1194,10 @@ RUNNER_TEST_SMACK(privilege_control14_app_add_friend)
 
     // Clean up
     result = perm_app_revoke_permissions(APP_FRIEND_1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
     result = perm_app_revoke_permissions(APP_FRIEND_2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
         "Error revoking app permissions. Result: " << result);
 
     perm_app_uninstall(APP_FRIEND_1);
@@ -1213,7 +1213,7 @@ static void smack_set_random_label_based_on_pid_on_self(void)
 
     ss << "s-" << getpid() << "-" << getppid();
     result = smack_set_label_for_self(ss.str().c_str());
-    RUNNER_ASSERT_MSG(result == 0, "smack_set_label_for_self("
+    RUNNER_ASSERT_MSG_BT(result == 0, "smack_set_label_for_self("
         << ss.str().c_str() << ") failed");
 }
 
@@ -1232,14 +1232,14 @@ static void smack_unix_sock_server(int sock)
         close(fd);
         close(sock);
         free(smack_label);
-        RUNNER_ASSERT_MSG(0, "smack_new_label_from_self() failed");
+        RUNNER_ASSERT_MSG_BT(0, "smack_new_label_from_self() failed");
     }
     result = write(fd, smack_label, strlen(smack_label));
     if (result != (int)strlen(smack_label)) {
         close(fd);
         close(sock);
         free(smack_label);
-        RUNNER_ASSERT_MSG(0, "write() failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(0, "write() failed: " << strerror(errno));
     }
     close(fd);
     free(smack_label);
@@ -1252,7 +1252,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(privilege_control15_app_id_from_socket)
 
     unlink(SOCK_PATH);
     pid = fork();
-    RUNNER_ASSERT_MSG(pid >= 0, "Fork failed");
+    RUNNER_ASSERT_MSG_BT(pid >= 0, "Fork failed");
 
     smack_set_random_label_based_on_pid_on_self();
 
@@ -1261,17 +1261,17 @@ RUNNER_MULTIPROCESS_TEST_SMACK(privilege_control15_app_id_from_socket)
 
         /* Set the process label before creating a socket */
         sock = socket(AF_UNIX, SOCK_STREAM, 0);
-        RUNNER_ASSERT_MSG(sock >= 0, "socket failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(sock >= 0, "socket failed: " << strerror(errno));
         result = bind(sock,
             (struct sockaddr*) &sockaddr, sizeof(struct sockaddr_un));
         if (result != 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(0, "bind failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(0, "bind failed: " << strerror(errno));
         }
         result = listen(sock, 1);
         if (result != 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(0, "listen failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(0, "listen failed: " << strerror(errno));
         }
         smack_unix_sock_server(sock);
 
@@ -1279,7 +1279,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(privilege_control15_app_id_from_socket)
         smack_unix_sock_server(sock);
 
         pid = fork();
-        RUNNER_ASSERT_MSG(pid >= 0, "Fork failed");
+        RUNNER_ASSERT_MSG_BT(pid >= 0, "Fork failed");
         /* Now running two concurrent servers.
            Test if socket label was unaffected by fork() */
         smack_unix_sock_server(sock);
@@ -1298,13 +1298,13 @@ RUNNER_MULTIPROCESS_TEST_SMACK(privilege_control15_app_id_from_socket)
             char *smack_label2;
 
             sock = socket(AF_UNIX, SOCK_STREAM, 0);
-            RUNNER_ASSERT_MSG(sock >= 0,
+            RUNNER_ASSERT_MSG_BT(sock >= 0,
                 "socket failed: " << strerror(errno));
             result = connect(sock,
                 (struct sockaddr*) &sockaddr, sizeof(struct sockaddr_un));
             if (result != 0) {
                 close(sock);
-                RUNNER_ASSERT_MSG(0, "connect failed: " << strerror(errno));
+                RUNNER_ASSERT_MSG_BT(0, "connect failed: " << strerror(errno));
             }
 
             alarm(2);
@@ -1312,18 +1312,18 @@ RUNNER_MULTIPROCESS_TEST_SMACK(privilege_control15_app_id_from_socket)
             alarm(0);
             if (result < 0) {
                 close(sock);
-                RUNNER_ASSERT_MSG(0, "read failed: " << strerror(errno));
+                RUNNER_ASSERT_MSG_BT(0, "read failed: " << strerror(errno));
             }
             smack_label1[result] = '\0';
             smack_label2 = perm_app_id_from_socket(sock);
             if (smack_label2 == NULL) {
                 close(sock);
-                RUNNER_ASSERT_MSG(0, "perm_app_id_from_socket failed");
+                RUNNER_ASSERT_MSG_BT(0, "perm_app_id_from_socket failed");
             }
             result = strcmp(smack_label1, smack_label2);
             if (result != 0) {
                 close(sock);
-                RUNNER_ASSERT_MSG(0, "smack labels differ: '" << smack_label1
+                RUNNER_ASSERT_MSG_BT(0, "smack labels differ: '" << smack_label1
                     << "' != '" << smack_label2 << "-" << random() << "'");
             }
             close(sock);
@@ -1355,30 +1355,30 @@ RUNNER_TEST(privilege_control16_app_setup_path){
 
     DB_BEGIN
 
-    RUNNER_ASSERT(PC_OPERATION_SUCCESS == perm_app_setup_path("somepackageid", path1, APP_PATH_ANY_LABEL, label1));
+    RUNNER_ASSERT_BT(PC_OPERATION_SUCCESS == perm_app_setup_path("somepackageid", path1, APP_PATH_ANY_LABEL, label1));
 
     DB_END
 
-    RUNNER_ASSERT(0 == smack_lgetlabel(path3, &label, SMACK_LABEL_ACCESS));
+    RUNNER_ASSERT_BT(0 == smack_lgetlabel(path3, &label, SMACK_LABEL_ACCESS));
     labelPtr.reset(label);
     label = NULL;
-    RUNNER_ASSERT(0 == strcmp(labelPtr.get(), label1));
+    RUNNER_ASSERT_BT(0 == strcmp(labelPtr.get(), label1));
 
     DB_BEGIN
 
-    RUNNER_ASSERT(PC_OPERATION_SUCCESS == perm_app_setup_path("somepackageid", path1, APP_PATH_ANY_LABEL, label2));
+    RUNNER_ASSERT_BT(PC_OPERATION_SUCCESS == perm_app_setup_path("somepackageid", path1, APP_PATH_ANY_LABEL, label2));
 
     DB_END
 
-    RUNNER_ASSERT(0 == smack_lgetlabel(path4, &label, SMACK_LABEL_EXEC));
+    RUNNER_ASSERT_BT(0 == smack_lgetlabel(path4, &label, SMACK_LABEL_EXEC));
     labelPtr.reset(label);
     label = NULL;
-    RUNNER_ASSERT(0 == strcmp(labelPtr.get(), label2));
+    RUNNER_ASSERT_BT(0 == strcmp(labelPtr.get(), label2));
 
-    RUNNER_ASSERT(0 == smack_lgetlabel(path1, &label, SMACK_LABEL_EXEC));
+    RUNNER_ASSERT_BT(0 == smack_lgetlabel(path1, &label, SMACK_LABEL_EXEC));
     labelPtr.reset(label);
     label = NULL;
-    RUNNER_ASSERT(labelPtr.get() == NULL);
+    RUNNER_ASSERT_BT(labelPtr.get() == NULL);
 }
 
 RUNNER_TEST_SMACK(privilege_control17_appsettings_privilege)
@@ -1392,39 +1392,39 @@ void test_app_setup_path(int line_no, app_path_type_t PATH_TYPE) {
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
             " Error in perm_app_uninstall." << result);
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
             " Error in perm_app_install." << result);
 
     DB_END
 
     result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             " Unable to clean up Smack labels in " << TEST_APP_DIR);
 
     result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             " Unable to clean up Smack labels in " << TEST_NON_APP_DIR);
 
     DB_BEGIN
 
     result = perm_app_setup_path(APP_ID, TEST_APP_DIR, PATH_TYPE);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             " perm_app_setup_path() failed");
 
     DB_END
 
     result = nftw(TEST_NON_APP_DIR, &nftw_check_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Line: " << line_no <<
             " Unable to check Smack labels for non-app dir");
 
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
             " Error in perm_app_uninstall." << result);
 
     DB_END
@@ -1450,20 +1450,20 @@ RUNNER_TEST_SMACK(privilege_control20_app_setup_path_npruntime)
     DB_BEGIN
 
     result = perm_app_uninstall(APP_NPRUNTIME);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Error in perm_app_uninstall. " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Error in perm_app_uninstall. " << result);
 
     result = perm_app_install(APP_NPRUNTIME);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Error in perm_app_install. " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Error in perm_app_install. " << result);
 
     result = perm_app_setup_path(APP_NPRUNTIME, APP_NPRUNTIME_FILE, PERM_APP_PATH_NPRUNTIME);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Error in perm_app_setup_path. " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Error in perm_app_setup_path. " << result);
 
     DB_END
 
-    RUNNER_ASSERT(0 == smack_lgetlabel(APP_NPRUNTIME_FILE, &label, SMACK_LABEL_EXEC));
+    RUNNER_ASSERT_BT(0 == smack_lgetlabel(APP_NPRUNTIME_FILE, &label, SMACK_LABEL_EXEC));
     labelPtr.reset(label);
     label = NULL;
-    RUNNER_ASSERT(0 == strcmp(labelPtr.get(), nptargetlabel.c_str()));
+    RUNNER_ASSERT_BT(0 == strcmp(labelPtr.get(), nptargetlabel.c_str()));
 
     // Rules to test
     const std::vector< std::vector<std::string> > np_rules = {
@@ -1478,12 +1478,12 @@ RUNNER_TEST_SMACK(privilege_control20_app_setup_path_npruntime)
 
     // Test smack accesses
     result = test_have_all_accesses(np_rules);
-    RUNNER_ASSERT_MSG(result == 1, "Not all permissions added.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Not all permissions added.");
 
     DB_BEGIN
 
     result = perm_app_uninstall(APP_NPRUNTIME);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Error in perm_app_uninstall. " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Error in perm_app_uninstall. " << result);
 
     DB_END
 }
@@ -1509,9 +1509,9 @@ RUNNER_TEST(privilege_control21_early_rules)
     perm_app_uninstall(APP_ID);
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
     result = perm_app_install(APP_TEST_APP_1);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 
@@ -1522,14 +1522,14 @@ RUNNER_TEST(privilege_control21_early_rules)
     DB_BEGIN
 
     result = perm_app_setup_permissions(APP_ID, APP_TYPE_WGT, (const char**) &perm);
-    RUNNER_ASSERT_MSG(result == 0, "app_register_permissions failed: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "app_register_permissions failed: " << result);
     result = perm_app_setup_permissions(APP_TEST_APP_1, APP_TYPE_WGT, (const char**) &perm);
-    RUNNER_ASSERT_MSG(result == 0, "app_register_permissions failed: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "app_register_permissions failed: " << result);
 
     DB_END
 
     file = fopen(SMACK_STARTUP_RULES_FILE, "r");
-    RUNNER_ASSERT_MSG(file != NULL, "File open failed: " << SMACK_STARTUP_RULES_FILE << " : " << file << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(file != NULL, "File open failed: " << SMACK_STARTUP_RULES_FILE << " : " << file << ". Errno: " << strerror(errno));
 
     result = asprintf(&single_line_format, "%%%ds %%%ds %%%ds %%%ds\\n", SMACK_LABEL_LEN, SMACK_LABEL_LEN, SMACK_ACC_LEN, SMACK_ACC_LEN);
 
@@ -1546,20 +1546,20 @@ RUNNER_TEST(privilege_control21_early_rules)
     fclose(file);
     file = NULL;
 
-    RUNNER_ASSERT_MSG(pass_1 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_ID << " " << EARLY_RULE_RIGHTS << " not found");
-    RUNNER_ASSERT_MSG(pass_2 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_TEST_APP_1 << " " << EARLY_RULE_RIGHTS << " not found");
+    RUNNER_ASSERT_MSG_BT(pass_1 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_ID << " " << EARLY_RULE_RIGHTS << " not found");
+    RUNNER_ASSERT_MSG_BT(pass_2 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_TEST_APP_1 << " " << EARLY_RULE_RIGHTS << " not found");
 
     // Checking if "early rule" for APP_ID was really removed
     // We also should make sure that "early rules" for other apps wasn't removed
     DB_BEGIN
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
     DB_END
     pass_1 = 1;
     pass_2 = 0;
 
     file = fopen(SMACK_STARTUP_RULES_FILE, "r");
-       RUNNER_ASSERT_MSG(file != NULL, "File open failed: " << SMACK_STARTUP_RULES_FILE << " : " << file << ". Errno: " << strerror(errno));
+       RUNNER_ASSERT_MSG_BT(file != NULL, "File open failed: " << SMACK_STARTUP_RULES_FILE << " : " << file << ". Errno: " << strerror(errno));
 
        while(fscanf(file, single_line_format, subject, object, rule_add, rule_remove) == 4) {
                if(strncmp(subject, EARLY_RULE_SUBJECT, SMACK_LABEL_LEN) == 0 && strncmp(object, APP_ID, SMACK_LABEL_LEN) == 0) {
@@ -1574,19 +1574,19 @@ RUNNER_TEST(privilege_control21_early_rules)
        fclose(file);
        file = NULL;
 
-    RUNNER_ASSERT_MSG(pass_1 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_ID << " " << EARLY_RULE_RIGHTS << " found");
-    RUNNER_ASSERT_MSG(pass_2 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_TEST_APP_1 << " " << EARLY_RULE_RIGHTS << " not found");
+    RUNNER_ASSERT_MSG_BT(pass_1 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_ID << " " << EARLY_RULE_RIGHTS << " found");
+    RUNNER_ASSERT_MSG_BT(pass_2 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_TEST_APP_1 << " " << EARLY_RULE_RIGHTS << " not found");
 
     // Removing and checking "early rule" for APP_TEST_APP_1
     DB_BEGIN
        result = perm_app_uninstall(APP_TEST_APP_1);
-       RUNNER_ASSERT_MSG(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
+       RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
     DB_END
        pass_1 = 1;
        pass_2 = 1;
 
        file = fopen(SMACK_STARTUP_RULES_FILE, "r");
-       RUNNER_ASSERT_MSG(file != NULL, "File open failed: " << SMACK_STARTUP_RULES_FILE << " : " << file << ". Errno: " << strerror(errno));
+       RUNNER_ASSERT_MSG_BT(file != NULL, "File open failed: " << SMACK_STARTUP_RULES_FILE << " : " << file << ". Errno: " << strerror(errno));
 
        while(fscanf(file, single_line_format, subject, object, rule_add, rule_remove) == 4) {
                if(strncmp(subject, EARLY_RULE_SUBJECT, SMACK_LABEL_LEN) == 0 && strncmp(object, APP_ID, SMACK_LABEL_LEN) == 0) {
@@ -1601,8 +1601,8 @@ RUNNER_TEST(privilege_control21_early_rules)
        free(single_line_format);
        fclose(file);
 
-       RUNNER_ASSERT_MSG(pass_1 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_ID << " " << EARLY_RULE_RIGHTS << " found");
-       RUNNER_ASSERT_MSG(pass_2 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_TEST_APP_1 << " " << EARLY_RULE_RIGHTS << " found");
+       RUNNER_ASSERT_MSG_BT(pass_1 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_ID << " " << EARLY_RULE_RIGHTS << " found");
+       RUNNER_ASSERT_MSG_BT(pass_2 == 1, "Rule " << EARLY_RULE_SUBJECT << " " << APP_TEST_APP_1 << " " << EARLY_RULE_RIGHTS << " found");
 }
 
 /**
@@ -1620,16 +1620,16 @@ int nftw_remove_dir(const char* filename, const struct stat* /*statptr*/, int /*
     struct stat filestat;
 
     result = stat(filename, &filestat);
-    RUNNER_ASSERT_MSG(result == 0, "NFTW error: Failed to get file statistics. Result: "
+    RUNNER_ASSERT_MSG_BT(result == 0, "NFTW error: Failed to get file statistics. Result: "
             << result << ", error: " << strerror(errno) << ", file: " << filename);
 
     if(S_ISREG(filestat.st_mode)) {
         result = unlink(filename);
-        RUNNER_ASSERT_MSG(result == 0, "NFTW error: Failed to unlink file. Result: "
+        RUNNER_ASSERT_MSG_BT(result == 0, "NFTW error: Failed to unlink file. Result: "
                 << result << ", error: " << strerror(errno) << ", file: " << filename);
     } else if(S_ISDIR(filestat.st_mode)) {
         result = rmdir(filename);
-        RUNNER_ASSERT_MSG(result == 0, "NFTW error: Failed to remove dir. Result: "
+        RUNNER_ASSERT_MSG_BT(result == 0, "NFTW error: Failed to remove dir. Result: "
                 << result << ", error: " << strerror(errno) << ", file: " << filename);
     }
 
@@ -1642,23 +1642,23 @@ void InstallApp(const char* pkg_id, const char* path, app_path_type_t app_path_t
     int result = -1;
 
     result = mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP);
-    RUNNER_ASSERT_MSG(result == 0, "Can't create dir for tests. Result: " << result <<
+    RUNNER_ASSERT_MSG_BT(result == 0, "Can't create dir for tests. Result: " << result <<
             ", error: " << strerror(errno) << ", app_path_type: " << app_path_type);
 
     DB_BEGIN
 
     result = perm_app_revoke_permissions(pkg_id);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "revoke_permissions failed. Result: "
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "revoke_permissions failed. Result: "
             << result << ", app_path_type: " << app_path_type);
     result = perm_app_uninstall(pkg_id);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_uninstall failed. Result: "
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_uninstall failed. Result: "
             << result << ", app_path_type: " << app_path_type);
 
     result = perm_app_install(pkg_id);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_install failed. Result: "
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_install failed. Result: "
             << result << ", app_path_type: " << app_path_type);
     result = perm_app_setup_path(pkg_id, path, app_path_type, shared_label);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_setup_path failed. Result: "
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_setup_path failed. Result: "
             << result << ", app_path_type: " << app_path_type);
 
     DB_END
@@ -1671,17 +1671,17 @@ void InstallAV(const char* av_id, app_type_t av_type)
     DB_BEGIN
 
     result = perm_app_revoke_permissions(av_id);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "revoke_permissions failed. Result: "
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "revoke_permissions failed. Result: "
             << result << ", av_type: " << av_type);
     result = perm_app_uninstall(av_id);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_uninstall failed. Result: "
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_uninstall failed. Result: "
             << result << ", av_type: " << av_type);
 
     result = perm_app_install(av_id);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_install failed. Result: "
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_install failed. Result: "
             << result << ", av_type: " << av_type);
     result = perm_app_setup_permissions(av_id, av_type, PRIVS_AV);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "register_permissions failed. Result: "
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "register_permissions failed. Result: "
             << result << ", av_type: " << av_type);
 
     DB_END
@@ -1693,15 +1693,15 @@ void CheckAVPrivilege(app_type_t av_type, app_path_type_t app_path_type)
 
     //clean before test
     result = nftw(APP_TEST_APP_1_DIR, nftw_remove_dir, FTW_MAX_FDS, FTW_DEPTH | FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0 || errno == ENOENT, "Failed to nftw. Result: " << result <<
+    RUNNER_ASSERT_MSG_BT(result == 0 || errno == ENOENT, "Failed to nftw. Result: " << result <<
             ", error " << strerror(errno));
 
     result = nftw(APP_TEST_APP_2_DIR, nftw_remove_dir, FTW_MAX_FDS, FTW_DEPTH | FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0 || errno == ENOENT, "Failed to nftw. Result: " << result <<
+    RUNNER_ASSERT_MSG_BT(result == 0 || errno == ENOENT, "Failed to nftw. Result: " << result <<
             ", error " << strerror(errno));
 
     result = nftw(APP_TEST_APP_3_DIR, nftw_remove_dir, FTW_MAX_FDS, FTW_DEPTH | FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0 || errno == ENOENT, "Failed to nftw. Result: " << result <<
+    RUNNER_ASSERT_MSG_BT(result == 0 || errno == ENOENT, "Failed to nftw. Result: " << result <<
             ", error " << strerror(errno));
 
     InstallApp(APP_TEST_APP_1, APP_TEST_APP_1_DIR, app_path_type, APP_TEST_APP_1_SHARED_LABEL);
@@ -1716,19 +1716,19 @@ void CheckAVPrivilege(app_type_t av_type, app_path_type_t app_path_type)
 
     //get labels
     result = smack_lgetlabel(APP_TEST_APP_1_DIR, &tmp, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "smack_lgetlabel failed. Result: " << result
+    RUNNER_ASSERT_MSG_BT(result == 0, "smack_lgetlabel failed. Result: " << result
             << ", av_type: " << av_type << ", app_path_type: " << app_path_type);
     std::string label1(tmp);
     free(tmp);
 
     result = smack_lgetlabel(APP_TEST_APP_2_DIR, &tmp, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "smack_lgetlabel failed. Result: " << result
+    RUNNER_ASSERT_MSG_BT(result == 0, "smack_lgetlabel failed. Result: " << result
             << ", av_type: " << av_type << ", app_path_type: " << app_path_type);
     std::string label2(tmp);
     free(tmp);
 
     result = smack_lgetlabel(APP_TEST_APP_3_DIR, &tmp, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "smack_lgetlabel failed. Result: " << result
+    RUNNER_ASSERT_MSG_BT(result == 0, "smack_lgetlabel failed. Result: " << result
             << ", av_type: " << av_type << ", app_path_type: " << app_path_type);
     std::string label3(tmp);
     free(tmp);
@@ -1736,17 +1736,17 @@ void CheckAVPrivilege(app_type_t av_type, app_path_type_t app_path_type)
     if(app_path_type == APP_PATH_GROUP_RW)
     {
         result = label1.compare(APP_TEST_APP_1_SHARED_LABEL);
-        RUNNER_ASSERT_MSG(result == 0, "Labels do not equal. Acquired " << label1 <<
+        RUNNER_ASSERT_MSG_BT(result == 0, "Labels do not equal. Acquired " << label1 <<
                 ", should be " << APP_TEST_APP_1_SHARED_LABEL << ". Result: " << result <<
                 ", av_type: " << av_type << ", app_path_type: " << app_path_type);
 
         result = label2.compare(APP_TEST_APP_2_SHARED_LABEL);
-        RUNNER_ASSERT_MSG(result == 0, "Labels do not equal. Acquired " << label1 <<
+        RUNNER_ASSERT_MSG_BT(result == 0, "Labels do not equal. Acquired " << label1 <<
                 ", should be " << APP_TEST_APP_1_SHARED_LABEL << ". Result: " << result <<
                 ", av_type: " << av_type << ", app_path_type: " << app_path_type);
 
         result = label3.compare(APP_TEST_APP_3_SHARED_LABEL);
-        RUNNER_ASSERT_MSG(result == 0, "Labels do not equal. Acquired " << label1 <<
+        RUNNER_ASSERT_MSG_BT(result == 0, "Labels do not equal. Acquired " << label1 <<
                 ", should be " << APP_TEST_APP_1_SHARED_LABEL << ". Result: " << result <<
                 ", av_type: " << av_type << ", app_path_type: " << app_path_type);
     }
@@ -1856,16 +1856,16 @@ RUNNER_TEST(privilege_control25_test_libprivilege_strerror) {
     const char *result;
 
     for (auto itr = error_codes.begin(); itr != error_codes.end(); ++itr) {
-        RUNNER_ASSERT_MSG(strcmp(perm_strerror(*itr), "Unknown error") != 0,
+        RUNNER_ASSERT_MSG_BT(strcmp(perm_strerror(*itr), "Unknown error") != 0,
                 "Returned invalid error code description.");
     }
 
     result = perm_strerror(POSITIVE_ERROR_CODE);
-    RUNNER_ASSERT_MSG(strcmp(result, "Unknown error") == 0,
+    RUNNER_ASSERT_MSG_BT(strcmp(result, "Unknown error") == 0,
             "Bad message returned for invalid error code: \"" << result << "\"");
 
     result = perm_strerror(NONEXISTING_ERROR_CODE);
-    RUNNER_ASSERT_MSG(strcmp(result, "Unknown error") == 0,
+    RUNNER_ASSERT_MSG_BT(strcmp(result, "Unknown error") == 0,
             "Bad message returned for invalid error code: \"" << result << "\"");
 }
 
@@ -1878,24 +1878,24 @@ RUNNER_TEST(privilege_control27_perm_app_get_privileges_empty)
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall failed: " << perm_strerror(result));
 
     result = perm_app_install(APP_ID);
 
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_install failed: " << perm_strerror(result));
 
     DB_END
 
     result = perm_app_get_permissions(APP_ID, PERM_APP_TYPE_WGT, &pp_privileges);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_get_permissions failed: " << perm_strerror(result));
     privileges.reset(pp_privileges);
 
-    RUNNER_ASSERT_MSG(pp_privileges != NULL,
+    RUNNER_ASSERT_MSG_BT(pp_privileges != NULL,
             "perm_app_get_permissions failed to set pointer to cstring array");
-    RUNNER_ASSERT_MSG(*pp_privileges == NULL,
+    RUNNER_ASSERT_MSG_BT(*pp_privileges == NULL,
             "perm_app_get_permissions found permissions when not supposed to");
 }
 
@@ -1910,39 +1910,39 @@ RUNNER_TEST(privilege_control27_perm_app_get_privileges)
 
     result = perm_app_uninstall(APP_ID);
 
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall failed: " << perm_strerror(result));
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_install failed: " << perm_strerror(result));
 
     result = perm_app_setup_permissions(APP_ID, PERM_APP_TYPE_WGT, PRIVS);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_register_permissions failed: " << perm_strerror(result));
 
     result = perm_app_setup_permissions(APP_ID, PERM_APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_register_permissions failed: " << perm_strerror(result));
 
     result = perm_app_disable_permissions(APP_ID, PERM_APP_TYPE_WGT, PRIVS2);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_disable_permissions failed: " << perm_strerror(result));
     DB_END
 
     result = perm_app_get_permissions(APP_ID, PERM_APP_TYPE_WGT, &pp_privileges);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_get_permissions returned " << result << ": " << perm_strerror(result));
     privileges.reset(pp_privileges);
 
     for(i = 0; pp_privileges[i] != NULL; ++i) {
-        RUNNER_ASSERT_MSG(PRIVS[i] != NULL,
+        RUNNER_ASSERT_MSG_BT(PRIVS[i] != NULL,
                 "perm_app_get_permissions returned too many permissions");
-        RUNNER_ASSERT_MSG(strcmp(pp_privileges[i], PRIVS[i]) == 0,
+        RUNNER_ASSERT_MSG_BT(strcmp(pp_privileges[i], PRIVS[i]) == 0,
                 "perm_app_get_permissions returned wrong permission, " << pp_privileges[i] <<
                 " != " << PRIVS[i]);
     }
-    RUNNER_ASSERT_MSG(PRIVS[i] == NULL,
+    RUNNER_ASSERT_MSG_BT(PRIVS[i] == NULL,
             "perm_app_get_permissions returned too few enabled permissions");
 }
 
@@ -1955,23 +1955,23 @@ RUNNER_TEST(privilege_control28_perm_app_get_paths_empty)
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall failed: " << perm_strerror(result));
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_install failed: " <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_install failed: " <<
             perm_strerror(result));
 
     DB_END
 
     result = perm_app_get_paths(APP_ID, PERM_APP_PATH_PUBLIC, &pp_paths);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_get_paths failed: " <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_get_paths failed: " <<
             perm_strerror(result));
     paths.reset(pp_paths);
 
-    RUNNER_ASSERT_MSG(pp_paths != NULL,
+    RUNNER_ASSERT_MSG_BT(pp_paths != NULL,
             "perm_app_get_paths failed to set pointer to cstring array");
-    RUNNER_ASSERT_MSG(*pp_paths == NULL, "perm_app_get_paths found paths when not supposed to");
+    RUNNER_ASSERT_MSG_BT(*pp_paths == NULL, "perm_app_get_paths found paths when not supposed to");
 }
 
 RUNNER_TEST(privilege_control28_perm_app_get_paths)
@@ -1985,44 +1985,44 @@ RUNNER_TEST(privilege_control28_perm_app_get_paths)
 
     for (i = 0; i < DIR_NUM; ++i) {
         test_paths.push_back(Directory("/tmp/dir" + std::to_string(i), 0));
-        RUNNER_ASSERT_MSG(test_paths[i].isCreated(), "failed to create a directory " <<
+        RUNNER_ASSERT_MSG_BT(test_paths[i].isCreated(), "failed to create a directory " <<
                 test_paths[i].path() << ": " << strerror(test_paths[i].errorCode()));
     }
 
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_uninstall failed: " <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_uninstall failed: " <<
             perm_strerror(result));
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_install failed: " <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_install failed: " <<
             perm_strerror(result));
 
     for (auto itr = test_paths.begin(); itr != test_paths.end(); ++itr) {
         result = perm_app_setup_path(APP_ID, itr->path().c_str(), PERM_APP_PATH_PUBLIC);
-        RUNNER_ASSERT_MSG(result == 0, "perm_app_setup_path failed: " << perm_strerror(result));
+        RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_setup_path failed: " << perm_strerror(result));
     }
 
     DB_END
 
     result = perm_app_get_paths(APP_ID, PERM_APP_PATH_PUBLIC, &pp_paths);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_get_paths failed: " <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_get_paths failed: " <<
             perm_strerror(result));
     paths.reset(pp_paths);
 
     for(i = 0; pp_paths[i] != NULL; ++i) {
-        RUNNER_ASSERT_MSG(i < test_paths.size(), "perm_app_get_paths returned too many paths");
-        RUNNER_ASSERT_MSG(test_paths[i].path() == pp_paths[i],
+        RUNNER_ASSERT_MSG_BT(i < test_paths.size(), "perm_app_get_paths returned too many paths");
+        RUNNER_ASSERT_MSG_BT(test_paths[i].path() == pp_paths[i],
                 "perm_app_get_paths returned unexpected path, " << pp_paths[i] << " != " <<
                 test_paths[i].path());
     }
-    RUNNER_ASSERT_MSG(i == test_paths.size(), "perm_app_get_paths returned too few paths");
+    RUNNER_ASSERT_MSG_BT(i == test_paths.size(), "perm_app_get_paths returned too few paths");
 
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "perm_app_uninstall failed: " <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_app_uninstall failed: " <<
             perm_strerror(result));
 
     DB_END
index 42a0026..0ed106d 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include <dpl/test/test_runner.h>
+#include <tests_common.h>
 #include <sys/smack.h>
 #include <privilege-control.h>
 #include <tests_common.h>
@@ -38,89 +39,89 @@ RUNNER_TEST_GROUP_INIT(libprivilegecontrol_incorrect_params)
 
 RUNNER_TEST(privilege_control21a_incorrect_params_get_smack_label_from_process)
 {
-    RUNNER_ASSERT_MSG(get_smack_label_from_process(PID_CORRECT, NULL) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(get_smack_label_from_process(PID_CORRECT, NULL) == PC_ERR_INVALID_PARAM,
             "get_smack_label_from_process didn't check if smack_label isn't NULL.");
 
     char aquired_smack_label[SMACK_LABEL_LEN+1];
-    RUNNER_ASSERT_MSG(get_smack_label_from_process(PID_INCORRECT, aquired_smack_label) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(get_smack_label_from_process(PID_INCORRECT, aquired_smack_label) == PC_ERR_INVALID_PARAM,
             "get_smack_label_from_process didn't check for correct pid.");
 }
 
 RUNNER_TEST_SMACK(privilege_control21b_incorrect_params_smack_pid_have_access)
 {
-    RUNNER_ASSERT_MSG(smack_pid_have_access(PID_CORRECT, "some_object", NULL) == -1,
+    RUNNER_ASSERT_MSG_BT(smack_pid_have_access(PID_CORRECT, "some_object", NULL) == -1,
             "smack_pid_have_access didn't check if access_type isn't NULL.");
-    RUNNER_ASSERT_MSG(smack_pid_have_access(PID_CORRECT, NULL, "rw") == -1,
+    RUNNER_ASSERT_MSG_BT(smack_pid_have_access(PID_CORRECT, NULL, "rw") == -1,
             "smack_pid_have_access didn't check if object isn't NULL.");
-    RUNNER_ASSERT_MSG(smack_pid_have_access(PID_CORRECT, "", "rw") == -1,
+    RUNNER_ASSERT_MSG_BT(smack_pid_have_access(PID_CORRECT, "", "rw") == -1,
             "smack_pid_have_access didn't check if object isn't empty.");
-    RUNNER_ASSERT_MSG(smack_pid_have_access(PID_INCORRECT, "some_object", "rw") == -1,
+    RUNNER_ASSERT_MSG_BT(smack_pid_have_access(PID_INCORRECT, "some_object", "rw") == -1,
             "smack_pid_have_access didn't check for correct pid.");
 }
 
 RUNNER_TEST(privilege_control21c_incorrect_params_perm_app_set_privilege)
 {
-    RUNNER_ASSERT_MSG(perm_app_set_privilege(NULL, NULL, APP_SET_PRIV_PATH) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_set_privilege(NULL, NULL, APP_SET_PRIV_PATH) == PC_ERR_INVALID_PARAM,
             "perm_app_set_privilege didn't check if package name isn't NULL.");
 }
 
 RUNNER_TEST(privilege_control21d_incorrect_params_perm_app_install)
 {
-    RUNNER_ASSERT_MSG(perm_app_install(NULL) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_install(NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_install didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_install("") == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_install("") == PC_ERR_INVALID_PARAM,
             "perm_app_install didn't check if pkg_id isn't empty.");
 }
 
 RUNNER_TEST(privilege_control21e_incorrect_params_perm_app_uninstall)
 {
-    RUNNER_ASSERT_MSG(perm_app_uninstall(NULL) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_uninstall(NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_uninstall didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_uninstall("") == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_uninstall("") == PC_ERR_INVALID_PARAM,
             "perm_app_uninstall didn't check if pkg_id isn't empty.");
 }
 
 RUNNER_TEST(privilege_control21f_incorrect_params_perm_app_enable_permissions)
 {
-    RUNNER_ASSERT_MSG(perm_app_enable_permissions(APP_ID, APP_TYPE_OTHER, NULL, 1) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_enable_permissions(APP_ID, APP_TYPE_OTHER, NULL, 1) == PC_ERR_INVALID_PARAM,
             "perm_app_enable_permissions didn't check if perm_list isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_enable_permissions(NULL, APP_TYPE_OTHER, PRIVS2, 1) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_enable_permissions(NULL, APP_TYPE_OTHER, PRIVS2, 1) == PC_ERR_INVALID_PARAM,
             "perm_app_enable_permissions didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_enable_permissions("", APP_TYPE_OTHER, PRIVS2, 1) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_enable_permissions("", APP_TYPE_OTHER, PRIVS2, 1) == PC_ERR_INVALID_PARAM,
             "perm_app_enable_permissions didn't check if pkg_id isn't empty.");
-    RUNNER_ASSERT_MSG(perm_app_enable_permissions("~APP~", APP_TYPE_OTHER, PRIVS2, 1) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_enable_permissions("~APP~", APP_TYPE_OTHER, PRIVS2, 1) == PC_ERR_INVALID_PARAM,
             "perm_app_enable_permissions didn't check if pkg_id is valid");
 }
 
 RUNNER_TEST(privilege_control21g_incorrect_params_app_revoke_permissions)
 {
-    RUNNER_ASSERT_MSG(perm_app_revoke_permissions(NULL) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_revoke_permissions(NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_revoke_permissions didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_revoke_permissions("") == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_revoke_permissions("") == PC_ERR_INVALID_PARAM,
             "perm_app_revoke_permissions didn't check if pkg_id isn't empty.");
-    RUNNER_ASSERT_MSG(perm_app_revoke_permissions("~APP~") == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_revoke_permissions("~APP~") == PC_ERR_INVALID_PARAM,
             "perm_app_revoke_permissions didn't check if pkg_id is valid.");
 }
 
 RUNNER_TEST(privilege_control21h_incorrect_params_app_reset_permissions)
 {
-    RUNNER_ASSERT_MSG(perm_app_reset_permissions(NULL) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_reset_permissions(NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_reset_permissions didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_reset_permissions("") == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_reset_permissions("") == PC_ERR_INVALID_PARAM,
             "perm_app_reset_permissions didn't check if pkg_id isn't empty.");
-    RUNNER_ASSERT_MSG(perm_app_reset_permissions("~APP~") == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_reset_permissions("~APP~") == PC_ERR_INVALID_PARAM,
             "perm_app_reset_permissions didn't check if pkg_id is valid.");
 }
 
 RUNNER_TEST(privilege_control21i_incorrect_params_app_setup_path)
 {
-    RUNNER_ASSERT_MSG(perm_app_setup_path(APPID_DIR, NULL, APP_PATH_PRIVATE) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_path(APPID_DIR, NULL, APP_PATH_PRIVATE) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_path didn't check if path isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_setup_path(NULL, TEST_APP_DIR, APP_PATH_PRIVATE) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_path(NULL, TEST_APP_DIR, APP_PATH_PRIVATE) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_path didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_setup_path("", TEST_APP_DIR, APP_PATH_PRIVATE) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_path("", TEST_APP_DIR, APP_PATH_PRIVATE) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_path didn't check if pkg_id isn't empty.");
-    RUNNER_ASSERT_MSG(perm_app_setup_path("~APP~", TEST_APP_DIR, APP_PATH_PRIVATE) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_path("~APP~", TEST_APP_DIR, APP_PATH_PRIVATE) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_path didn't check if pkg_id is valid.");
 }
 
@@ -128,37 +129,37 @@ RUNNER_TEST(privilege_control21j_incorrect_params_app_add_friend)
 {
     RUNNER_IGNORED_MSG("perm_app_add_friend is not implemented");
 
-    RUNNER_ASSERT_MSG(perm_app_add_friend(NULL, APP_FRIEND_2) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_add_friend(NULL, APP_FRIEND_2) == PC_ERR_INVALID_PARAM,
             "perm_app_add_friend didin't check if pkg_id1 isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_add_friend("", APP_FRIEND_2) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_add_friend("", APP_FRIEND_2) == PC_ERR_INVALID_PARAM,
             "perm_app_add_friend didin't check if pkg_id1 isn't empty.");
-    RUNNER_ASSERT_MSG(perm_app_add_friend(APP_FRIEND_1, NULL) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_add_friend(APP_FRIEND_1, NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_add_friend didin't check if pkg_id2 isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_add_friend(APP_FRIEND_1, "") == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_add_friend(APP_FRIEND_1, "") == PC_ERR_INVALID_PARAM,
             "perm_app_add_friend didin't check if pkg_id2 isn't empty.");
-    RUNNER_ASSERT_MSG(perm_app_add_friend("~APP~", APP_FRIEND_2) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_add_friend("~APP~", APP_FRIEND_2) == PC_ERR_INVALID_PARAM,
             "perm_app_add_friend didin't check if pkg_id1 is valid.");
-    RUNNER_ASSERT_MSG(perm_app_add_friend(APP_FRIEND_1, "~APP~") == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_add_friend(APP_FRIEND_1, "~APP~") == PC_ERR_INVALID_PARAM,
             "perm_app_add_friend didin't check if pkg_id2 is valid.");
 }
 
 RUNNER_TEST(privilege_control21k_incorrect_params_add_api_feature)
 {
-    RUNNER_ASSERT_MSG(perm_add_api_feature(APP_TYPE_OSP, NULL, NULL, NULL, 0) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_add_api_feature(APP_TYPE_OSP, NULL, NULL, NULL, 0) == PC_ERR_INVALID_PARAM,
             "perm_add_api_feature didn't check if api_feature_name isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_add_api_feature(APP_TYPE_OSP, "", NULL, NULL, 0) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_add_api_feature(APP_TYPE_OSP, "", NULL, NULL, 0) == PC_ERR_INVALID_PARAM,
             "perm_add_api_feature didn't check if api_feature_name isn't empty.");
 }
 
 RUNNER_TEST(privilege_control21l_incorrect_params_ignored_disable_permissions)
 {
-    RUNNER_ASSERT_MSG(perm_app_disable_permissions(APP_ID, APP_TYPE_OTHER, NULL) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_disable_permissions(APP_ID, APP_TYPE_OTHER, NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_disable_permissions didn't check if perm_list isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_disable_permissions(NULL, APP_TYPE_OTHER, PRIVS2) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_disable_permissions(NULL, APP_TYPE_OTHER, PRIVS2) == PC_ERR_INVALID_PARAM,
             "perm_app_disable_permissions didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_disable_permissions("", APP_TYPE_OTHER, PRIVS2) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_disable_permissions("", APP_TYPE_OTHER, PRIVS2) == PC_ERR_INVALID_PARAM,
             "perm_app_disable_permissions didn't check if pkg_id isn't empty.");
-    RUNNER_ASSERT_MSG(perm_app_disable_permissions("~APP~", APP_TYPE_OTHER, PRIVS2) == PC_ERR_INVALID_PARAM,
+    RUNNER_ASSERT_MSG_BT(perm_app_disable_permissions("~APP~", APP_TYPE_OTHER, PRIVS2) == PC_ERR_INVALID_PARAM,
             "perm_app_disable_permissions didn't check if pkg_id is valid.");
 }
 
@@ -166,35 +167,35 @@ RUNNER_TEST(privilege_control21m_incorrect_params_perm_app_has_permission)
 {
     bool has_permission;
 
-    RUNNER_ASSERT_MSG(perm_app_has_permission(NULL, APP_TYPE_WGT,
+    RUNNER_ASSERT_MSG_BT(perm_app_has_permission(NULL, APP_TYPE_WGT,
                                               PRIVS2[0], &has_permission) == PC_ERR_INVALID_PARAM,
             "perm_app_has_permission didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_has_permission(APP_ID, APP_TYPE_OTHER,
+    RUNNER_ASSERT_MSG_BT(perm_app_has_permission(APP_ID, APP_TYPE_OTHER,
                                               PRIVS2[0], &has_permission) == PC_ERR_INVALID_PARAM,
             "perm_app_has_permission should not accept app_type = OTHER.");
-    RUNNER_ASSERT_MSG(perm_app_has_permission(APP_ID, APP_TYPE_WGT,
+    RUNNER_ASSERT_MSG_BT(perm_app_has_permission(APP_ID, APP_TYPE_WGT,
                                               NULL, &has_permission) == PC_ERR_INVALID_PARAM,
             "perm_app_has_permission didn't check if permission_name isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_has_permission(APP_ID, APP_TYPE_WGT,
+    RUNNER_ASSERT_MSG_BT(perm_app_has_permission(APP_ID, APP_TYPE_WGT,
                                               PRIVS2[0], NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_has_permission didn't check if has_permission isn't NULL.");
 }
 
 RUNNER_TEST(privilege_control21n_incorrect_params_perm_app_setup_permissions)
 {
-    RUNNER_ASSERT_MSG(perm_app_setup_permissions(APP_ID, APP_TYPE_OTHER,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_permissions(APP_ID, APP_TYPE_OTHER,
                       NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_permissions didn't check if perm_list isn't NULL");
-    RUNNER_ASSERT_MSG(perm_app_setup_permissions(NULL, APP_TYPE_OTHER,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_permissions(NULL, APP_TYPE_OTHER,
                       PRIVS2) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_permissions didn't check if pkg_id isn't NULL.");
-    RUNNER_ASSERT_MSG(perm_app_setup_permissions("", APP_TYPE_OTHER,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_permissions("", APP_TYPE_OTHER,
                       PRIVS2) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_permissions didn't check if pkg_id isn't empty.");
-    RUNNER_ASSERT_MSG(perm_app_setup_permissions(APP_ID, (app_type_t)-1,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_permissions(APP_ID, (app_type_t)-1,
                       PRIVS2) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_permissions didn't check if app type is valid.");
-    RUNNER_ASSERT_MSG(perm_app_setup_permissions("~APP~", APP_TYPE_OTHER,
+    RUNNER_ASSERT_MSG_BT(perm_app_setup_permissions("~APP~", APP_TYPE_OTHER,
                       PRIVS2) == PC_ERR_INVALID_PARAM,
             "perm_app_setup_permissions didn't check if pkg_id is valid");
 }
@@ -203,18 +204,18 @@ RUNNER_TEST(privilege_control22n_incorrect_params_perm_app_get_paths)
 {
     char **pp_paths;
 
-    RUNNER_ASSERT_MSG(perm_app_get_paths(NULL, PERM_APP_PATH_PUBLIC,
+    RUNNER_ASSERT_MSG_BT(perm_app_get_paths(NULL, PERM_APP_PATH_PUBLIC,
                                          &pp_paths) == PC_ERR_INVALID_PARAM,
             "perm_app_get_paths didn't check if pkg_id isn't NULL.");
 
-    RUNNER_ASSERT_MSG(perm_app_get_paths(APP_ID, PERM_APP_PATH_PUBLIC,
+    RUNNER_ASSERT_MSG_BT(perm_app_get_paths(APP_ID, PERM_APP_PATH_PUBLIC,
                                          NULL) == PC_ERR_INVALID_PARAM,
             "perm_app_get_paths didn't check if ppp_paths isn't NULL.");
 
-    RUNNER_ASSERT_MSG(perm_app_get_paths(APP_ID, PERM_APP_PATH_PRIVATE,
+    RUNNER_ASSERT_MSG_BT(perm_app_get_paths(APP_ID, PERM_APP_PATH_PRIVATE,
                                          &pp_paths) == PC_ERR_INVALID_PARAM,
             "perm_app_get_paths shouldn't accept paths of type PERM_APP_PATH_PRIVATE");
-    RUNNER_ASSERT_MSG(perm_app_get_paths(APP_ID, PERM_APP_PATH_ANY_LABEL,
+    RUNNER_ASSERT_MSG_BT(perm_app_get_paths(APP_ID, PERM_APP_PATH_ANY_LABEL,
                                          &pp_paths) == PC_ERR_INVALID_PARAM,
             "perm_app_get_paths should not accept paths of type PERM_APP_PATH_ANY_LABEL");
 }
index 56bb577..3cf4eab 100644 (file)
@@ -67,32 +67,32 @@ int nftw_check_labels_app_shared_dir_nosmack(const char *fpath, const struct sta
     char* label;
 
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path. Result: " << result);
-    RUNNER_ASSERT_MSG(label != NULL, "ACCESS label on " << fpath << " is not set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(label != NULL, "ACCESS label on " << fpath << " is not set");
 
     result = strcmp(APPID_SHARED_DIR, label);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "ACCESS label on " << fpath << " is incorrect. Result: " << result);
 
     //The only exception in nftw_check_labels_app_shared_dir
     //smack_have_access returns -1 because of no SMACK.
     result = smack_have_access(APP_ID, APPID_SHARED_DIR, "rwxat");
-    RUNNER_ASSERT_MSG(result == -1,
+    RUNNER_ASSERT_MSG_BT(result == -1,
             "smack_have_access should return error (SMACK is off). Result: " << result);
 
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path. Result: " << result);
-    RUNNER_ASSERT_MSG(label == NULL, "EXEC label on " << fpath << " is set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(label == NULL, "EXEC label on " << fpath << " is set");
 
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_TRANSMUTE);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path. Result: " << result);
     if (S_ISDIR(sb->st_mode)) {
-        RUNNER_ASSERT_MSG(label != NULL, "TRANSMUTE label on " << fpath << " is not set");
+        RUNNER_ASSERT_MSG_BT(label != NULL, "TRANSMUTE label on " << fpath << " is not set");
         result = strcmp("TRUE", label);
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
                 "TRANSMUTE label on " << fpath << " is not set. Result: " << result);
     } else
-        RUNNER_ASSERT_MSG(label == NULL, "TRANSMUTE label on " << fpath << " is set");
+        RUNNER_ASSERT_MSG_BT(label == NULL, "TRANSMUTE label on " << fpath << " is set");
 
     return 0;
 }
@@ -111,33 +111,33 @@ RUNNER_TEST_NOSMACK(privilege_control03_app_label_shared_dir_nosmack)
     DB_BEGIN
 
     result = perm_app_setup_path(APP_ID, TEST_APP_DIR, APP_PATH_GROUP_RW, APP_ID);
-    RUNNER_ASSERT_MSG(result != PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result != PC_OPERATION_SUCCESS,
             "perm_app_setup_path should fail here. Result: " << result);
 
     DB_END
 
     result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Unable to clean up Smack labels in " << TEST_APP_DIR);
 
     result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Unable to clean up Smack labels in " << TEST_NON_APP_DIR);
 
     DB_BEGIN
 
     result = perm_app_setup_path(APP_ID, TEST_APP_DIR, APP_PATH_GROUP_RW, APPID_SHARED_DIR);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_setup_path() failed. Result: " << result);
 
     DB_END
 
     result = nftw(TEST_APP_DIR, &nftw_check_labels_app_shared_dir_nosmack, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Unable to check Smack labels for shared app dir");
 
     result = nftw(TEST_NON_APP_DIR, &nftw_check_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Unable to check Smack labels for non-app dir");
 }
 
@@ -154,23 +154,23 @@ RUNNER_TEST_NOSMACK(privilege_control04_add_permissions_nosmack)
     DB_BEGIN
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_install(APP_ID);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     //Add permissions
     result = perm_app_enable_permissions(APP_ID, APP_TYPE_EFL, PRIVS_EFL, TRUE);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error adding app permissions. Result: " << result);
 
     DB_END
 
     //Check if smack_have_access always fails on every rule
     result = test_have_nosmack_accesses(rules_efl);
-    RUNNER_ASSERT_MSG(result == -1,
+    RUNNER_ASSERT_MSG_BT(result == -1,
             "Despite SMACK being off some accesses were added. Result: " << result);
 
     // Check if permission is assigned to app in db
@@ -195,33 +195,33 @@ void set_app_privilege_nosmack(int line_no,
     DB_BEGIN
 
     result = perm_app_uninstall(app_id);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_install(app_id);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_enable_permissions(app_id, app_type, privileges, 1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
             " Error enabling app permissions. Result: " << result);
 
     DB_END
 
     result = test_have_nosmack_accesses(rules);
-    RUNNER_ASSERT_MSG(result == -1, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == -1, "Line: " << line_no <<
             " Permissions shouldn't be added. Result: " << result);
 
     result = perm_app_set_privilege(app_id, type, app_path);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Line: " << line_no <<
             " Error in perm_app_set_privilege. Error: " << result);
 
     //Even though app privileges are set, no smack label should be extracted.
     char* label = NULL;
     result = smack_new_label_from_self(&label);
-    RUNNER_ASSERT_MSG(result == -1, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(result == -1, "Line: " << line_no <<
             " new_label_from_self should return error (SMACK is off). Result: " << result);
-    RUNNER_ASSERT_MSG(label == NULL, "Line: " << line_no <<
+    RUNNER_ASSERT_MSG_BT(label == NULL, "Line: " << line_no <<
             " new_label_from_self shouldn't allocate memory for label.");
 
     check_groups(dac_file);
@@ -245,25 +245,25 @@ RUNNER_CHILD_TEST_NOSMACK(privilege_control05_set_app_privilege_nosmack)
 
     //Set app privileges
     result = perm_app_set_privilege(APP_ID, NULL, APP_SET_PRIV_PATH);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error in perm_app_set_privilege. Error: " << result);
 
     //Even though app privileges are set, no smack label should be extracted.
     char* label = NULL;
     result = smack_new_label_from_self(&label);
-    RUNNER_ASSERT_MSG(result == -1,
+    RUNNER_ASSERT_MSG_BT(result == -1,
             "new_label_from_self should return error (SMACK is off). Result: " << result);
-    RUNNER_ASSERT_MSG(label == NULL, "new_label_from_self shouldn't allocate memory for label.");
+    RUNNER_ASSERT_MSG_BT(label == NULL, "new_label_from_self shouldn't allocate memory for label.");
 
     //Check if DAC privileges really set
-    RUNNER_ASSERT_MSG(getuid() == APP_UID, "Wrong UID");
-    RUNNER_ASSERT_MSG(getgid() == APP_GID, "Wrong GID");
+    RUNNER_ASSERT_MSG_BT(getuid() == APP_UID, "Wrong UID");
+    RUNNER_ASSERT_MSG_BT(getgid() == APP_GID, "Wrong GID");
 
     result = strcmp(getenv("HOME"), APP_HOME_DIR);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong HOME DIR. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong HOME DIR. Result: " << result);
 
     result = strcmp(getenv("USER"), APP_USER_NAME);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong user USER NAME. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong user USER NAME. Result: " << result);
 
     check_groups(LIBPRIVILEGE_TEST_DAC_FILE);
 }
@@ -405,18 +405,18 @@ RUNNER_TEST_NOSMACK(privilege_control10_app_register_av_nosmack)
 
     // Adding two apps before antivir
     result = perm_app_install(APP_TEST_APP_1);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_install(APP_TEST_APP_2);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
 
     // Adding antivir
     result = app_register_av(APP_TEST_AV_1);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "app_register_av returned " << result << ". Errno: " << strerror(errno));
 
     // Checking added apps accesses
@@ -427,7 +427,7 @@ RUNNER_TEST_NOSMACK(privilege_control10_app_register_av_nosmack)
 
     // Adding third app
     result = perm_app_install(APP_TEST_APP_3);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     DB_END
@@ -439,7 +439,7 @@ RUNNER_TEST_NOSMACK(privilege_control10_app_register_av_nosmack)
 
     // Adding second antivir
     result = app_register_av(APP_TEST_AV_2);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "app_register_av returned " << result << ". Errno: " << strerror(errno));
 
     // Checking app accesses
@@ -471,26 +471,26 @@ RUNNER_TEST_NOSMACK(privilege_control11_app_enable_permissions_nosmack)
     DB_BEGIN
 
     result = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_install(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error revoking app permissions. Result: " << result);
 
     result = perm_app_enable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2, 1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error enabling app permissions. Result: " << result);
 
     DB_END
 
     //Check if accesses aren't added
     result = test_have_nosmack_accesses(rules2);
-    RUNNER_ASSERT_MSG(result == -1, "Permissions shouldn't be added. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == -1, "Permissions shouldn't be added. Result: " << result);
 
     TestLibPrivilegeControlDatabase db_test;
     db_test.test_db_after__perm_app_install(TRACE_FROM_HERE, WGT_APP_ID);
@@ -501,7 +501,7 @@ RUNNER_TEST_NOSMACK(privilege_control11_app_enable_permissions_nosmack)
 
     //Clean up
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error revoking app permissions. Result: " << result);
 
     DB_END
@@ -543,33 +543,33 @@ RUNNER_TEST_NOSMACK(privilege_control13_app_reset_permissions_nosmack)
     DB_BEGIN
 
     result = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_uninstall returned " << result << ". Errno: " << strerror(errno));
 
     result = perm_app_install(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "perm_app_install returned " << result << ". Errno: " << strerror(errno));
 
     // Prepare permissions to reset
     result = perm_app_enable_permissions(WGT_APP_ID, APP_TYPE_WGT, PRIVS2, 1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             " Error adding app permissions. Result: " << result);
 
     // Reset permissions
     result = perm_app_reset_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error reseting app permissions. Result: " << result);
 
     DB_END
 
     result = test_have_nosmack_accesses(rules2);
-    RUNNER_ASSERT_MSG(result == -1, "Permissions shouldn't be changed. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == -1, "Permissions shouldn't be changed. Result: " << result);
 
     DB_BEGIN
 
     // Disable permissions
     result = perm_app_revoke_permissions(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
             "Error disabling app permissions. Result: " << result);
 
     DB_END
@@ -597,34 +597,34 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(privilege_control15_app_id_from_socket_nosmack)
 
     //Create our server and client with fork
     pid = fork();
-    RUNNER_ASSERT_MSG(pid >= 0, "Fork failed");
+    RUNNER_ASSERT_MSG_BT(pid >= 0, "Fork failed");
 
     if (!pid) { //child (server)
         int sock, result, fd;
 
         //Create a socket
         sock = socket(AF_UNIX, SOCK_STREAM, 0);
-        RUNNER_ASSERT_MSG(sock >= 0, "socket failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(sock >= 0, "socket failed: " << strerror(errno));
 
         //Bind socket to address
         result = bind(sock, (struct sockaddr*) &sockaddr, sizeof(struct sockaddr_un));
         if (result != 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(false, "bind failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(false, "bind failed: " << strerror(errno));
         }
 
         //Prepare for listening
         result = listen(sock, 1);
         if (result != 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(false, "listen failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(false, "listen failed: " << strerror(errno));
         }
 
         //Accept connection
         alarm(2);
         fd = accept(sock, NULL, NULL);
         alarm(0);
-        RUNNER_ASSERT_MSG(fd >= 0, "accept failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(fd >= 0, "accept failed: " << strerror(errno));
 
         //Wait a little bit for client to use perm_app_id_from_socket
         usleep(200);
@@ -640,25 +640,25 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(privilege_control15_app_id_from_socket_nosmack)
 
         //Create socket
         sock = socket(AF_UNIX, SOCK_STREAM, 0);
-        RUNNER_ASSERT_MSG(sock >= 0, "socket failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(sock >= 0, "socket failed: " << strerror(errno));
 
         //Try connecting to address
         result = connect(sock, (struct sockaddr*) &sockaddr, sizeof(struct sockaddr_un));
         if (result != 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(0, "connect failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(0, "connect failed: " << strerror(errno));
         }
 
         //Use perm_app_id_from_socket. Should fail and return NULL smack_label.
         smack_label = perm_app_id_from_socket(sock);
         if (smack_label != NULL) {
             close(sock);
-            RUNNER_ASSERT_MSG(0, "perm_app_id_from_socket should fail.");
+            RUNNER_ASSERT_MSG_BT(0, "perm_app_id_from_socket should fail.");
         }
 
         //cleanup
         close(sock);
-        RUNNER_ASSERT_MSG(smack_label == NULL, "perm_app_id_from_socket should fail.");
+        RUNNER_ASSERT_MSG_BT(smack_label == NULL, "perm_app_id_from_socket should fail.");
     }
 }
 
@@ -679,19 +679,19 @@ int check_labels_dir_nosmack(const char *fpath, const struct stat *sb,
 
     /* ACCESS */
     result = smack_lgetlabel(fpath, &label_gen, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path. Result: " << result);
-    RUNNER_ASSERT_MSG(label_gen != NULL, "ACCESS label on " << fpath << " is not set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Could not get label for the path. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(label_gen != NULL, "ACCESS label on " << fpath << " is not set");
 
     /* EXEC */
     result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
     if (result != 0) {
         free(label_gen);
-        RUNNER_ASSERT_MSG(false, "Could not get label for the path. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(false, "Could not get label for the path. Result: " << result);
     }
     if (label != NULL) {
         free(label_gen);
         free(label);
-        RUNNER_ASSERT_MSG(false, "EXEC label on " << fpath << " is set.");
+        RUNNER_ASSERT_MSG_BT(false, "EXEC label on " << fpath << " is set.");
     }
 
     /* TRANSMUTE */
@@ -699,25 +699,25 @@ int check_labels_dir_nosmack(const char *fpath, const struct stat *sb,
     if (result != 0) {
         free(label_gen);
         free(label);
-        RUNNER_ASSERT_MSG(false, "Could not get label for the path. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(false, "Could not get label for the path. Result: " << result);
     }
     if (S_ISDIR(sb->st_mode)) {
         if (label == NULL) {
             free(label_gen);
             free(label);
-            RUNNER_ASSERT_MSG(false, "TRANSMUTE label on " << fpath << " is not set");
+            RUNNER_ASSERT_MSG_BT(false, "TRANSMUTE label on " << fpath << " is not set");
         }
         result = strcmp("TRUE", label);
         if (result != 0) {
             free(label_gen);
             free(label);
-            RUNNER_ASSERT_MSG(false,
+            RUNNER_ASSERT_MSG_BT(false,
                     "TRANSMUTE label on " << fpath << " is not set to TRUE Result: " << result);
         }
     } else if (label != NULL) {
         free(label_gen);
         free(label);
-        RUNNER_ASSERT_MSG(false, "TRANSMUTE label on " << fpath << " is set");
+        RUNNER_ASSERT_MSG_BT(false, "TRANSMUTE label on " << fpath << " is set");
     }
 
     free(label);
@@ -725,7 +725,7 @@ int check_labels_dir_nosmack(const char *fpath, const struct stat *sb,
     fs_db.open(labels_db_path, std::ios_base::in);
     if (!(fs_db.good())) {
         free(label_gen);
-        RUNNER_ASSERT_MSG(false, "Can not open database for apps");
+        RUNNER_ASSERT_MSG_BT(false, "Can not open database for apps");
     }
 
     while(!fs_db.eof()) {
@@ -733,7 +733,7 @@ int check_labels_dir_nosmack(const char *fpath, const struct stat *sb,
         result = smack_have_access(label_temp, label_gen, access);
         if (result != -1) {  //expect error, not access granted
             free(label_gen);
-            RUNNER_ASSERT_MSG(false, "smack_have_access should fail. Result: " << result);
+            RUNNER_ASSERT_MSG_BT(false, "smack_have_access should fail. Result: " << result);
         }
     }
 
@@ -742,7 +742,7 @@ int check_labels_dir_nosmack(const char *fpath, const struct stat *sb,
     fs_db.open(dir_db_path, std::ios_base::in);
     if (!fs_db.good()) {
         free(label_gen);
-        RUNNER_ASSERT_MSG(false, "Can not open database for dirs");
+        RUNNER_ASSERT_MSG_BT(false, "Can not open database for dirs");
     }
 
     bool is_dir = false;
@@ -756,7 +756,7 @@ int check_labels_dir_nosmack(const char *fpath, const struct stat *sb,
 
     free(label_gen);
 
-    RUNNER_ASSERT_MSG(is_dir, "Error autogenerated label is not in dirs db.");
+    RUNNER_ASSERT_MSG_BT(is_dir, "Error autogenerated label is not in dirs db.");
 
     return 0;
 }
@@ -776,22 +776,22 @@ RUNNER_TEST_NOSMACK(privilege_control18_app_setup_path_public_nosmack)
     int result;
 
     result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "Unable to clean up Smack labels in " << TEST_APP_DIR << ". Result: " << result);
 
     result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "Unable to clean up Smack labels in " << TEST_NON_APP_DIR << ". Result: " << result);
 
     DB_BEGIN
 
     result = perm_app_setup_path(APP_ID, TEST_APP_DIR, APP_PATH_PUBLIC_RO);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_setup_path() failed. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_setup_path() failed. Result: " << result);
 
     DB_END
 
     result = nftw(TEST_NON_APP_DIR, &nftw_check_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "Unable to check Smack labels for non-app dir. Result: " << result);
 
 }
@@ -806,22 +806,22 @@ RUNNER_TEST_NOSMACK(privilege_control19_app_setup_path_settings_nosmack)
     int result;
 
     result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "Unable to clean up Smack labels in " << TEST_APP_DIR << ". Result: " << result);
 
     result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "Unable to clean up Smack labels in " << TEST_NON_APP_DIR << ". Result: " << result);
 
     DB_BEGIN
 
     result = perm_app_setup_path(APP_ID, TEST_APP_DIR, APP_PATH_SETTINGS_RW);
-    RUNNER_ASSERT_MSG(result == 0, "perm_app_setup_path() failed. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "perm_app_setup_path() failed. Result: " << result);
 
     DB_END
 
     result = nftw(TEST_NON_APP_DIR, &nftw_check_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "Unable to check Smack labels for non-app dir. Result: " << result);
 
 }
@@ -841,20 +841,20 @@ RUNNER_TEST_NOSMACK(privilege_control20_app_setup_path_npruntime_nosmack)
     DB_BEGIN
 
     result = perm_app_uninstall(APP_NPRUNTIME);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Error in perm_app_uninstall. " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Error in perm_app_uninstall. " << result);
 
     result = perm_app_install(APP_NPRUNTIME);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Error in perm_app_install. " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Error in perm_app_install. " << result);
 
     result = perm_app_setup_path(APP_NPRUNTIME, APP_NPRUNTIME_FILE, PERM_APP_PATH_NPRUNTIME);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Error in perm_app_setup_path. " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Error in perm_app_setup_path. " << result);
 
     DB_END
 
-    RUNNER_ASSERT(0 == smack_lgetlabel(APP_NPRUNTIME_FILE, &label, SMACK_LABEL_EXEC));
+    RUNNER_ASSERT_BT(0 == smack_lgetlabel(APP_NPRUNTIME_FILE, &label, SMACK_LABEL_EXEC));
     labelPtr.reset(label);
     label = NULL;
-    RUNNER_ASSERT(0 == strcmp(labelPtr.get(), nptargetlabel.c_str()));
+    RUNNER_ASSERT_BT(0 == strcmp(labelPtr.get(), nptargetlabel.c_str()));
 
     // Rules to test
     const std::vector< std::vector<std::string> > np_rules = {
@@ -869,13 +869,13 @@ RUNNER_TEST_NOSMACK(privilege_control20_app_setup_path_npruntime_nosmack)
 
     // Check if accesses aren't added
     result = test_have_nosmack_accesses(np_rules);
-    RUNNER_ASSERT_MSG(result == -1, "Accesses shouldn't be added. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == -1, "Accesses shouldn't be added. Result: " << result);
 
     DB_BEGIN
 
     // Uninstall app runtime
     result = perm_app_uninstall(APP_NPRUNTIME);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Error in perm_app_uninstall. " << result);
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "Error in perm_app_uninstall. " << result);
 
     DB_END
 }
@@ -888,19 +888,19 @@ RUNNER_TEST_NOSMACK(privilege_control20_app_setup_path_npruntime_nosmack)
 RUNNER_TEST_NOSMACK(privilege_control21b_incorrect_params_smack_pid_have_access_nosmack)
 {
     int result = smack_pid_have_access(PID_CORRECT, "some_object", NULL);
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
             "smack_pid_have_access should return access granted. Result: " << result);
 
     result = smack_pid_have_access(PID_CORRECT, NULL, "rw");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
             "smack_pid_have_access should return access granted. Result: " << result);
 
     result = smack_pid_have_access(PID_CORRECT, NULL, "rw");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
             "smack_pid_have_access should return access granted. Result: " << result);
 
     result = smack_pid_have_access(PID_INCORRECT, "some_object", "rw");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
             "smack_pid_have_access should return access granted. Result: " << result);
 }
 
index e640c1f..51fff47 100644 (file)
@@ -92,23 +92,23 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
 
     // Clear any previously created apps, files, labels and permissions
     result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
                   "Unable to clean up Smack labels in: " << TEST_APP_DIR
                   << ". Result: " << result);
 
     result = nftw(TEST_NON_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
                   "Unable to clean up Smack labels in: " << TEST_NON_APP_DIR
                   << ". Result: " << result);
 
     DB_BEGIN
 
     result = perm_app_revoke_permissions(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_app_revoke_permissions. Result: " << result);
 
     result = perm_app_uninstall(APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_app_uninstall. Result: " << result);
 
     // remove api features by deleting files
@@ -118,44 +118,44 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
 
     // Install setting app and give it app-setting permissions
     result = perm_app_revoke_permissions(APP_TEST_SETTINGS_ASP1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_app_revoke_permissions. Result: " << result);
     result = perm_app_uninstall(APP_TEST_SETTINGS_ASP1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_app_uninstall. Result: " << result);
     result = perm_app_install(APP_TEST_SETTINGS_ASP1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_app_install. Result: " << result);
     result = perm_app_setup_permissions(APP_TEST_SETTINGS_ASP1,
                                         APP_TYPE_OSP, PRIV_APPSETTING);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error enabling App-Setting permissions. Result: " << result);
 
     // Install one additional app (used to check perm to shared directories)
     result = perm_app_revoke_permissions(TEST_OSP_FEATURE_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_app_revoke_permissions. Result: " << result);
     result = perm_app_uninstall(TEST_OSP_FEATURE_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_app_uninstall. Result: " << result);
     result = perm_app_install(TEST_OSP_FEATURE_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_app_install. Result: " << result);
     result = perm_app_setup_permissions(TEST_OSP_FEATURE_APP_ID,
                                         APP_TYPE_OSP,(const char*[]) {NULL});
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error enabling permissions. Result: " << result);
 
     // Register two valid api features
     result = perm_add_api_feature(APP_TYPE_OSP, TEST_OSP_FEATURE,
                                   test_osp_feature_rule_set, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_add_api_feature. Cannot add TEST_OSP_FEATURE: "
                   << TEST_OSP_FEATURE << ". Result: " << result);
 
     result = perm_add_api_feature(APP_TYPE_WGT, TEST_WGT_FEATURE,
                                   test_wgt_feature_rule_set, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_add_api_feature. Cannot add TEST_WGT_FEATURE: "
                   << TEST_WGT_FEATURE << ". Result: " << result);
 
@@ -169,20 +169,20 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
 
         // Add application
         result = perm_app_install(APP_ID);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_install. Loop index: " << i
                           << ". Result: " << result);
 
         // Add persistent permissions
         result = perm_app_setup_permissions(APP_ID, APP_TYPE_OSP,
                                             TEST_OSP_FEATURE_PRIVS);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
            "Error in perm_app_setup_permissions from OSP Feature. Loop index: "
            << i << ". Result: " << result);
 
         result = perm_app_setup_permissions(APP_ID, APP_TYPE_WGT,
                                             TEST_WGT_FEATURE_PRIVS);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
            "Error in perm_app_setup_permissions from WGT Feature. Loop index: "
            << i << ". Result: " << result);
 
@@ -198,14 +198,14 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
             // Add app shared dir - APP_PATH_PRIVATE
             result = perm_app_setup_path(APP_ID, TEST_APP_DIR,
                                          APP_PATH_PRIVATE);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                              "Error in perm_app_setup_path. Loop index: " << i
                              << ". Result: " << result);
 
             // Add app shared dir - APP_PATH_PUBLIC_RO
             result = perm_app_setup_path(APP_ID, TEST_NON_APP_DIR,
                                          APP_PATH_PUBLIC_RO);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                              "Error in perm_app_setup_path. Loop index: " << i
                              << ". Result: " << result);
 
@@ -214,7 +214,7 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
             // Verify that some previously installed app does not have any access
             // to APP_ID private label
             result = test_have_any_accesses(rules_to_test_any_access1);
-            RUNNER_ASSERT_MSG(result == 0,
+            RUNNER_ASSERT_MSG_BT(result == 0,
                "Error - other app has access to private label. Loop index: "
                << i);
 
@@ -222,7 +222,7 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
             char *label;
             result = smack_getlabel(TEST_NON_APP_DIR, &label,
                                     SMACK_LABEL_ACCESS );
-            RUNNER_ASSERT_MSG(result == 0,
+            RUNNER_ASSERT_MSG_BT(result == 0,
                "Cannot get access label from Public RO shared dir. Loop index: "
                 << i << ". Result: " << result);
             shared_dir_auto_label = label;
@@ -231,12 +231,12 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
             // Verify that all permissions to public dir have been added
             // correctly, also to other app
             result = smack_have_access(APP_ID, shared_dir_auto_label.c_str(), "rwxatl");
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                    "Not all accesses to Public RO dir are granted. Loop index: "
                    << i);
 
             result = smack_have_access(TEST_OSP_FEATURE_APP_ID, shared_dir_auto_label.c_str(), "rx" );
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                    "Not all accesses to Public RO dir are granted. Loop index: "
                    << i);
 
@@ -249,14 +249,14 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
             // Add app shared dir - APP_PATH_SETTINGS_RW
             result = perm_app_setup_path(APP_ID, TEST_APP_DIR,
                                          APP_PATH_SETTINGS_RW);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                              "Error in perm_app_setup_path. Loop index: " << i
                              << ". Result: " << result);
 
             // Add app shared dir - APP_PATH_GROUP_RW
             result = perm_app_setup_path(APP_ID, TEST_NON_APP_DIR,
                                          APP_PATH_GROUP_RW, APPID_SHARED_DIR);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                              "Error in perm_app_setup_path. Loop index: " << i
                              << ". Result: " << result);
 
@@ -266,7 +266,7 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
             char *label;
             result = smack_getlabel(TEST_APP_DIR, &label,
                                     SMACK_LABEL_ACCESS );
-            RUNNER_ASSERT_MSG(result == 0,
+            RUNNER_ASSERT_MSG_BT(result == 0,
              "Cannot get access label from App-Setting shared dir. Loop index: "
              << i << ". Result: " << result);
             shared_dir_auto_label = label;
@@ -275,19 +275,19 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
             // Verify that setting app has rwx permission to app dir
             // and rx permissions to app
             result = smack_have_access(APP_ID, shared_dir_auto_label.c_str(), "rwxatl");
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted. "
                  << APP_ID << " "<< shared_dir_auto_label << " rwxatl "
                  << "Loop index: " << i);
 
             result = smack_have_access(APP_TEST_SETTINGS_ASP1, shared_dir_auto_label.c_str(), "rwx");
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted. "
                  << APP_TEST_SETTINGS_ASP1 << " " << shared_dir_auto_label << " rwx. "
                  << "Loop index: " << i);
 
             result = smack_have_access(APP_TEST_SETTINGS_ASP1, APP_ID, "rx");
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted. "
                  << APP_TEST_SETTINGS_ASP1 << " " <<  APP_ID <<  " rx"
                  << "Loop index: " << i);
@@ -295,7 +295,7 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
             // Verify that all permissions to public dir have been added
             // correctly, also to other app
             result = smack_have_access(APP_ID, APPID_SHARED_DIR, "rwxatl");
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to Group RW dir are granted. Loop index: "
                   << i);
 
@@ -308,36 +308,36 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
                  (const std::vector< std::vector<std::string> >) {
                   { APP_ID, TEST_OSP_FEATURE_APP_ID, "rxl" },
                   { APP_ID, TEST_WGT_FEATURE_APP_ID, "rwxl" } } );
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
                       "Not all permisions from api features added. Loop index: "
                       << i);
 
         // revoke permissions
         result = perm_app_revoke_permissions(APP_ID);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                      "Error in perm_app_revoke_permissions. Loop index: " << i
                      << ". Result: " << result);
 
         // check if api-features permissions are removed properly
         result = test_have_any_accesses(rules_to_test_any_access2);
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
                      "Not all permisions revoked. Loop index: " << i);
 
         // remove labels from app folder
         result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
                       "Unable to clean up Smack labels in " << TEST_APP_DIR
                       << " . Loop index: " << i << ". Result: " << result);
         // remove labels from shared folder
         result = nftw(TEST_NON_APP_DIR, &nftw_remove_labels,
                       FTW_MAX_FDS, FTW_PHYS);
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
                       "Unable to clean up Smack labels in " << TEST_NON_APP_DIR
                       << " . Loop index: " << i << ". Result: " << result);
 
         // uninstall app
         result = perm_app_uninstall(APP_ID);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                       "Error in perm_app_uninstall. Loop index: " << i
                       << ". Result: " << result);
     } // END Install app loop
@@ -346,10 +346,10 @@ RUNNER_TEST(privilege_control22_app_installation_1x100)
 
     // Uninstall setting app and additional app
     result = perm_app_uninstall(TEST_OSP_FEATURE_APP_ID);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                       "Error in perm_app_uninstall. Result: " << result);
     result = perm_app_uninstall(APP_TEST_SETTINGS_ASP1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                       "Error in perm_app_uninstall. Result: " << result);
 
     DB_END
@@ -411,7 +411,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
     for (int i = 0; i < app_count; ++i)
     {
         result = sprintf(app_ids[i], APP_ID "%d", i);
-        RUNNER_ASSERT_MSG(result > 0, "Cannot generate name for app nr: " << i);
+        RUNNER_ASSERT_MSG_BT(result > 0, "Cannot generate name for app nr: " << i);
     }
 
     DB_BEGIN
@@ -420,45 +420,45 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
     for (int i = 0; i < app_count; ++i)
     {
         result = perm_app_revoke_permissions(app_ids[i]);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_revoke_permissions for app: "
                           << app_ids[i] << ". Result: " << result);
 
         result = perm_app_uninstall(app_ids[i]);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_uninstall for app: "
                           << app_ids[i] << ". Result: " << result);
     }
 
     // Install setting app and give it app-setting permissions
     result = perm_app_revoke_permissions(APP_TEST_SETTINGS_ASP1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                       "Error in perm_app_revoke_permissions."
                       << " Result: " << result);
     result = perm_app_uninstall(APP_TEST_SETTINGS_ASP1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                       "Error in perm_app_uninstall."
                       << " Result: " << result);
     result = perm_app_install(APP_TEST_SETTINGS_ASP1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                       "Error in perm_app_install."
                       << " Result: " << result);
     result = perm_app_setup_permissions(APP_TEST_SETTINGS_ASP1,
                                         APP_TYPE_OSP, PRIV_APPSETTING);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                       "Error registering App-Setting permissions."
                       << " Result: " << result);
 
     // Register two valid api features
     result = perm_add_api_feature(APP_TYPE_OSP, TEST_OSP_FEATURE,
                                   test_osp_feature_rule_set2, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_add_api_feature. Cannot add TEST_OSP_FEATURE: "
                   << TEST_OSP_FEATURE << ". Result: " << result);
 
     result = perm_add_api_feature(APP_TYPE_WGT, TEST_WGT_FEATURE,
                                   test_wgt_feature_rule_set2, NULL, 0);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                   "Error in perm_add_api_feature. Cannot add TEST_WGT_FEATURE: "
                   << TEST_WGT_FEATURE << ". Result: " << result);
 
@@ -474,7 +474,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
         for (int j = 0; j < app_count; ++j)
         {
             result = perm_app_install(app_ids[j]);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                               "Error in perm_app_install. App id: "
                               << app_ids[j]
                               << " Loop index: " << i
@@ -482,14 +482,14 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
 
             // Create 10 directories
             result = sprintf(app_dirs[j],"/tmp/" APP_ID "%d_%d", j, i);
-            RUNNER_ASSERT_MSG(result > 0,
+            RUNNER_ASSERT_MSG_BT(result > 0,
                               "Cannot generate directory name for app nr: " << j
                               << " Loop index: " << i);
             result = mkdir(app_dirs[j], S_IRWXU | S_IRGRP | S_IXGRP);
-            RUNNER_ASSERT_MSG(result == 0 || errno == EEXIST,
+            RUNNER_ASSERT_MSG_BT(result == 0 || errno == EEXIST,
                               "Cannot create directory: " << app_dirs[j]);
             result = nftw(app_dirs[j], &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
-            RUNNER_ASSERT_MSG(result == 0,
+            RUNNER_ASSERT_MSG_BT(result == 0,
                          "Unable to clean up Smack labels in: " << app_dirs[j]
                          << ". Result: " << result);
         }
@@ -500,70 +500,70 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
             // add persistent api feature permissions
             result = perm_app_setup_permissions(app_ids[j], APP_TYPE_OSP,
                                                 TEST_OSP_FEATURE_PRIVS);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                "Error in perm_app_setup_permissions from OSP Feature. App id: "
                << app_ids[j] << " Loop index: " << i << ". Result: " << result);
 
             result = perm_app_setup_permissions(app_ids[j+5], APP_TYPE_WGT,
                                                 TEST_WGT_FEATURE_PRIVS);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                "Error in perm_app_setup_permissions from WGT Feature. App id: "
                << app_ids[j+5] << " Loop index: " << i << ". Result: " << result);
         }
 
         // Add app shared dirs - APP_PATH_PRIVATE (apps 0, 5)
         result = perm_app_setup_path(app_ids[0], app_dirs[0], APP_PATH_PRIVATE);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[0]
                           << " Loop index: " << i << ". Result: " << result);
         result = perm_app_setup_path(app_ids[5], app_dirs[5], APP_PATH_PRIVATE);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[5]
                           << " Loop index: " << i << ". Result: " << result);
 
         // Add app shared dir - APP_PATH_GROUP_RW (apps 1, 2, 6)
         result = perm_app_setup_path(app_ids[1], app_dirs[1],
                                      APP_PATH_GROUP_RW, APPID_SHARED_DIR);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[1]
                           << " Loop index: " << i << ". Result: " << result);
         result = perm_app_setup_path(app_ids[2], app_dirs[2],
                                      APP_PATH_GROUP_RW, APPID_SHARED_DIR);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[2]
                           << " Loop index: " << i << ". Result: " << result);
         result = perm_app_setup_path(app_ids[6], app_dirs[6],
                                      APP_PATH_GROUP_RW, APPID_SHARED_DIR);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[6]
                           << " Loop index: " << i << ". Result: " << result);
 
         // Add app shared dir - APP_PATH_PUBLIC_RO (apps 3, 7, 8)
         result = perm_app_setup_path(app_ids[3], app_dirs[3],
                                      APP_PATH_PUBLIC_RO);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[1]
                           << " Loop index: " << i << ". Result: " << result);
         result = perm_app_setup_path(app_ids[7], app_dirs[7],
                                      APP_PATH_PUBLIC_RO);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[7]
                           << " Loop index: " << i << ". Result: " << result);
         result = perm_app_setup_path(app_ids[8], app_dirs[8],
                                      APP_PATH_PUBLIC_RO);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[8]
                           << " Loop index: " << i << ". Result: " << result);
 
         // Add app shared dir - APP_PATH_SETTINGS_RW (apps ,4, 9)
         result = perm_app_setup_path(app_ids[4], app_dirs[4],
                                      APP_PATH_SETTINGS_RW);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[4]
                           << " Loop index: " << i << ". Result: " << result);
         result = perm_app_setup_path(app_ids[9], app_dirs[9],
                                      APP_PATH_SETTINGS_RW);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                           "Error in perm_app_setup_path. App id: " << app_ids[9]
                           << " Loop index: " << i << ". Result: " << result);
 
@@ -579,7 +579,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                 result = test_have_any_accesses(
                            FMT_VECTOR_TO_TEST_ANY_ACCESS(app_ids[j], app_ids[0])
                            );
-                RUNNER_ASSERT_MSG(result == 0,
+                RUNNER_ASSERT_MSG_BT(result == 0,
                        "Other app (app id: " << app_ids[j] <<
                        ") has access to private label of: " << app_ids[0] <<
                        ". It may not be shared. Loop index: " << i << ".");
@@ -591,7 +591,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                 result = test_have_any_accesses(
                            FMT_VECTOR_TO_TEST_ANY_ACCESS(app_ids[j], app_ids[5])
                            );
-                RUNNER_ASSERT_MSG(result == 0,
+                RUNNER_ASSERT_MSG_BT(result == 0,
                        "Other app (app id: " << app_ids[j] <<
                        ") has access to private label of: " << app_ids[5] <<
                        ". It may not be shared. Loop index: " << i << ".");
@@ -604,7 +604,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                                 { app_ids[1], APPID_SHARED_DIR, "rwxatl" },
                                 { app_ids[2], APPID_SHARED_DIR, "rwxatl" },
                                 { app_ids[6], APPID_SHARED_DIR, "rwxatl" } } );
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
                     "Not all accesses to Group RW dir are granted. Loop index: "
                     << i);
 
@@ -612,7 +612,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
         char *label;
         result = smack_getlabel(app_dirs[3], &label,
                                 SMACK_LABEL_ACCESS );
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
             "Cannot get access label from Public RO shared dir: " << app_dirs[3]
             << " . Loop index: " << i << ". Result: " << result);
         shared_dir3_auto_label = label;
@@ -620,7 +620,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
 
         result = smack_getlabel(app_dirs[7], &label,
                                 SMACK_LABEL_ACCESS );
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
             "Cannot get access label from Public RO shared dir: " << app_dirs[7]
             << " . Loop index: " << i << ". Result: " << result);
         shared_dir7_auto_label = label;
@@ -628,7 +628,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
 
         result = smack_getlabel(app_dirs[8], &label,
                                 SMACK_LABEL_ACCESS );
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
             "Cannot get access label from Public RO shared dir: " << app_dirs[8]
             << " . Loop index: " << i << ". Result: " << result);
         shared_dir8_auto_label = label;
@@ -643,7 +643,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                 result = test_have_all_accesses(
                           (const std::vector< std::vector<std::string> >) {
                            { app_ids[j], shared_dir3_auto_label.c_str(), "rwxatl" } } );
-                RUNNER_ASSERT_MSG(result == 1,
+                RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to owned Public RO dir are granted. App id: "
                  << app_ids[j] << "  Loop index: " << i);
                 // Verify that there are no extra permissions to public dirs
@@ -653,7 +653,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                                 { app_ids[j], shared_dir7_auto_label.c_str(), "t" },
                                 { app_ids[j], shared_dir8_auto_label.c_str(), "w" },
                                 { app_ids[j], shared_dir8_auto_label.c_str(), "t" } } );
-                RUNNER_ASSERT_MSG(result == 0,
+                RUNNER_ASSERT_MSG_BT(result == 0,
                      "Unexpected extra permissions added for app:" << app_ids[j]
                      << ". Loop index: " << i);
             }
@@ -662,7 +662,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                 result = test_have_all_accesses(
                           (const std::vector< std::vector<std::string> >) {
                            { app_ids[j], shared_dir7_auto_label.c_str(), "rwxatl" } } );
-                RUNNER_ASSERT_MSG(result == 1,
+                RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to owned Public RO dir are granted. App id: "
                  << app_ids[j] << " Loop index: " << i);
                 // Verify that there are no extra permissions to public dirs
@@ -672,7 +672,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                                 { app_ids[j], shared_dir3_auto_label.c_str(), "t" },
                                 { app_ids[j], shared_dir8_auto_label.c_str(), "w" },
                                 { app_ids[j], shared_dir8_auto_label.c_str(), "t" } } );
-                RUNNER_ASSERT_MSG(result == 0,
+                RUNNER_ASSERT_MSG_BT(result == 0,
                      "Unexpected extra permissions added for app:" << app_ids[j]
                      << ". Loop index: " << i);
             }
@@ -681,7 +681,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                 result = test_have_all_accesses(
                           (const std::vector< std::vector<std::string> >) {
                            { app_ids[j], shared_dir8_auto_label.c_str(), "rwxatl" } } );
-                RUNNER_ASSERT_MSG(result == 1,
+                RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to owned Public RO dir are granted. App id: "
                  << app_ids[j] << "  Loop index: " << i);
                 // Verify that there are no extra permissions to other public dirs
@@ -691,7 +691,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                                 { app_ids[j], shared_dir3_auto_label.c_str(), "t" },
                                 { app_ids[j], shared_dir7_auto_label.c_str(), "w" },
                                 { app_ids[j], shared_dir7_auto_label.c_str(), "t" } } );
-                RUNNER_ASSERT_MSG(result == 0,
+                RUNNER_ASSERT_MSG_BT(result == 0,
                      "Unexpected extra permissions added for app:" << app_ids[j]
                      << ". Loop index: " << i);
             }
@@ -701,7 +701,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                              { app_ids[j], shared_dir3_auto_label.c_str(), "rx" },
                              { app_ids[j], shared_dir7_auto_label.c_str(), "rx" },
                              { app_ids[j], shared_dir8_auto_label.c_str(), "rx" } } );
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                       "Not all accesses to Public RO dirs are granted. App id: "
                       << app_ids[j] << ". Loop index: " << i);
         } // End for Verify PUBLIC_RO
@@ -709,7 +709,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
         // Get autogenerated SETTING_RW labels
         result = smack_getlabel(app_dirs[4], &label,
                                 SMACK_LABEL_ACCESS );
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
                          "Cannot get access label from App-Setting shared dir: "
                          << app_dirs[4] << " . Loop index: " << i
                          << ". Result: " << result);
@@ -718,7 +718,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
 
         result = smack_getlabel(app_dirs[9], &label,
                                 SMACK_LABEL_ACCESS );
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
                          "Cannot get access label from App-Setting shared dir: "
                          << app_dirs[9] << " . Loop index: " << i
                          << ". Result: " << result);
@@ -727,32 +727,32 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
 
         // Verify that setting app has rwx permission to app-settings dirs and rx to apps
         result = smack_have_access(app_ids[4], setting_dir4_auto_label.c_str(), "rwxatl");
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted."
                  << app_ids[4] << " " << setting_dir4_auto_label
                  << " Loop index: " << i);
         result = smack_have_access(app_ids[9], setting_dir9_auto_label.c_str(), "rwxatl");
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted."
                  << app_ids[9] << " " << setting_dir9_auto_label
                  << " Loop index: " << i);
         result = smack_have_access(APP_TEST_SETTINGS_ASP1, app_ids[4], "rx");
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted."
                  << APP_TEST_SETTINGS_ASP1 << " " << app_ids[4]
                  << " Loop index: " << i);
         result = smack_have_access(APP_TEST_SETTINGS_ASP1, app_ids[9], "rx");
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted."
                  << APP_TEST_SETTINGS_ASP1 << " " << app_ids[9]
                  << " Loop index: " << i);
         result = smack_have_access(APP_TEST_SETTINGS_ASP1, setting_dir4_auto_label.c_str(), "rwx");
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted."
                  << APP_TEST_SETTINGS_ASP1 << " " << setting_dir4_auto_label
                  << " Loop index: " << i);
         result = smack_have_access(APP_TEST_SETTINGS_ASP1, setting_dir9_auto_label.c_str(), "rwx");
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
                  "Not all accesses to App-Setting dir are granted."
                  << APP_TEST_SETTINGS_ASP1 << " " << setting_dir9_auto_label
                  << " Loop index: " << i);
@@ -768,7 +768,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                                 { app_ids[j], app_ids[7], "rxl" },
                                 { app_ids[j], app_ids[8], "rwxal" },
                                 { app_ids[j], app_ids[9], "rwxatl" } } );
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                        "Not all permisions from api features added for app id: "
                        << app_ids[j] << ". Loop index: " << i);
         }
@@ -781,7 +781,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                                 { app_ids[j], app_ids[2], "rxl" },
                                 { app_ids[j], app_ids[3], "rwxal" },
                                 { app_ids[j], app_ids[4], "rwxatl" } } );
-            RUNNER_ASSERT_MSG(result == 1,
+            RUNNER_ASSERT_MSG_BT(result == 1,
                        "Not all permisions from api features added for app id: "
                        << app_ids[j] << ". Loop index: " << i);
         }
@@ -792,7 +792,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
         for (int j = 0; j < app_count; ++j)
         {
             result = perm_app_revoke_permissions(app_ids[j]);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                               "Error in perm_app_revoke_permissions. App id: "
                               << app_ids[j] << " Loop index: " << i
                               << ". Result: " << result);
@@ -810,7 +810,7 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
                 result = test_have_any_accesses(
                            FMT_VECTOR_TO_TEST_ANY_ACCESS(app_ids[j], app_ids[k])
                            );
-                RUNNER_ASSERT_MSG(result == 0,
+                RUNNER_ASSERT_MSG_BT(result == 0,
                           "Not all permisions revoked. Subject: " << app_ids[j]
                           << " Object: " << app_ids[k] << " Loop index: " << i);
             }
@@ -823,13 +823,13 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
         {
             result = nftw(app_dirs[j], &nftw_remove_labels,
                           FTW_MAX_FDS, FTW_PHYS); // rm labels from app folder
-            RUNNER_ASSERT_MSG(result == 0,
+            RUNNER_ASSERT_MSG_BT(result == 0,
                               "Unable to clean up Smack labels in: "
                               << app_dirs[j] << " . Loop index: " << i
                               << ". Result: " << result);
 
             result = perm_app_uninstall(app_ids[j]);
-            RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+            RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                               "Error in perm_app_uninstall for app: "
                               << app_ids[j] << " . Loop index: " << i
                               << ". Result: " << result);
@@ -841,14 +841,14 @@ RUNNER_TEST(privilege_control23_app_installation2_10x10)
         for (int j = 0; j < app_count; ++j)
         {
             result = rmdir(app_dirs[j]);
-            RUNNER_ASSERT_MSG(result == 0,
+            RUNNER_ASSERT_MSG_BT(result == 0,
                               "Cannot remove directory: " << app_dirs[j]);
         }
     } // END Install app loop
 
     // Uninstall setting app
     result = perm_app_uninstall(APP_TEST_SETTINGS_ASP1);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS,
                       "Error in perm_app_uninstall. Result: " << result);
 
 }
index 0a48b28..08cbadc 100644 (file)
@@ -105,7 +105,7 @@ void clean_up()
 {
     struct smack_accesses *rules = NULL;
     int result = smack_accesses_new(&rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     // CLEAN UP
     smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"","rwxat");
@@ -113,11 +113,11 @@ void clean_up()
     smack_accesses_free(rules);
 
     // PREINIT CHECK.
-    RUNNER_ASSERT_MSG(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r") != 1, "Rule has previous privileges after cleaning up!");
-    RUNNER_ASSERT_MSG(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"w") != 1, "Rule has previous privileges after cleaning up!");
-    RUNNER_ASSERT_MSG(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"x") != 1, "Rule has previous privileges after cleaning up!");
-    RUNNER_ASSERT_MSG(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"a") != 1, "Rule has previous privileges after cleaning up!");
-    RUNNER_ASSERT_MSG(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"t") != 1, "Rule has previous privileges after cleaning up!");
+    RUNNER_ASSERT_MSG_BT(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r") != 1, "Rule has previous privileges after cleaning up!");
+    RUNNER_ASSERT_MSG_BT(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"w") != 1, "Rule has previous privileges after cleaning up!");
+    RUNNER_ASSERT_MSG_BT(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"x") != 1, "Rule has previous privileges after cleaning up!");
+    RUNNER_ASSERT_MSG_BT(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"a") != 1, "Rule has previous privileges after cleaning up!");
+    RUNNER_ASSERT_MSG_BT(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"t") != 1, "Rule has previous privileges after cleaning up!");
 }
 
 /**
@@ -153,7 +153,7 @@ void removeAccessesAll()
 {
     struct smack_accesses *rules = NULL;
     int result = smack_accesses_new(&rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     result = smack_accesses_add_modify(rules, "test_subject_01", "test_object_01", "", "rxwat");
     result = smack_accesses_add_modify(rules, "test_subject_01", "test_object_02", "", "rxwat");
@@ -166,7 +166,7 @@ void removeAccessesAll()
     result = smack_accesses_add_modify(rules, "test_subject_03", "test_object_03", "", "rxwat");
 
     smack_accesses_apply(rules);
-    RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
     smack_accesses_free(rules);
 }
 
@@ -184,11 +184,11 @@ RUNNER_TEST_SMACK(smack_accesses_add_modify_test_1){
 
     // THE TEST
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"xr","");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add modify by empty rules");
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add modify by empty rules");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,"xr");
-    RUNNER_ASSERT_MSG(result == 1, "Rule modified (added 'xr'), but no change made.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Rule modified (added 'xr'), but no change made.");
 
     // CLEAN UP
     clean_up();
@@ -203,19 +203,19 @@ RUNNER_TEST_SMACK(smack_accesses_add_modify_test_2){
     int result;
     struct smack_accesses *rules = NULL;
     result = smack_accesses_new(&rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     clean_up();
 
     // THE TEST
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"r","");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
 
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"","r");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
 
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
-    RUNNER_ASSERT_MSG(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r") == 0, "Modification didn't work");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r") == 0, "Modification didn't work");
 
     // CLEAN UP
     clean_up();
@@ -231,27 +231,27 @@ RUNNER_TEST_SMACK(smack_accesses_add_modify_test_3){
     int result;
     struct smack_accesses *rules = NULL;
     result = smack_accesses_new(&rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     clean_up();
 
     // THE TEST
     // Add r privilage
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"r","");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
-    RUNNER_ASSERT_MSG(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r") == 1, "Adding privileges didn't work");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r") == 1, "Adding privileges didn't work");
     smack_accesses_free(rules);
 
     // Revoke r privilege
     result = smack_accesses_new(&rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"","r");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r");
-    RUNNER_ASSERT_MSG(result == 0, "Modification didn't work, rule has still 'r' privileges.");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Modification didn't work, rule has still 'r' privileges.");
 
     // CLEAN UP
     clean_up();
@@ -265,23 +265,23 @@ RUNNER_TEST_SMACK(smack_accesses_add_modify_test_4){
     int result;
     struct smack_accesses *rules = NULL;
     result = smack_accesses_new(&rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     clean_up();
 
     // THE TEST
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"rwxat","");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"","r");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,"awxt");
-    RUNNER_ASSERT_MSG(result == 1, "Modification didn't work. Rule should have 'awxt' privileges.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Modification didn't work. Rule should have 'awxt' privileges.");
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r");
-    RUNNER_ASSERT_MSG(result != 1, "Modification didn't work. Rule should NOT have 'r' privilege.");
+    RUNNER_ASSERT_MSG_BT(result != 1, "Modification didn't work. Rule should NOT have 'r' privilege.");
 
     // CLEAN UP
     clean_up();
@@ -296,22 +296,22 @@ RUNNER_TEST_SMACK(smack_accesses_add_modify_test_5){
     int result;
     struct smack_accesses *rules = NULL;
     result = smack_accesses_new(&rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     clean_up();
 
     // THE TEST
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"rwxat","");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
 
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"","r");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,"awxt");
-    RUNNER_ASSERT_MSG(result == 1, "Modification didn't work. Rule should have 'awxt' privileges.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Modification didn't work. Rule should have 'awxt' privileges.");
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r");
-    RUNNER_ASSERT_MSG(result != 1, "Modification didn't work. Rule should NOT have 'r' privilege.");
+    RUNNER_ASSERT_MSG_BT(result != 1, "Modification didn't work. Rule should NOT have 'r' privilege.");
 
     // CLEAN UP
     clean_up();
@@ -326,23 +326,23 @@ RUNNER_TEST_SMACK(smack_accesses_add_modify_test_6){
     int result;
     struct smack_accesses *rules = NULL;
     result = smack_accesses_new(&rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     clean_up();
 
     // THE TEST
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"rwt","");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
     result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,"ax","rt");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule.");
-    RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule.");
+    RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,"wax");
-    RUNNER_ASSERT_MSG(result == 1, "Modification didn't work. Rule should have 'wax' privileges.");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Modification didn't work. Rule should have 'wax' privileges.");
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,"r");
-    RUNNER_ASSERT_MSG(result != 1, "Modification didn't work. Rule should NOT have 'r' privilege.");
+    RUNNER_ASSERT_MSG_BT(result != 1, "Modification didn't work. Rule should NOT have 'r' privilege.");
 
     // CLEAN UP
     clean_up();
@@ -360,13 +360,13 @@ RUNNER_TEST_SMACK(smack_accesses_add_modify_test_7){
 
     for (i = 0; i < accessesBasic.size(); ++i) {
         result = smack_accesses_new(&rules);
-        RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
         result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,accessesBasic[i].c_str(),accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to modify accesses instance");
-        RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify accesses instance");
+        RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
-        RUNNER_ASSERT_MSG(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT),
+        RUNNER_ASSERT_MSG_BT(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT),
             " Error while checking smack access. Accesses exist.");
 
         // CLEAN UP
@@ -387,33 +387,33 @@ RUNNER_TEST_SMACK(smack_revoke_subject_test_1){
     for (i = 0; i < accessesBasic.size(); ++i) {
         // Creating and adding rules with TEST_OBJECT and TEST_OBJECT_2
         result = smack_accesses_new(&rules);
-        RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
         result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT,accessesBasic[i].c_str(),"");
         result = smack_accesses_add_modify(rules,TEST_SUBJECT, TEST_OBJECT_2,accessesBasic[i].c_str(),"");
-        RUNNER_ASSERT_MSG(result == 0, "Unable to modify accesses instance");
-        RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify accesses instance");
+        RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 1, "Modification didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
+        RUNNER_ASSERT_MSG_BT(result == 1, "Modification didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT_2,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 1, "Modification didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
+        RUNNER_ASSERT_MSG_BT(result == 1, "Modification didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
 
         // Revoking subject
         result = smack_revoke_subject(TEST_SUBJECT);
-        RUNNER_ASSERT_MSG(result == 0, "Revoking subject didn't work.");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Revoking subject didn't work.");
 
-        RUNNER_ASSERT_MSG(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT),
+        RUNNER_ASSERT_MSG_BT(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT),
             " Revoke didn't work. Accesses exist.");
-        RUNNER_ASSERT_MSG(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT_2),
+        RUNNER_ASSERT_MSG_BT(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT_2),
             " Revoke didn't work. Accesses exist.");
 
 
         // Revoking subject again
         result = smack_revoke_subject(TEST_SUBJECT);
-        RUNNER_ASSERT_MSG(result == 0, "Revoking subject didn't work.");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Revoking subject didn't work.");
 
-        RUNNER_ASSERT_MSG(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT),
+        RUNNER_ASSERT_MSG_BT(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT),
             " Revoke didn't work. Accesses exist.");
-        RUNNER_ASSERT_MSG(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT_2),
+        RUNNER_ASSERT_MSG_BT(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT_2),
             " Revoke didn't work. Accesses exist.");
 
         smack_accesses_free(rules);
@@ -432,49 +432,49 @@ RUNNER_TEST_SMACK(smack_accesses_clear_test_1){
     for (i = 0; i < accessesBasic.size(); ++i) {
         // Creating and adding rules with TEST_OBJECT and TEST_OBJECT_2
         result = smack_accesses_new(&rules);
-        RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
         result = smack_accesses_add(rules,TEST_SUBJECT, TEST_OBJECT,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to modify accesses instance");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify accesses instance");
         result = smack_accesses_add(rules,TEST_SUBJECT, TEST_OBJECT_2,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to modify accesses instance");
-        RUNNER_ASSERT_MSG(smack_accesses_apply(rules) == 0, "Unable to apply rules");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify accesses instance");
+        RUNNER_ASSERT_MSG_BT(smack_accesses_apply(rules) == 0, "Unable to apply rules");
 
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 1, "Modification didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
+        RUNNER_ASSERT_MSG_BT(result == 1, "Modification didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT_2,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 1, "Modification didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
+        RUNNER_ASSERT_MSG_BT(result == 1, "Modification didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
 
         smack_accesses_free(rules);
 
         // Creating and clearing rules with TEST_OBJECT
         result = smack_accesses_new(&rules);
-        RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
         result = smack_accesses_add(rules,TEST_SUBJECT, TEST_OBJECT,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to modify accesses instance");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify accesses instance");
         result = smack_accesses_clear(rules);
-        RUNNER_ASSERT_MSG(result == 0, "Clearing rules didn't work.");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Clearing rules didn't work.");
 
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Clearing rules didn't work. Rule " << accessesBasic[i].c_str() << " does exist.");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Clearing rules didn't work. Rule " << accessesBasic[i].c_str() << " does exist.");
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT_2,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 1, "Clearing rules didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
+        RUNNER_ASSERT_MSG_BT(result == 1, "Clearing rules didn't work. Rule " << accessesBasic[i].c_str() << " does not exist.");
 
         smack_accesses_free(rules);
 
         // Creating and clearing rules with TEST_OBJECT_2
         result = smack_accesses_new(&rules);
-        RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
         result = smack_accesses_add(rules,TEST_SUBJECT, TEST_OBJECT_2,accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to modify accesses instance");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify accesses instance");
         result = smack_accesses_clear(rules);
-        RUNNER_ASSERT_MSG(result == 0, "Clearing rules didn't work.");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Clearing rules didn't work.");
 
         smack_accesses_free(rules);
 
-        RUNNER_ASSERT_MSG(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT),
+        RUNNER_ASSERT_MSG_BT(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT),
             " Clear didn't work. Accesses exist.");
-        RUNNER_ASSERT_MSG(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT_2),
+        RUNNER_ASSERT_MSG_BT(checkNoAccesses(TEST_SUBJECT, TEST_OBJECT_2),
             " Clear didn't work. Accesses exist.");
     }
 }
@@ -498,48 +498,48 @@ RUNNER_TEST(smack01_storing_and_restoring_rules)
 
     //int smack_accesses_new(struct smack_accesses **accesses);
     result = smack_accesses_new(&rules);        //rules struct init
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
     result = smack_accesses_new(&import_test);  //rules struct init
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     //opening files
     fd = open("/tmp/smack01_rules", O_RDWR | O_CREAT | O_TRUNC, 0644);  //for export prepared rules
-    RUNNER_ASSERT_MSG(fd >= 0, "Unable to create /tmp/smack01_rules");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "Unable to create /tmp/smack01_rules");
     tmp = open("/tmp/smack01_tmp", O_RDWR | O_CREAT | O_TRUNC, 0644);   //for import rules exported before
-    RUNNER_ASSERT_MSG(fd >= 0, "Unable to create /tmp/smack01_tmp");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "Unable to create /tmp/smack01_tmp");
     sample = open("/etc/smack/test_smack_rules", O_RDONLY, 0644);             //reference preinstalled rules
-    RUNNER_ASSERT_MSG(sample >= 0, "Unable to open /etc/smack/test_smack_rules");
+    RUNNER_ASSERT_MSG_BT(sample >= 0, "Unable to open /etc/smack/test_smack_rules");
 
     //int smack_accesses_add(struct smack_accesses *handle, const char *subject,
     //               const char *object, const char *access_type);
     result = smack_accesses_add(rules, "writer", "book", "rw");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
     result = smack_accesses_add(rules, "reader", "book", "wx");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
 
     //int smack_accesses_add_modify(struct smack_accesses *handle, const char *subject,
     //               const char *object, const char *access_add, const char *access_del);
     result = smack_accesses_add_modify(rules, "reader", "book", "r", "wx");
-    RUNNER_ASSERT_MSG(0 == result, "Unable to modify smack rules");
+    RUNNER_ASSERT_MSG_BT(0 == result, "Unable to modify smack rules");
 
     //int smack_accesses_save(struct smack_accesses *handle, int fd);
     result = smack_accesses_save(rules, fd);
-    RUNNER_ASSERT_MSG(0 == result, "Unable to save smack_accesses instance in file");
+    RUNNER_ASSERT_MSG_BT(0 == result, "Unable to save smack_accesses instance in file");
 
     //int smack_accesses_add_from_file(struct smack_accesses *accesses, int fd);
     result = lseek(fd, 0, SEEK_SET);
-    RUNNER_ASSERT_MSG(result == 0, "lseek() error");
+    RUNNER_ASSERT_MSG_BT(result == 0, "lseek() error");
     result = smack_accesses_add_from_file(import_test, fd);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to import rules from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to import rules from file");
 
     result = smack_accesses_save(import_test, tmp);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to save smack_accesses instance in file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to save smack_accesses instance in file");
 
     result = files_compare(fd, tmp);    //comparing rules saved in file, restored from it and stored one more time
-    RUNNER_ASSERT_MSG(result == 0, "No match in stored and restored rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "No match in stored and restored rules");
 
     result = files_compare(tmp, sample);    //comparing rules stored in file with reference preinstalled rules
-    RUNNER_ASSERT_MSG(result == 0, "No match in stored rules and pattern file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "No match in stored rules and pattern file");
 
     //void smack_accesses_free(struct smack_accesses *handle);
     smack_accesses_free(rules);
@@ -568,47 +568,47 @@ RUNNER_TEST_SMACK(smack02_aplying_rules_into_kernel)
     int result;                                 //for storing functions results
 
     result = smack_accesses_new(&rules);        //rules struct init
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     //adding test rules to struct
     result = smack_accesses_add(rules, "writer", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
     result = smack_accesses_add(rules, "reader", "book", "r");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
     result = smack_accesses_add(rules, "spy", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
 
     //int smack_accesses_apply(struct smack_accesses *handle);
     result = smack_accesses_apply(rules);       //applying rules to kernel
-    RUNNER_ASSERT_MSG(result == 0, "Unable to apply rules into kernel");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to apply rules into kernel");
 
     //int smack_have_access(const char *subject, const char *object,
     //                  const char *access_type);
     result = smack_have_access("spy", "book", "rwx");       //should have access - rule exist
-    RUNNER_ASSERT_MSG(result == 1, "Error while checking Smack access");
+    RUNNER_ASSERT_MSG_BT(result == 1, "Error while checking Smack access");
     result = smack_have_access("reader", "book", "rwx");    //should have no access - wrong rule, should be "r" only
-    RUNNER_ASSERT_MSG(result == 0, "Error while checking Smack access");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while checking Smack access");
     result = smack_have_access("mars", "book", "rwx");      //should fail - rule not exist
-    RUNNER_ASSERT_MSG(result == -1, "Error while checking Smack access");
+    RUNNER_ASSERT_MSG_BT(result == -1, "Error while checking Smack access");
 
     //int smack_revoke_subject(const char *subject);
     result = smack_revoke_subject("snickers");  //this subject do not exist in kernel rules
-    RUNNER_ASSERT_MSG(result == 0, "Error in removing not existing subject from kernel");
+    RUNNER_ASSERT_MSG_BT(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 removing existing subject from kernel");
+    RUNNER_ASSERT_MSG_BT(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
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in acces aplied to kernel");  //now spy should have no access
 
     result = smack_accesses_add(rules, "twix", "book", "rwx");          //for create new rule as a consequence of use accesses_clear() below
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
 
     //int smack_accesses_clear(struct smack_accesses *handle);
     result = smack_accesses_clear(rules);    //"spy" removed before by using smack_revoke_subject()
-    RUNNER_ASSERT_MSG(result == 0, "Error in clearing rules in kernel");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in clearing rules in kernel");
 
     result = smack_have_access("writer", "book", "rwx");                //testing acces after acces_clear()
-    RUNNER_ASSERT_MSG(result == 0, "Error in acces aplied to kernel");  //now writer also should have no access
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in acces aplied to kernel");  //now writer also should have no access
 
     //free resources
     smack_accesses_free(rules);
@@ -645,22 +645,22 @@ RUNNER_TEST_SMACK(smack03_mixed_rule_string_add)
     int expected;
 
     result = smack_accesses_new(&rules);        //rules struct init
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     //adding test rules with mixed string
     for (i = 0; i < (3 * 8); i += 3) {
         result = smack_accesses_add(rules, rules_tab[i], "book", rules_tab[i + 1]); //using mixed rules from table
-        RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
     }
 
     //clearing
     //FIXME: Using clear() here can cover error in accesses_apply() function
     //result = smack_accesses_clear(rules);
-    //RUNNER_ASSERT_MSG(result == 0, "Error in clearing rules in kernel");
+    //RUNNER_ASSERT_MSG_BT(result == 0, "Error in clearing rules in kernel");
 
     //applying rules to kernel
     result = smack_accesses_apply(rules);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to apply rules into kernel");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to apply rules into kernel");
 
     //checking accesses using normal rules
     for (i = 0; i < (3 * 8); i += 3) {
@@ -669,7 +669,7 @@ RUNNER_TEST_SMACK(smack03_mixed_rule_string_add)
         else
             expected = 1;
         result = smack_have_access(rules_tab[i], "book", rules_tab[i + 2]); //using normal rules from table
-        RUNNER_ASSERT_MSG(result == expected, "Error while checking Smack access");
+        RUNNER_ASSERT_MSG_BT(result == expected, "Error while checking Smack access");
     }
 
     //free resources
@@ -699,7 +699,7 @@ RUNNER_TEST_SMACK(smack04_mixed_rule_string_have_access)
         else
             expected = 1;
         result = smack_have_access(rules_tab[i], "book", rules_tab[i + 1]); //using mixed rules from table
-        RUNNER_ASSERT_MSG(result == expected, "Error while checking Smack access");
+        RUNNER_ASSERT_MSG_BT(result == expected, "Error while checking Smack access");
     }
 }
 
@@ -734,19 +734,19 @@ RUNNER_TEST_SMACK(smack05_self_label)
 
     //int smack_new_label_from_self(char **label);
     result = smack_new_label_from_self(&label);
-    RUNNER_ASSERT_MSG(result >= 0, "Error in getting self label");
+    RUNNER_ASSERT_MSG_BT(result >= 0, "Error in getting self label");
 
     //comparing this label with default one "_"
     result = strcmp(label, def_rule);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong default process label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong default process label");
 
     //comparing this rule with received from /proc/self/attr/current
     fd = open("/proc/self/attr/current", O_RDONLY, 0644);
-    RUNNER_ASSERT_MSG(fd >= 0, "Unable to open /proc/self/attr/current");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "Unable to open /proc/self/attr/current");
     result = read(fd, buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result >= 0, "Error in reading from file /proc/self/attr/current");
+    RUNNER_ASSERT_MSG_BT(result >= 0, "Error in reading from file /proc/self/attr/current");
     result = strncmp(buff, def_rule, result);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong default process rule");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong default process rule");
 
     free(label);
 
@@ -754,21 +754,21 @@ RUNNER_TEST_SMACK(smack05_self_label)
 
     //int smack_set_label_for_self(const char *label);
     result = smack_set_label_for_self("cola");
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting self label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting self label");
 
     //checking new label using smack function
     result = smack_new_label_from_self(&label);
-    RUNNER_ASSERT_MSG(result >= 0, "Error in getting self label");
+    RUNNER_ASSERT_MSG_BT(result >= 0, "Error in getting self label");
     result = strcmp(label, "cola");
-    RUNNER_ASSERT_MSG(result == 0, "Wrong process label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong process label");
 
     //checking new label using /proc/self/attr/current
     result = lseek(fd, 0, SEEK_SET);    //going to the file beginning
-    RUNNER_ASSERT_MSG(result == 0, "lseek() error");
+    RUNNER_ASSERT_MSG_BT(result == 0, "lseek() error");
     result = read(fd, buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result >= 0, "Error in reading from file /proc/self/attr/current");
+    RUNNER_ASSERT_MSG_BT(result >= 0, "Error in reading from file /proc/self/attr/current");
     result = strncmp(buff, "cola", result);
-    RUNNER_ASSERT_MSG(result == 0, "Proces rule in /proc/self/attr/current other than set");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Proces rule in /proc/self/attr/current other than set");
 
     free(label);
     close(fd);
@@ -843,44 +843,44 @@ RUNNER_TEST(smack06_get_set_label)
 
     //preparing environment by restoring default "_" label
     result = smack_setlabel(file_path, "_", SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting ACCESS label for file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //int smack_getlabel(const char *path, char** label,
     //          enum smack_label_type type);
     result = smack_getlabel(file_path, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in getting smack ACCESS label from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
     //get label, should be default "_"
     result = strcmp(label, "_");
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file default label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
     free(label);
     //get label using xattr function
     result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result > 0, "Error in getting xattr from file");
+    RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "_", result);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file default label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
 
 
     //int smack_setlabel(const char *path, const char* label,
     //          enum smack_label_type type);
     result = smack_setlabel(file_path, "fanta", SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting ACCESS label for file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //get label using smack function
     result = smack_getlabel(file_path, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in getting smack ACCESS label from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
     //get label, should be default "fanta"
     result = strcmp(label, "fanta");
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
     free(label);
     //get label using xattr function
     result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result > 0, "Error in getting xattr from file");
+    RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "fanta", result);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
 }
 
 //RUNNER_TEST(smackXX_get_label_exec)
@@ -910,64 +910,64 @@ RUNNER_TEST(smack07_l_get_set_label)
 
     //preparing environment by restoring default "_" label
     result = smack_lsetlabel(file_path, "_", SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting ACCESS label for file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
     result = smack_setlabel(file_path, "_", SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting ACCESS label for file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //int smack_lgetlabel(const char *path, char** label,
     //          enum smack_label_type type);
     result = smack_lgetlabel(file_path, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in getting smack ACCESS label from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
     //get label of symbolic link, should be default "_"
     result = strcmp(label, "_");
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file default label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
     free(label);
     //get label using xattr function
     result = lgetxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result > 0, "Error in getting xattr from file");
+    RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "_", result);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file default label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
 
 
     //int smack_lsetlabel(const char *path, const char* label,
     //          enum smack_label_type type);
     result = smack_lsetlabel(file_path, "7up", SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting ACCESS label for file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
     //and set label for file pointed by link
     result = smack_setlabel(file_path, "mirinda", SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting ACCESS label for file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //get label using smack function
     result = smack_lgetlabel(file_path, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in getting smack ACCESS label from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
     //check label, should be "7up"
     result = strcmp(label, "7up");
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
     free(label);
     //get label using xattr function
     result = lgetxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result > 0, "Error in getting xattr from file");
+    RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "7up", result);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
 
 
     //now similar to above, but folowing symbolic link set before to "mirinda"
     result = smack_getlabel(file_path, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error gettin label of file pointed by symbolic link");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error gettin label of file pointed by symbolic link");
     //now label should be "mirinda" for file instead of "7up" set for link
     result = strcmp(label, "mirinda");
-    RUNNER_ASSERT_MSG(result == 0, "Wrong label of file pointed by symbolic link");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong label of file pointed by symbolic link");
     free(label);
     //get label using xattr function
     result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result > 0, "Error in getting xattr from file");
+    RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "mirinda", result);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
 }
 
 RUNNER_TEST(smack08_f_get_set_label)
@@ -991,48 +991,48 @@ RUNNER_TEST(smack08_f_get_set_label)
     const char *file_path = "/etc/smack/test_smack_rules";
 
     fd = open(file_path, O_RDWR, 0644);             //reference preinstalled rules
-    RUNNER_ASSERT_MSG(fd >= 0, "Unable to open /etc/smack/test_smack_rules");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "Unable to open /etc/smack/test_smack_rules");
 
     //preparing environment by restoring default "_" label
     result = smack_fsetlabel(fd, "_", SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting ACCESS label for file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //int smack_fgetlabel(int fd, char** label,
     //          enum smack_label_type type);
     result = smack_fgetlabel(fd, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in getting smack ACCESS label from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
     //check label, should be "_"
     result = strcmp(label, "_");
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file default label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
     free(label);
     //get label using xattr function
     result = fgetxattr(fd, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result > 0, "Error in getting xattr from file");
+    RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "_", result);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file default label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
 
 
     //int smack_fsetlabel(int fd, const char* label,
     //          enum smack_label_type type);
     result = smack_fsetlabel(fd, "sprite", SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in setting ACCESS label for file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //get label using smack function
     result = smack_fgetlabel(fd, &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(result == 0, "Error in getting smack ACCESS label from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
     //check label, should be "sprite"
     result = strcmp(label, "sprite");
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
     free(label);
     //get label using xattr function
     result = fgetxattr(fd, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
-    RUNNER_ASSERT_MSG(result > 0, "Error in getting xattr from file");
+    RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "sprite", result);
-    RUNNER_ASSERT_MSG(result == 0, "Wrong file label");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
 
 
     close(fd);
@@ -1049,19 +1049,19 @@ RUNNER_TEST_SMACK(smack10_adding_removing_rules)
     {
         // Creating rules
         result = smack_accesses_new(&rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while creating new accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while creating new accesses. Result: " << result);
 
         // Adding accesses
         result = smack_accesses_add(rulesBasic, TEST_SUBJECT, TEST_OBJECT, accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to add modify rulesBasic. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add modify rulesBasic. Result: " << result);
 
         // Applying rules
         result = smack_accesses_apply(rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
         // Checking if accesses were created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
             " Error while checking smack access. Result: " << result);
 
         smack_accesses_free(rulesBasic);
@@ -1075,41 +1075,41 @@ RUNNER_TEST_SMACK(smack10_adding_removing_rules)
     {
         // --- Creating rules (r or w or x)
         result = smack_accesses_new(&rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while creating new accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while creating new accesses. Result: " << result);
 
         // Adding accesses
         result = smack_accesses_add(rulesBasic, TEST_SUBJECT, TEST_OBJECT, accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to add rulesBasic. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add rulesBasic. Result: " << result);
 
         // Applying rules
         result = smack_accesses_apply(rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
         // Checking if accesses were created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
             " Error while checking smack access. Result: " << result);
 
         // Checking if wrong accesses were not created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i + 3].c_str());
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
             " Error while checking smack access. Result: " << result);
 
         // --- Modifying accesses (r for wx or w for rx or x for rw)
         result = smack_accesses_add_modify(rulesBasic,TEST_SUBJECT, TEST_OBJECT,accessesBasic[i + 3].c_str(),accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to add modify rulesBasic. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add modify rulesBasic. Result: " << result);
 
         // Applying rules
         result = smack_accesses_apply(rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
         // Checking if accesses were created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i + 3].c_str());
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
             " Error while checking smack access. Result: " << result);
 
         // Checking if wrong accesses were not created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
             " Error while checking smack access. Result: " << result);
 
         smack_accesses_free(rulesBasic);
@@ -1117,67 +1117,67 @@ RUNNER_TEST_SMACK(smack10_adding_removing_rules)
 
         // --- Creating complementary rules (r or w or x)
         result = smack_accesses_new(&rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while creating new accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while creating new accesses. Result: " << result);
 
         // Adding accesses
         result = smack_accesses_add(rulesBasic, TEST_SUBJECT, TEST_OBJECT, accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to add rulesBasic. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add rulesBasic. Result: " << result);
 
         // Checking if accesses were created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i + 3].c_str());
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
             " Error while checking smack access. Result: " << result);
 
         // Applying rules
         result = smack_accesses_apply(rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
         // Checking if accesses were created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
             " Error while checking smack access. Result: " << result);
 
         // --- Modifying accesses (adding rwx and removing r or w or x)
         result = smack_accesses_add_modify(rulesBasic,TEST_SUBJECT, TEST_OBJECT,"rwx",accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0, "Unable to add modify rulesBasic. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add modify rulesBasic. Result: " << result);
 
         // Applying rules
         result = smack_accesses_apply(rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
         // Checking if accesses were created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i + 3].c_str());
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
             " Error while checking smack access. Result: " << result);
 
         // Checking if wrong accesses were not created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[i].c_str());
-        RUNNER_ASSERT_MSG(result == 0,
+        RUNNER_ASSERT_MSG_BT(result == 0,
             " Error while checking smack access. Result: " << result);
 
         // --- Adding crossing accesses (rx or rw or wx)
         result = smack_accesses_add_modify(rulesBasic,TEST_SUBJECT, TEST_OBJECT,accessesBasic[3 + ((i + 1) % 3)].c_str(),"");
-        RUNNER_ASSERT_MSG(result == 0, "Unable to add modify rulesBasic. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add modify rulesBasic. Result: " << result);
 
         // Applying rules
         result = smack_accesses_apply(rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
         // Checking if accesses were created
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, accessesBasic[3 + ((i + 1) % 3)].c_str());
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
             " Error while checking smack access. Result: " << result);
 
         result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, "rwx");
-        RUNNER_ASSERT_MSG(result == 1,
+        RUNNER_ASSERT_MSG_BT(result == 1,
             " Error while checking smack access. Result: " << result);
 
         // Deleting all rules
         result = smack_accesses_add_modify(rulesBasic,TEST_SUBJECT, TEST_OBJECT,"","rwx");
-        RUNNER_ASSERT_MSG(result == 0, "Unable to add modify rulesBasic. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add modify rulesBasic. Result: " << result);
 
         result = smack_accesses_apply(rulesBasic);
-        RUNNER_ASSERT_MSG(result == 0, "Error while checking smack access. Result: " << result);
+        RUNNER_ASSERT_MSG_BT(result == 0, "Error while checking smack access. Result: " << result);
 
         smack_accesses_free(rulesBasic);
         rulesBasic = NULL;
@@ -1199,48 +1199,48 @@ RUNNER_TEST_SMACK(smack11_saving_loading_rules)
 
     // Creating rules
     result = smack_accesses_new(&rulesBasic);
-    RUNNER_ASSERT_MSG(result == 0, "Error while creating new accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while creating new accesses. Result: " << result);
 
     // Loading file with rwxat rules - test_smack_rules_full
     fd = open("/etc/smack/test_smack_rules_full", O_RDONLY, 0644);
-    RUNNER_ASSERT_MSG(fd >= 0, "Unable to open /etc/smack/test_smack_rules_full");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "Unable to open /etc/smack/test_smack_rules_full");
 
     // Adding rules from file
     result = smack_accesses_add_from_file(rulesBasic, fd);
     close(fd);
-    RUNNER_ASSERT_MSG(result == 0, "Error importing accesses from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error importing accesses from file");
 
     // Applying rules
     result = smack_accesses_apply(rulesBasic);
-    RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
     // Checking rules
     result = smack_have_access("test_subject_01", "test_object_01", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
     result = smack_have_access("test_subject_01", "test_object_02", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
     result = smack_have_access("test_subject_01", "test_object_03", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
     result = smack_have_access("test_subject_02", "test_object_01", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
     result = smack_have_access("test_subject_02", "test_object_02", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
     result = smack_have_access("test_subject_02", "test_object_03", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
     result = smack_have_access("test_subject_03", "test_object_01", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
     result = smack_have_access("test_subject_03", "test_object_02", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
     result = smack_have_access("test_subject_03", "test_object_03", "rwxat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack accesses.");
 
     // Removing rules
@@ -1250,46 +1250,46 @@ RUNNER_TEST_SMACK(smack11_saving_loading_rules)
 
     // Creating rules
     result = smack_accesses_new(&rulesBasic);
-    RUNNER_ASSERT_MSG(result == 0, "Error while creating new accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while creating new accesses. Result: " << result);
 
     // Loading file with partial wrong rules - test_smack_rules2
     fd = open("/etc/smack/test_smack_rules2", O_RDONLY, 0644);
-    RUNNER_ASSERT_MSG(fd >= 0, "Unable to open /etc/smack/test_smack_rules2");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "Unable to open /etc/smack/test_smack_rules2");
 
     // Adding rules from file
     result = smack_accesses_add_from_file(rulesBasic, fd);
     close(fd);
-    RUNNER_ASSERT_MSG(result == 0, "Accesses were loaded from file");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Accesses were loaded from file");
 
     // Applying rules
     result = smack_accesses_apply(rulesBasic);
-    RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
     // Checking rules
-    RUNNER_ASSERT_MSG(checkNoAccesses("test_subject_01", "test_object_01"),
+    RUNNER_ASSERT_MSG_BT(checkNoAccesses("test_subject_01", "test_object_01"),
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Accesses exist.");
     result = smack_have_access("test_subject_01", "test_object_02", "rwat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Result: " << result );
     result = smack_have_access("test_subject_01", "test_object_03", "wat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Result: " << result );
-    RUNNER_ASSERT_MSG(checkNoAccesses("test_subject_02", "test_object_01"),
+    RUNNER_ASSERT_MSG_BT(checkNoAccesses("test_subject_02", "test_object_01"),
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Accesses exist.");
     result = smack_have_access("test_subject_02", "test_object_02", "wa-ft");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Result: " << result );
     result = smack_have_access("test_subject_02", "test_object_03", "wr");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Result: " << result );
     result = smack_have_access("test_subject_03", "test_object_01", "a");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Result: " << result );
     result = smack_have_access("test_subject_03", "test_object_02", "rwat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Result: " << result );
     result = smack_have_access("test_subject_03", "test_object_03", "w");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules2. Result: " << result );
 
     // Removing rules
@@ -1299,29 +1299,29 @@ RUNNER_TEST_SMACK(smack11_saving_loading_rules)
 
     // Creating rules
     result = smack_accesses_new(&rulesBasic);
-    RUNNER_ASSERT_MSG(result == 0, "Error while creating new accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while creating new accesses. Result: " << result);
 
     // Loading file with partial wrong rules - test_smack_rules3
     fd = open("/etc/smack/test_smack_rules3", O_RDONLY, 0644);
-    RUNNER_ASSERT_MSG(fd >= 0, "Unable to open /etc/smack/test_smack_rules3");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "Unable to open /etc/smack/test_smack_rules3");
 
     // Adding rules from file
     result = smack_accesses_add_from_file(rulesBasic, fd);
     close(fd);
-    RUNNER_ASSERT_MSG(result != 0, "Accesses were loaded from file");
+    RUNNER_ASSERT_MSG_BT(result != 0, "Accesses were loaded from file");
 
     // Applying rules
     result = smack_accesses_apply(rulesBasic);
-    RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
     // Checking rules
     result = smack_have_access("test_subject_01", "test_object_01", "rwat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules3. Result: " << result );
-    RUNNER_ASSERT_MSG(checkNoAccesses("test_subject_01", "test_object_02"),
+    RUNNER_ASSERT_MSG_BT(checkNoAccesses("test_subject_01", "test_object_02"),
         " Error while checking smack access loaded from /etc/smack/test_smack_rules3. Accesses exist.");
     result = smack_have_access("test_subject_01", "test_object_03", "x");
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules3. Result: " << result );
 
     // Removing rules
@@ -1331,29 +1331,29 @@ RUNNER_TEST_SMACK(smack11_saving_loading_rules)
 
     // Creating rules
     result = smack_accesses_new(&rulesBasic);
-    RUNNER_ASSERT_MSG(result == 0, "Error while creating new accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while creating new accesses. Result: " << result);
 
     // Loading file with partial wrong rules - test_smack_rules4
     fd = open("/etc/smack/test_smack_rules4", O_RDONLY, 0644);
-    RUNNER_ASSERT_MSG(fd >= 0, "Unable to open /etc/smack/test_smack_rules4");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "Unable to open /etc/smack/test_smack_rules4");
 
     // Adding rules from file
     result = smack_accesses_add_from_file(rulesBasic, fd);
     close(fd);
-    RUNNER_ASSERT_MSG(result != 0, "Accesses were loaded from file");
+    RUNNER_ASSERT_MSG_BT(result != 0, "Accesses were loaded from file");
 
     // Applying rules
     result = smack_accesses_apply(rulesBasic);
-    RUNNER_ASSERT_MSG(result == 0, "Error while applying accesses. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while applying accesses. Result: " << result);
 
     // Checking rules
     result = smack_have_access("test_subject_01", "test_object_01", "rxwat");
-    RUNNER_ASSERT_MSG(result == 1,
+    RUNNER_ASSERT_MSG_BT(result == 1,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules4. Result: " << result );
-    RUNNER_ASSERT_MSG(checkNoAccesses("test_subject_01", "test_object_02"),
+    RUNNER_ASSERT_MSG_BT(checkNoAccesses("test_subject_01", "test_object_02"),
         " Error while checking smack access loaded from /etc/smack/test_smack_rules4. Accesses exist.");
     result = smack_have_access("test_subject_01", "test_object_03", "a");
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
         " Error while checking smack access loaded from /etc/smack/test_smack_rules4. Result: " << result );
 
     // Removing rules
@@ -1373,9 +1373,9 @@ static void smack_set_another_label_for_self(void)
 
     number++;
     result = asprintf(&smack_label, "s%d", number);
-    RUNNER_ASSERT_MSG(result > 0, "asprintf failed");
+    RUNNER_ASSERT_MSG_BT(result > 0, "asprintf failed");
     result = smack_set_label_for_self(smack_label);
-    RUNNER_ASSERT_MSG(result == 0, "smack_set_label_for_self(" << smack_label << ") failed");
+    RUNNER_ASSERT_MSG_BT(result == 0, "smack_set_label_for_self(" << smack_label << ") failed");
     free(smack_label);
 }
 
@@ -1390,9 +1390,9 @@ static void smack_unix_sock_server(int sock)
     if (fd < 0)
         return;
     result = smack_new_label_from_self(&smack_label);
-    RUNNER_ASSERT_MSG(result >= 0, "smack_new_label_from_self() failed");
+    RUNNER_ASSERT_MSG_BT(result >= 0, "smack_new_label_from_self() failed");
     result = write(fd, smack_label, strlen(smack_label));
-    RUNNER_ASSERT_MSG(result == (int)strlen(smack_label), "write() failed");
+    RUNNER_ASSERT_MSG_BT(result == (int)strlen(smack_label), "write() failed");
     close(fd);
     free(smack_label);
 }
@@ -1404,21 +1404,21 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack09_new_label_from_socket)
     unlink(SOCK_PATH);
     smack_set_another_label_for_self();
     pid = fork();
-    RUNNER_ASSERT_MSG(pid >= 0, "Fork failed");
+    RUNNER_ASSERT_MSG_BT(pid >= 0, "Fork failed");
     if (!pid) { /* child process, server */
         int sock, result;
 
 
         sock = socket(AF_UNIX, SOCK_STREAM, 0);
-        RUNNER_ASSERT_MSG(sock >= 0, "socket failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(sock >= 0, "socket failed: " << strerror(errno));
         result = bind(sock, (struct sockaddr*) &sockaddr, sizeof(struct sockaddr_un));
-        RUNNER_ASSERT_MSG(result == 0, "bind failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(result == 0, "bind failed: " << strerror(errno));
         result = listen(sock, 1);
-        RUNNER_ASSERT_MSG(result == 0, "listen failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(result == 0, "listen failed: " << strerror(errno));
         smack_unix_sock_server(sock);
 
         pid = fork();
-        RUNNER_ASSERT_MSG(pid >= 0, "Fork failed");
+        RUNNER_ASSERT_MSG_BT(pid >= 0, "Fork failed");
         /*  Test if socket label was unaffected by fork() */
         smack_unix_sock_server(sock);
         if (!pid) {
@@ -1437,21 +1437,21 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack09_new_label_from_socket)
             char *smack_label2;
 
             sock = socket(AF_UNIX, SOCK_STREAM, 0);
-            RUNNER_ASSERT_MSG(sock >= 0, "socket failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(sock >= 0, "socket failed: " << strerror(errno));
             result = connect(sock, (struct sockaddr*) &sockaddr, sizeof(struct sockaddr_un));
-            RUNNER_ASSERT_MSG(result == 0, "connect failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(result == 0, "connect failed: " << strerror(errno));
             alarm(2);
             result = read(sock, smack_label1, SMACK_LABEL_LEN);
-            RUNNER_ASSERT_MSG(result >= 0, "read failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(result >= 0, "read failed: " << strerror(errno));
             alarm(0);
             smack_label1[result] = '\0';
             result = smack_new_label_from_socket(sock, &smack_label2);
-            RUNNER_ASSERT_MSG(result >= 0, "smack_label_from_socket failed");
+            RUNNER_ASSERT_MSG_BT(result >= 0, "smack_label_from_socket failed");
             result = strcmp(smack_label1, smack_label2);
             if (i < 3)
-                RUNNER_ASSERT_MSG(result == 0, "smack labels differ: '" << smack_label1 << "' != '" << smack_label2 << "' i == " << i);
+                RUNNER_ASSERT_MSG_BT(result == 0, "smack labels differ: '" << smack_label1 << "' != '" << smack_label2 << "' i == " << i);
             else
-                RUNNER_ASSERT_MSG(result != 0, "smack labels do not differ: '" << smack_label1 << "' != '" << smack_label2 << "' i == " << i);
+                RUNNER_ASSERT_MSG_BT(result != 0, "smack labels do not differ: '" << smack_label1 << "' != '" << smack_label2 << "' i == " << i);
             close(sock);
         }
     }
@@ -1468,25 +1468,25 @@ void createFileWithLabel(const std::string &filePath, const std::string &fileLab
     int fd = open(filePath.c_str(), O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO);
     //restore system mask
     umask(systemMask);
-    RUNNER_ASSERT_MSG(fd > -1, "Unable to create file for tests: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(fd > -1, "Unable to create file for tests: " << strerror(errno));
 
     //for descriptor protection
     FDUniquePtr fp(&fd, closeFdPtr);
 
     //change owner and group to user APP
     int ret = chown(filePath.c_str(), APP_UID, APP_GID);
-    RUNNER_ASSERT_MSG(ret == 0, "Unable to change file owner: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Unable to change file owner: " << strerror(errno));
 
     //set smack label on file
     ret = smack_setlabel(filePath.c_str(), fileLabel.c_str(), SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(ret == 0, "Unable to set label for file: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Unable to set label for file: " << ret);
 
     char *label = NULL;
     ret = smack_getlabel(filePath.c_str(), &label, SMACK_LABEL_ACCESS);
-    RUNNER_ASSERT_MSG(ret == 0, "Unable to get label from file");
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Unable to get label from file");
     std::string label_str(label ? label : "");
     free(label);
-    RUNNER_ASSERT_MSG(label_str == fileLabel, "File label not match set label");
+    RUNNER_ASSERT_MSG_BT(label_str == fileLabel, "File label not match set label");
 }
 
 void prepareEnvironment(const std::string &subject, const std::string &object, const std::string &access)
@@ -1513,7 +1513,7 @@ RUNNER_CHILD_TEST_SMACK(smack13_0_checking_laccess_mode_enabled_on_device)
     provider.apply(TRACE_FROM_HERE);
 
     int ret = smack_have_access(selfLabel.c_str(), filename.c_str(), "l");
-    RUNNER_ASSERT_MSG(ret == 1, "Error in adding laccess rule - l");
+    RUNNER_ASSERT_MSG_BT(ret == 1, "Error in adding laccess rule - l");
 }
 
 //- Create file
@@ -1535,11 +1535,11 @@ RUNNER_CHILD_TEST_SMACK(smack13_1_checking_laccess_mode)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = flock(fd, LOCK_EX | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret < 0, "Error, able to lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret < 0, "Error, able to lock file: " << strerror(errno));
     ret = flock(fd, LOCK_UN | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret < 0, "Error, able to lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret < 0, "Error, able to lock file: " << strerror(errno));
     ret = flock(fd, LOCK_SH | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret < 0, "Error, able to lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret < 0, "Error, able to lock file: " << strerror(errno));
 }
 
 //- Create file
@@ -1561,11 +1561,11 @@ RUNNER_CHILD_TEST_SMACK(smack13_2_checking_laccess_mode_with_l_rule)
     prepareEnvironment(selfLabel, filename, "l");
 
     int ret = flock(fd, LOCK_EX | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to exclusive lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to exclusive lock file: " << strerror(errno));
     ret = flock(fd, LOCK_UN | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to unlock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to unlock file: " << strerror(errno));
     ret = flock(fd, LOCK_SH | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to shared lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to shared lock file: " << strerror(errno));
 }
 
 //- Create file
@@ -1587,11 +1587,11 @@ RUNNER_CHILD_TEST_SMACK(smack13_3_checking_laccess_mode_with_w_rule)
     prepareEnvironment(selfLabel, filename, "w");
 
     int ret = flock(fd, LOCK_EX | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to exclusive lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to exclusive lock file: " << strerror(errno));
     ret = flock(fd, LOCK_UN | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to unlock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to unlock file: " << strerror(errno));
     ret = flock(fd, LOCK_SH | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to shared lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to shared lock file: " << strerror(errno));
 }
 
 //- Create file
@@ -1613,7 +1613,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack13_4_0_checking_laccess_mode_w_rule_child)
     int fd = open(filePath.c_str(), O_RDWR);
     FDUniquePtr fp(&fd, closeFdPtr);
     int ret = flock(fd, LOCK_SH | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to shared lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to shared lock file: " << strerror(errno));
 
     pid_t pid = fork();
     if (pid == 0) {
@@ -1621,13 +1621,13 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack13_4_0_checking_laccess_mode_w_rule_child)
         prepareEnvironment(selfLabel, filename, "rw");
 
         int child_fd = open(filePath.c_str(), O_RDWR);
-        RUNNER_ASSERT_MSG(child_fd > -1, "Unable to open created file: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(child_fd > -1, "Unable to open created file: " << strerror(errno));
 
         //for descriptor protection
         FDUniquePtr fp(&child_fd, closeFdPtr);
 
         ret = flock(child_fd, LOCK_SH | LOCK_NB);
-        RUNNER_ASSERT_MSG(ret == 0, "Error, unable to lock file with shared lock: "
+        RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to lock file with shared lock: "
                           << strerror(errno));
     }
 }
@@ -1651,7 +1651,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack13_4_1_checking_laccess_mode_l_rule_child)
     int fd = open(filePath.c_str(), O_RDWR);
     FDUniquePtr fp(&fd, closeFdPtr);
     int ret = flock(fd, LOCK_SH | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to shared lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to shared lock file: " << strerror(errno));
 
     pid_t pid = fork();
     if (pid == 0) {
@@ -1660,13 +1660,13 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack13_4_1_checking_laccess_mode_l_rule_child)
         prepareEnvironment(selfLabel, filename, "rl");
 
         int child_fd = open(filePath.c_str(), O_RDONLY, 0);
-        RUNNER_ASSERT_MSG(child_fd > -1, "Unable to open created file: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(child_fd > -1, "Unable to open created file: " << strerror(errno));
 
         //for descriptor protection
         FDUniquePtr fp(&child_fd, closeFdPtr);
 
         ret = flock(child_fd, LOCK_SH | LOCK_NB);
-        RUNNER_ASSERT_MSG(ret == 0, "Error, unable to lock file with shared lock: "
+        RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to lock file with shared lock: "
                           << strerror(errno));
     }
 }
@@ -1690,7 +1690,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack13_4_2_checking_laccess_mode_w_rule_child)
     int fd = open(filePath.c_str(), O_RDWR);
     FDUniquePtr fp(&fd, closeFdPtr);
     int ret = flock(fd, LOCK_EX | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to exclusive lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to exclusive lock file: " << strerror(errno));
 
     pid_t pid = fork();
     if (pid == 0) {
@@ -1698,13 +1698,13 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack13_4_2_checking_laccess_mode_w_rule_child)
         prepareEnvironment(selfLabel, filename, "rw");
 
         int child_fd = open(filePath.c_str(), O_RDWR, 0);
-        RUNNER_ASSERT_MSG(child_fd > -1, "Unable to open created file: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(child_fd > -1, "Unable to open created file: " << strerror(errno));
 
         //for descriptor protection
         FDUniquePtr fp(&child_fd, closeFdPtr);
 
         ret = flock(child_fd, LOCK_EX | LOCK_NB);
-        RUNNER_ASSERT_MSG(ret < 0, "Error, able to lock file with exclusive lock");
+        RUNNER_ASSERT_MSG_BT(ret < 0, "Error, able to lock file with exclusive lock");
     }
 }
 
@@ -1727,7 +1727,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack13_4_3_checking_laccess_mode_l_rule_child)
     int fd = open(filePath.c_str(), O_RDWR, 0);
     FDUniquePtr fp(&fd, closeFdPtr);
     int ret = flock(fd, LOCK_EX | LOCK_NB);
-    RUNNER_ASSERT_MSG(ret == 0, "Error, unable to exclusive lock file: " << strerror(errno));
+    RUNNER_ASSERT_MSG_BT(ret == 0, "Error, unable to exclusive lock file: " << strerror(errno));
 
     pid_t pid = fork();
     if (pid == 0) {
@@ -1736,13 +1736,13 @@ RUNNER_MULTIPROCESS_TEST_SMACK(smack13_4_3_checking_laccess_mode_l_rule_child)
         prepareEnvironment(selfLabel, filename, "rl");
 
         int child_fd = open(filePath.c_str(), O_RDONLY, 0);
-        RUNNER_ASSERT_MSG(child_fd > -1, "Unable to open created file: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(child_fd > -1, "Unable to open created file: " << strerror(errno));
 
         //for descriptor protection
         FDUniquePtr fp(&child_fd, closeFdPtr);
 
         ret = flock(child_fd, LOCK_EX | LOCK_NB);
-        RUNNER_ASSERT_MSG(ret < 0, "Error, able to lock file with eclusive lock");
+        RUNNER_ASSERT_MSG_BT(ret < 0, "Error, able to lock file with eclusive lock");
     }
 }
 
@@ -1772,50 +1772,50 @@ RUNNER_TEST_NOSMACK(smack02_aplying_rules_into_kernel_nosmack)
 
     //init rules
     result = smack_accesses_new(&tmp);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to create smack_accesses instance");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to create smack_accesses instance");
 
     //pass rules to unique_ptr
     AccessesUniquePtr rules(tmp, smack_accesses_free);
 
     //adding test rules to struct (same as SMACK version of smack02 test)
     result = smack_accesses_add(rules.get(), "writer", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
     result = smack_accesses_add(rules.get(), "reader", "book", "r");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
     result = smack_accesses_add(rules.get(), "spy", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
 
     //applying rules to kernel (should fail)
     result = smack_accesses_apply(rules.get());
-    RUNNER_ASSERT_MSG(result == -1, "Unable to apply rules into kernel");
+    RUNNER_ASSERT_MSG_BT(result == -1, "Unable to apply rules into kernel");
 
     //calls from SMACK version of this test - all should fail because of SMACK being turned off
     result = smack_have_access("spy", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == -1, "smack_have_access should return error (SMACK is off)");
+    RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off)");
     result = smack_have_access("reader", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == -1, "smack_have_access should return error (SMACK is off)");
+    RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off)");
     result = smack_have_access("mars", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == -1, "smack_have_access should return error (SMACK is off)");
+    RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off)");
 
     //testing subject revoking - should return error (no accesses applied = no subjects to revoke)
     result = smack_revoke_subject("snickers");
-    RUNNER_ASSERT_MSG(result == -1, "smack_revoke_subject error - subject doesn't exist.");
+    RUNNER_ASSERT_MSG_BT(result == -1, "smack_revoke_subject error - subject doesn't exist.");
     result = smack_revoke_subject("spy");
-    RUNNER_ASSERT_MSG(result == -1, "smack_revoke_subject error - subject doesn't exist.");
+    RUNNER_ASSERT_MSG_BT(result == -1, "smack_revoke_subject error - subject doesn't exist.");
 
     //after revoking smack_have_access still should return error
     result = smack_have_access("spy", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == -1, "smack_have_access should return error (SMACK is off).");
+    RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off).");
 
     result = smack_accesses_add(rules.get(), "twix", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to add smack rules");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
 
     //smack_accesses_clear should return error aswell
     result = smack_accesses_clear(rules.get());
-    RUNNER_ASSERT_MSG(result == -1, "Clearing rules should return error - no SMACK on system.");
+    RUNNER_ASSERT_MSG_BT(result == -1, "Clearing rules should return error - no SMACK on system.");
 
     result = smack_have_access("writer", "book", "rwx");
-    RUNNER_ASSERT_MSG(result == -1, "smack_have_access should return error (SMACK is off).");
+    RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off).");
 }
 
 /**
@@ -1833,19 +1833,19 @@ RUNNER_TEST_NOSMACK(smack03_saving_loading_rules_nosmack)
     smack_accesses* tmp = NULL;
 
     result = smack_accesses_new(&tmp);
-    RUNNER_ASSERT_MSG(result == 0, "Error during rules creation.");
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error during rules creation.");
 
     AccessesUniquePtr rules(tmp, smack_accesses_free);
 
     //open file with rules
     fd = open("/etc/smack/test_smack_rules_full", O_RDONLY, 0644);
-    RUNNER_ASSERT_MSG(fd >= 0,
+    RUNNER_ASSERT_MSG_BT(fd >= 0,
             "Unable to open /etc/smack/test_smack_rules_full. Errno: " << strerror(errno));
 
     //load accesses from file
     result = smack_accesses_add_from_file(rules.get(), fd);
     close(fd);
-    RUNNER_ASSERT_MSG(result == 0, "Error while importing accesses from file. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Error while importing accesses from file. Result: " << result);
 }
 
 /**
@@ -1863,51 +1863,51 @@ RUNNER_TEST_NOSMACK(smack04_self_label_nosmack)
 
     //smack_new_label_from_self should fail
     result = smack_new_label_from_self(&label);
-    RUNNER_ASSERT_MSG(result == -1, "new_label_from_self should return error (SMACK is off).");
-    RUNNER_ASSERT_MSG(label == NULL, "new_label_from_self shouldn't allocate memory to label.");
+    RUNNER_ASSERT_MSG_BT(result == -1, "new_label_from_self should return error (SMACK is off).");
+    RUNNER_ASSERT_MSG_BT(label == NULL, "new_label_from_self shouldn't allocate memory to label.");
 
     //We don't need to remember about freeing label - smack_new_label_from_self must return NULL
     //label if it's working properly.
 
     // /proc/self/attr/current shouldn't keep any rules inside
     fd = open("/proc/self/attr/current", O_RDONLY, 0644);   //file exists, so it should open
-    RUNNER_ASSERT_MSG(fd >= 0, "/proc/self/attr/current failed to open.");
+    RUNNER_ASSERT_MSG_BT(fd >= 0, "/proc/self/attr/current failed to open.");
 
     result = read(fd, buff, B_SIZE);                        //however reading it should return error
     if(result >= 0) {
         close(fd);
-        RUNNER_ASSERT_MSG(false, "Reading /proc/self/attr/current should return error.");
+        RUNNER_ASSERT_MSG_BT(false, "Reading /proc/self/attr/current should return error.");
     }
 
     //setting label for self should fail
     result = smack_set_label_for_self("fanta");
     if(result != -1) {
         close(fd);
-        RUNNER_ASSERT_MSG(false, "set_label_for_self should return error (SMACK is off).");
+        RUNNER_ASSERT_MSG_BT(false, "set_label_for_self should return error (SMACK is off).");
     }
 
     //getting previously set label should also fail
     result = smack_new_label_from_self(&label);
     if(result != -1) {
         close(fd);
-        RUNNER_ASSERT_MSG(false, "new_label_from_self should return error (SMACK is off).");
+        RUNNER_ASSERT_MSG_BT(false, "new_label_from_self should return error (SMACK is off).");
     }
     if(label != NULL) {
         close(fd);
-        RUNNER_ASSERT_MSG(false, "new_label_from_self shouldn't allocate memory to label.");
+        RUNNER_ASSERT_MSG_BT(false, "new_label_from_self shouldn't allocate memory to label.");
     }
 
     // /proc/self/attr/current still shouldn't keep any rules inside
     result = lseek(fd, 0, SEEK_SET);    //going to the file beginning
     if(result != 0) {
         close(fd);
-        RUNNER_ASSERT_MSG(false, "lseek() error.");
+        RUNNER_ASSERT_MSG_BT(false, "lseek() error.");
     }
 
     result = read(fd, buff, B_SIZE);                            //however it should return error
     if(result >= 0) {
         close(fd);
-        RUNNER_ASSERT_MSG(false, "Reading /proc/self/attr/current should return error.");
+        RUNNER_ASSERT_MSG_BT(false, "Reading /proc/self/attr/current should return error.");
     }
 
     close(fd);
@@ -1927,7 +1927,7 @@ RUNNER_TEST_NOSMACK(smack05_accesses_add_modify_nosmack)
     smack_accesses* tmp = NULL;
 
     result = smack_accesses_new(&tmp);
-    RUNNER_ASSERT_MSG(result == 0, "Unable to allocate memory for rules. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to allocate memory for rules. Result: " << result);
 
     AccessesUniquePtr rules(tmp, smack_accesses_free);
 
@@ -1935,19 +1935,19 @@ RUNNER_TEST_NOSMACK(smack05_accesses_add_modify_nosmack)
     //rule struct and removal of currenctly added and applied rules. clean_up() must be done only
     //after smack_accesses_apply().
     result = smack_accesses_add_modify(rules.get(), TEST_SUBJECT, TEST_OBJECT, "rwx", "");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule. Result: " << result);
 
     result = smack_accesses_add_modify(rules.get(), TEST_SUBJECT, TEST_OBJECT, "rwx", "");
-    RUNNER_ASSERT_MSG(result == 0, "Unable to modify rule. Result: " << result);
+    RUNNER_ASSERT_MSG_BT(result == 0, "Unable to modify rule. Result: " << result);
 
     result = smack_accesses_apply(rules.get());
-    RUNNER_ASSERT_MSG(result == -1,
+    RUNNER_ASSERT_MSG_BT(result == -1,
             "smack_accesses_apply should return error (SMACK is off). Result: " << result);
 
     result = smack_have_access(TEST_SUBJECT, TEST_OBJECT, "rwx");
     if(result != -1) {
         clean_up();
-        RUNNER_ASSERT_MSG(false,
+        RUNNER_ASSERT_MSG_BT(false,
                 "smack_have_access should return error (SMACK is off). Result: " << result);
     }
 
@@ -1969,27 +1969,27 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(smack09_new_label_from_socket_nosmack)
     char* smack_label;
 
     pid = fork();
-    RUNNER_ASSERT_MSG(pid >= 0, "Fork failed");
+    RUNNER_ASSERT_MSG_BT(pid >= 0, "Fork failed");
     if (!pid) { //child (server)
         int sock, result;
         int fd;
 
         //Create new socket
         sock = socket(AF_UNIX, SOCK_STREAM, 0);
-        RUNNER_ASSERT_MSG(sock >= 0, "socket failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(sock >= 0, "socket failed: " << strerror(errno));
 
         //Bind it to sockaddr
         result = bind(sock, (struct sockaddr*) &sockaddr, sizeof(struct sockaddr_un));
         if (result != 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(false, "bind failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(false, "bind failed: " << strerror(errno));
         }
 
         //Prepare for listening
         result = listen(sock, 1);
         if (result != 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(false, "listen failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(false, "listen failed: " << strerror(errno));
         }
 
         //Accept client
@@ -1998,7 +1998,7 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(smack09_new_label_from_socket_nosmack)
         alarm(0);
         if (fd < 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(false, "Failed when accepting connection from client.");
+            RUNNER_ASSERT_MSG_BT(false, "Failed when accepting connection from client.");
         }
 
         //wait for smack_new_label_from_socket execution
@@ -2015,19 +2015,19 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(smack09_new_label_from_socket_nosmack)
 
         //Create socket
         sock = socket(AF_UNIX, SOCK_STREAM, 0);
-        RUNNER_ASSERT_MSG(sock >= 0, "socket failed: " << strerror(errno));
+        RUNNER_ASSERT_MSG_BT(sock >= 0, "socket failed: " << strerror(errno));
 
         //Connect to sockaddr
         result = connect(sock, (struct sockaddr*) &sockaddr,
                 sizeof(struct sockaddr_un));
         if (result != 0) {
             close(sock);
-            RUNNER_ASSERT_MSG(false, "connect failed: " << strerror(errno));
+            RUNNER_ASSERT_MSG_BT(false, "connect failed: " << strerror(errno));
         }
 
         //Try getting label, should fail beacuse getsockopt won't get anything
         result = smack_new_label_from_socket(sock, &smack_label);
         close(sock);
-        RUNNER_ASSERT_MSG(result == -1, "smack_new_label_from_socket should fail.");
+        RUNNER_ASSERT_MSG_BT(result == -1, "smack_new_label_from_socket should fail.");
     }
 }
index 1a349f5..9051058 100644 (file)
@@ -31,9 +31,9 @@ void check_app_has_privilege(const char *app_id, const app_type_t app_type,
 
     for (int i = 0; perm_list[i] != NULL; i++) {
         result = security_server_app_has_privilege(app_id, app_type, perm_list[i], &has_privilege);
-        RUNNER_ASSERT_MSG(result == SECURITY_SERVER_API_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == SECURITY_SERVER_API_SUCCESS,
                           "security_server_app_has_privilege failed with result: " << result);
-        RUNNER_ASSERT_MSG(has_privilege == expected_result,
+        RUNNER_ASSERT_MSG_BT(has_privilege == expected_result,
                           "Unexpected result, has_privilege returned: " << has_privilege
                           << ", expected: " << expected_result);
     }
@@ -47,9 +47,9 @@ void check_app_caller_has_privilege(const app_type_t app_type, const char *perm_
 
     for (int i = 0; perm_list[i] != NULL; i++) {
         result = security_server_app_caller_has_privilege(app_type, perm_list[i], &has_privilege);
-        RUNNER_ASSERT_MSG(result == SECURITY_SERVER_API_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(result == SECURITY_SERVER_API_SUCCESS,
                          "security_server_app_caller_has_privilege failed with result: " << result);
-        RUNNER_ASSERT_MSG(has_privilege == expected_result,
+        RUNNER_ASSERT_MSG_BT(has_privilege == expected_result,
                           "Unexpected result, caller_has_privilege returned: " << has_privilege
                           << ", expected: " << expected_result);
     }
@@ -64,7 +64,7 @@ void check_app_has_privilege_denied(const char *app_id, const app_type_t app_typ
     for (int i = 0; perm_list[i] != NULL; i++) {
         // call api function - should return access denied error
         result = security_server_app_has_privilege(app_id, app_type, perm_list[i], &has_privilege);
-        RUNNER_ASSERT_MSG(result == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
+        RUNNER_ASSERT_MSG_BT(result == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
                           "security_server_app_has_privilege returned unexpected value, "
                           "result: " << result);
     }
@@ -78,7 +78,7 @@ void check_app_caller_has_privilege_denied(const app_type_t app_type, const char
     for (int i = 0; perm_list[i] != NULL; i++) {
         // call api function - should return access denied error
         result = security_server_app_caller_has_privilege(app_type, perm_list[i], &has_privilege);
-        RUNNER_ASSERT_MSG(result == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
+        RUNNER_ASSERT_MSG_BT(result == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
                           "security_server_app_caller_has_privilege returned unexpected value, "
                           "result: " << result);
     }
index 4c62106..2e2d4fe 100644 (file)
@@ -49,7 +49,7 @@ typedef std::vector<char> Cookie;
 Cookie getCookieFromSS(const Tracker &tracker = Tracker()) {
     Cookie cookie(security_server_get_cookie_size());
 
-    RUNNER_ASSERT_MSG(SECURITY_SERVER_API_SUCCESS ==
+    RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_SUCCESS ==
             security_server_request_cookie(cookie.data(), cookie.size()),
         tracker.str() << " Error in security_server_request_cookie.");
 
@@ -69,7 +69,7 @@ RUNNER_TEST_GROUP_INIT(COOKIE_API_TESTS)
 RUNNER_CHILD_TEST(tc_arguments_01_01_security_server_request_cookie)
 {
     int ret = security_server_request_cookie(NULL, KNOWN_COOKIE_SIZE);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_request_cookie() argument checking: " << ret);
 }
 
@@ -79,7 +79,7 @@ RUNNER_CHILD_TEST(tc_arguments_01_02_security_server_request_cookie)
     Cookie cookie(KNOWN_COOKIE_SIZE);
 
     int ret = security_server_request_cookie(cookie.data(), KNOWN_COOKIE_SIZE - 1);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_BUFFER_TOO_SMALL,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_BUFFER_TOO_SMALL,
                       "Error in security_server_request_cookie() argument checking: " << ret);
 }
 
@@ -88,7 +88,7 @@ RUNNER_CHILD_TEST(tc_arguments_01_02_security_server_request_cookie)
 RUNNER_CHILD_TEST(tc_arguments_02_01_security_server_check_privilege)
 {
     int ret = security_server_check_privilege(NULL, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_check_privilege() argument checking: " << ret);
 }
 
@@ -97,7 +97,7 @@ RUNNER_CHILD_TEST(tc_arguments_02_01_security_server_check_privilege)
 RUNNER_CHILD_TEST(tc_arguments_03_01_security_server_check_privilege_by_cookie)
 {
     int ret = security_server_check_privilege_by_cookie(NULL, "wiadro", "rwx");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_check_privilege_by_cookie() argument checking: "
                       << ret);
 }
@@ -108,7 +108,7 @@ RUNNER_CHILD_TEST(tc_arguments_03_02_security_server_check_privilege_by_cookie)
     Cookie cookie = getCookieFromSS(TRACE_FROM_HERE);
 
     int ret = security_server_check_privilege_by_cookie(cookie.data(), NULL, "rwx");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_check_privilege_by_cookie() argument checking: "
                       << ret);
 }
@@ -119,7 +119,7 @@ RUNNER_CHILD_TEST(tc_arguments_03_03_security_server_check_privilege_by_cookie)
     Cookie cookie = getCookieFromSS(TRACE_FROM_HERE);
 
     int ret = security_server_check_privilege_by_cookie(cookie.data(), "wiadro", NULL);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_check_privilege_by_cookie() argument checking: "
                       << ret);
 }
@@ -129,7 +129,7 @@ RUNNER_CHILD_TEST(tc_arguments_03_03_security_server_check_privilege_by_cookie)
 RUNNER_CHILD_TEST(tc_arguments_04_01_security_server_get_cookie_pid)
 {
     int ret = security_server_get_cookie_pid(NULL);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_get_cookie_pid() argument checking: " << ret);
 }
 
@@ -139,7 +139,7 @@ RUNNER_CHILD_TEST(tc_arguments_05_01_security_server_get_smacklabel_cookie)
 {
     char *label = NULL;
     label = security_server_get_smacklabel_cookie(NULL);
-    RUNNER_ASSERT_MSG(label == NULL,
+    RUNNER_ASSERT_MSG_BT(label == NULL,
                       "Error in security_server_get_smacklabel_cookie() argument checking");
 }
 
@@ -149,7 +149,7 @@ RUNNER_CHILD_TEST(tc_arguments_06_01_security_server_get_uid_by_cookie)
 {
     uid_t uid;
     int ret = security_server_get_uid_by_cookie(NULL, &uid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_get_uid_by_cookie() argument checking: "
                       << ret);
 }
@@ -160,7 +160,7 @@ RUNNER_CHILD_TEST(tc_arguments_06_02_security_server_get_uid_by_cookie)
     Cookie cookie = getCookieFromSS(TRACE_FROM_HERE);
 
     int ret = security_server_get_uid_by_cookie(cookie.data(), NULL);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_get_uid_by_cookie() argument checking: "
                       << ret);
 }
@@ -171,7 +171,7 @@ RUNNER_CHILD_TEST(tc_arguments_07_01_security_server_get_gid_by_cookie)
 {
     gid_t gid;
     int ret = security_server_get_gid_by_cookie(NULL, &gid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_get_gid_by_cookie() argument checking: "
                       << ret);
 }
@@ -182,7 +182,7 @@ RUNNER_CHILD_TEST(tc_arguments_07_02_security_server_get_gid_by_cookie)
     Cookie cookie = getCookieFromSS(TRACE_FROM_HERE);
 
     int ret = security_server_get_gid_by_cookie(cookie.data(), NULL);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM,
                       "Error in security_server_get_gid_by_cookie() argument checking: "
                       << ret);
 }
@@ -200,7 +200,7 @@ RUNNER_CHILD_TEST(tc_arguments_07_02_security_server_get_gid_by_cookie)
 RUNNER_CHILD_TEST(tc_unit_01_01_security_server_get_cookie_size)
 {
     int ret = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(ret == KNOWN_COOKIE_SIZE,
+    RUNNER_ASSERT_MSG_BT(ret == KNOWN_COOKIE_SIZE,
                       "Error in security_server_get_cookie_size(): " << ret);
 }
 
@@ -212,7 +212,7 @@ RUNNER_CHILD_TEST(tc_unit_01_02_security_server_get_cookie_size)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(ret == KNOWN_COOKIE_SIZE,
+    RUNNER_ASSERT_MSG_BT(ret == KNOWN_COOKIE_SIZE,
                       "Error in security_server_get_cookie_size(): " << ret);
 }
 
@@ -221,12 +221,12 @@ RUNNER_CHILD_TEST(tc_unit_01_02_security_server_get_cookie_size)
 RUNNER_CHILD_TEST(tc_unit_02_01_security_server_request_cookie)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == KNOWN_COOKIE_SIZE,
+    RUNNER_ASSERT_MSG_BT(cookieSize == KNOWN_COOKIE_SIZE,
                       "Error in security_server_get_cookie_size(): " << cookieSize);
 
     Cookie cookie(cookieSize);
     int ret = security_server_request_cookie(cookie.data(), cookie.size());
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
                       "Error in security_server_request_cookie(): " << ret);
 }
 
@@ -237,7 +237,7 @@ RUNNER_CHILD_TEST(tc_unit_03_01_security_server_check_privilege)
     Cookie cookie = getCookieFromSS(TRACE_FROM_HERE);
 
     int ret = security_server_check_privilege(cookie.data(), 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
                       "Error in security_server_check_privilege(): " << ret);
 }
 
@@ -250,7 +250,7 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_03_02_security_server_check_privilege)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_check_privilege(cookie.data(), 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
                       "Error in security_server_check_privilege(): " << ret);
 }
 
@@ -264,7 +264,7 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_03_03_security_server_check_privilege)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_check_privilege(cookie.data(), 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
                       "Error in security_server_check_privilege(): " << ret);
 }
 
@@ -275,10 +275,10 @@ RUNNER_CHILD_TEST(tc_unit_05_01_security_server_get_cookie_pid)
     Cookie cookie = getCookieFromSS(TRACE_FROM_HERE);
 
     int ret = security_server_get_cookie_pid(cookie.data());
-    RUNNER_ASSERT_MSG(ret > -1, "Error in security_server_get_cookie_pid(): " << ret);
+    RUNNER_ASSERT_MSG_BT(ret > -1, "Error in security_server_get_cookie_pid(): " << ret);
 
     int pid = getpid();
-    RUNNER_ASSERT_MSG(pid == ret, "No match in PID received from cookie");
+    RUNNER_ASSERT_MSG_BT(pid == ret, "No match in PID received from cookie");
 }
 
 //privileges drop and no smack rule
@@ -290,7 +290,7 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_05_02_security_server_get_cookie_pid)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_get_cookie_pid(cookie.data());
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
                       "Error in security_server_get_cookie_pid(): " << ret);
 }
 
@@ -304,10 +304,10 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_05_03_security_server_get_cookie_pid)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_get_cookie_pid(cookie.data());
-    RUNNER_ASSERT_MSG(ret > -1, "Error in security_server_get_cookie_pid(): " << ret);
+    RUNNER_ASSERT_MSG_BT(ret > -1, "Error in security_server_get_cookie_pid(): " << ret);
 
     int pid = getpid();
-    RUNNER_ASSERT_MSG(pid == ret, "No match in PID received from cookie");
+    RUNNER_ASSERT_MSG_BT(pid == ret, "No match in PID received from cookie");
 }
 
 //---------------------------------------------------------------------------
@@ -319,7 +319,7 @@ RUNNER_CHILD_TEST(tc_unit_06_01_security_server_get_smacklabel_cookie)
     Cookie cookie = getCookieFromSS(TRACE_FROM_HERE);
 
     UniquePtrCstring label(security_server_get_smacklabel_cookie(cookie.data()), free);
-    RUNNER_ASSERT_MSG(strcmp(label.get(), "selflabel_06_01") == 0,
+    RUNNER_ASSERT_MSG_BT(strcmp(label.get(), "selflabel_06_01") == 0,
                       "No match in smack label received from cookie, received label: "
                       << label.get());
 }
@@ -333,7 +333,7 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_06_02_security_server_get_smacklabel_cookie)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     UniquePtrCstring label(security_server_get_smacklabel_cookie(cookie.data()), free);
-    RUNNER_ASSERT_MSG(label.get() == NULL,
+    RUNNER_ASSERT_MSG_BT(label.get() == NULL,
                       "NULL should be received due to access denied, received label: "
                       << label.get());
 }
@@ -348,7 +348,7 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_06_03_security_server_get_smacklabel_cookie)
     Cookie cookie = getCookieFromSS(TRACE_FROM_HERE);
 
     UniquePtrCstring label(security_server_get_smacklabel_cookie(cookie.data()), free);
-    RUNNER_ASSERT_MSG(strcmp(label.get(), "selflabel_06_03") == 0,
+    RUNNER_ASSERT_MSG_BT(strcmp(label.get(), "selflabel_06_03") == 0,
                       "No match in smack label received from cookie, received label: "
                       << label.get());
 }
@@ -361,10 +361,10 @@ RUNNER_CHILD_TEST(tc_unit_07_01_security_server_get_uid_by_cookie)
 
     uid_t uid;
     int ret = security_server_get_uid_by_cookie(cookie.data(), &uid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
                       "Error in security_server_get_uid_by_cookie(): " << ret);
     ret = getuid();
-    RUNNER_ASSERT_MSG(ret == (int)uid, "No match in UID received from cookie");
+    RUNNER_ASSERT_MSG_BT(ret == (int)uid, "No match in UID received from cookie");
 }
 
 //privileges drop and no smack rule
@@ -377,7 +377,7 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_07_02_security_server_get_uid_by_cookie)
     uid_t uid;
 
     int ret = security_server_get_uid_by_cookie(cookie.data(), &uid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
                       "Error in security_server_get_uid_by_cookie(): " << ret);
 }
 
@@ -392,10 +392,10 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_07_03_security_server_get_uid_by_cookie)
     uid_t uid;
 
     int ret = security_server_get_uid_by_cookie(cookie.data(), &uid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
                       "Error in security_server_get_uid_by_cookie(): " << ret);
     ret = getuid();
-    RUNNER_ASSERT_MSG(ret == (int)uid, "No match in UID received from cookie");
+    RUNNER_ASSERT_MSG_BT(ret == (int)uid, "No match in UID received from cookie");
 }
 
 //---------------------------------------------------------------------------
@@ -407,10 +407,10 @@ RUNNER_CHILD_TEST(tc_unit_08_01_security_server_get_gid_by_cookie)
     gid_t gid;
 
     int ret = security_server_get_gid_by_cookie(cookie.data(), &gid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
                       "Error in security_server_get_gid_by_cookie(): " << ret);
     ret = getgid();
-    RUNNER_ASSERT_MSG(ret == (int)gid, "No match in GID received from cookie");
+    RUNNER_ASSERT_MSG_BT(ret == (int)gid, "No match in GID received from cookie");
 }
 
 //privileges drop and no smack rule
@@ -423,7 +423,7 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_08_02_security_server_get_gid_by_cookie)
     gid_t gid;
 
     int ret = security_server_get_gid_by_cookie(cookie.data(), &gid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED,
                       "Error in security_server_get_gid_by_cookie(): " << ret);
 }
 
@@ -438,9 +438,9 @@ RUNNER_CHILD_TEST_SMACK(tc_unit_08_03_security_server_get_gid_by_cookie)
     gid_t gid;
 
     int ret = security_server_get_gid_by_cookie(cookie.data(), &gid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
                       "Error in security_server_get_gid_by_cookie(): " << ret);
     ret = getgid();
-    RUNNER_ASSERT_MSG(ret == (int)gid, "No match in GID received from cookie");
+    RUNNER_ASSERT_MSG_BT(ret == (int)gid, "No match in GID received from cookie");
 }
 
index 27d0aa3..50cc4e5 100644 (file)
@@ -35,6 +35,7 @@
 #include <dpl/test/test_runner.h>
 #include <dpl/test/test_runner_child.h>
 #include <dpl/test/test_runner_multiprocess.h>
+#include <tests_common.h>
 #include <errno.h>
 #include <float.h>
 #include <fcntl.h>
@@ -117,7 +118,7 @@ int my_pipe_read(int fd, void *buf, size_t count) {
     ssize_t rest = count;
     ssize_t s;
     while (rest > 0) {
-        RUNNER_ASSERT_MSG(0 < (s = TEMP_FAILURE_RETRY(read(fd, ((char*)buf) + readf, rest))), "Error in read from pipe");
+        RUNNER_ASSERT_MSG_BT(0 < (s = TEMP_FAILURE_RETRY(read(fd, ((char*)buf) + readf, rest))), "Error in read from pipe");
         rest -= s;
         readf += s;
     }
@@ -135,7 +136,7 @@ int my_pipe_write(int fd, void *buf, size_t count) {
     ssize_t rest = count;
     ssize_t s;
     while (rest > 0) {
-        RUNNER_ASSERT_MSG(0 <= (s = TEMP_FAILURE_RETRY(write(fd, ((char*)buf) + writef, rest))), "Error in write to pipe");
+        RUNNER_ASSERT_MSG_BT(0 <= (s = TEMP_FAILURE_RETRY(write(fd, ((char*)buf) + writef, rest))), "Error in write to pipe");
         rest -= s;
         writef += s;
     }
@@ -162,7 +163,7 @@ int communication_succeeded(int result_code) {
 timeval my_gettime() {
     timeval t;
     int res = gettimeofday(&t, NULL);
-    RUNNER_ASSERT_MSG(res == 0, "gettimeofday() returned error value: " << res);
+    RUNNER_ASSERT_MSG_BT(res == 0, "gettimeofday() returned error value: " << res);
     return t;
 }
 
@@ -286,13 +287,13 @@ RUNNER_TEST(m000_security_server_test_the_tests) {
     for (int i=0; i < NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = my_nanosecsleep((long) ((i+1)*QUANTUM*1000));
-        RUNNER_ASSERT_MSG(ret == 0, "system sleep function returned premature wake-up; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == 0, "system sleep function returned premature wake-up; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "my_nanosecsleep");
-    RUNNER_ASSERT_MSG((stats.average_duration>expected_avarage_min) && (stats.average_duration<expected_avarage_max), "Avarage time is suspicious - check the issue; stats.average_duration=" << stats.average_duration);
-    RUNNER_ASSERT_MSG((stats.minimal_duration>expected_min_min) && (stats.minimal_duration<expected_min_max), "Minimal time is suspicious - check the issue; stats.minimal_duration=" << stats.minimal_duration);
-    RUNNER_ASSERT_MSG((stats.maximal_duration>expected_max_min) && (stats.maximal_duration<expected_max_max), "Maximal time is suspicious - check the issue; stats.maximal_duration=" << stats.maximal_duration);
+    RUNNER_ASSERT_MSG_BT((stats.average_duration>expected_avarage_min) && (stats.average_duration<expected_avarage_max), "Avarage time is suspicious - check the issue; stats.average_duration=" << stats.average_duration);
+    RUNNER_ASSERT_MSG_BT((stats.minimal_duration>expected_min_min) && (stats.minimal_duration<expected_min_max), "Minimal time is suspicious - check the issue; stats.minimal_duration=" << stats.minimal_duration);
+    RUNNER_ASSERT_MSG_BT((stats.maximal_duration>expected_max_min) && (stats.maximal_duration<expected_max_max), "Maximal time is suspicious - check the issue; stats.maximal_duration=" << stats.maximal_duration);
 }
 
 /*
@@ -305,7 +306,7 @@ RUNNER_TEST(m010_security_server_security_server_get_gid) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_get_gid(EXISTING_GROUP_NAME);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_get_gid");
@@ -324,7 +325,7 @@ RUNNER_TEST(m030_security_server_request_cookie) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_request_cookie(cookie, cookie_size);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_request_cookie");
@@ -347,10 +348,10 @@ RUNNER_MULTIPROCESS_TEST(m031_security_server_request_cookie_first_time_only) {
     int number_of_calls;
     double duration_of_calls;
     /*initialize pipes - one pipe for one child process*/
-    RUNNER_ASSERT_MSG(0 == pipe(pipefd), "error in pipe");
+    RUNNER_ASSERT_MSG_BT(0 == pipe(pipefd), "error in pipe");
     initialize_stats(&stats);
     for (int i = 0; i < NUMBER_OF_CALLS; i++) {
-        RUNNER_ASSERT_MSG(-1 != (cpid = fork()), "error in fork    #i = " << i);
+        RUNNER_ASSERT_MSG_BT(-1 != (cpid = fork()), "error in fork    #i = " << i);
         if (cpid == 0) {        /* Child*/
              close(pipefd[0]);                 /* Close unused read end */
              timeval start_time;
@@ -367,16 +368,16 @@ RUNNER_MULTIPROCESS_TEST(m031_security_server_request_cookie_first_time_only) {
                  number_of_calls = 0;
                  duration_of_calls = 0.0;
              }
-             RUNNER_ASSERT_MSG(my_pipe_write(pipefd[1], &number_of_calls, sizeof(number_of_calls)) == sizeof(number_of_calls), "error in write number of calls to pipe");
-             RUNNER_ASSERT_MSG(my_pipe_write(pipefd[1], &duration_of_calls, sizeof(duration_of_calls)) == sizeof(duration_of_calls), "error in write duration of calls to pipe");
+             RUNNER_ASSERT_MSG_BT(my_pipe_write(pipefd[1], &number_of_calls, sizeof(number_of_calls)) == sizeof(number_of_calls), "error in write number of calls to pipe");
+             RUNNER_ASSERT_MSG_BT(my_pipe_write(pipefd[1], &duration_of_calls, sizeof(duration_of_calls)) == sizeof(duration_of_calls), "error in write duration of calls to pipe");
              close(pipefd[1]);
              exit(EXIT_SUCCESS);
          } else
          {   /* Parent */
-             RUNNER_ASSERT_MSG(my_pipe_read(pipefd[0], &number_of_calls, sizeof(number_of_calls)) == sizeof(number_of_calls), "error in read number of calls to pipe");
-             RUNNER_ASSERT_MSG(my_pipe_read(pipefd[0], &duration_of_calls, sizeof(duration_of_calls)) == sizeof(duration_of_calls), "error in read duration of calls to pipe");
+             RUNNER_ASSERT_MSG_BT(my_pipe_read(pipefd[0], &number_of_calls, sizeof(number_of_calls)) == sizeof(number_of_calls), "error in read number of calls to pipe");
+             RUNNER_ASSERT_MSG_BT(my_pipe_read(pipefd[0], &duration_of_calls, sizeof(duration_of_calls)) == sizeof(duration_of_calls), "error in read duration of calls to pipe");
 
-             RUNNER_ASSERT_MSG(number_of_calls > 0, "commmunication error");
+             RUNNER_ASSERT_MSG_BT(number_of_calls > 0, "commmunication error");
              stats_update(&stats, number_of_calls, duration_of_calls);
          }
         /*parent*/
@@ -395,7 +396,7 @@ RUNNER_TEST(m040_security_server_get_cookie_size) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         cookie_size = security_server_get_cookie_size();
-        RUNNER_ASSERT_MSG(cookie_size > 0, "cookie_size = " << cookie_size);
+        RUNNER_ASSERT_MSG_BT(cookie_size > 0, "cookie_size = " << cookie_size);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_get_cookie_size");
@@ -418,7 +419,7 @@ RUNNER_TEST(m050_security_server_check_privilege) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_check_privilege(recved_cookie, (gid_t)call_gid);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_check_privilege");
@@ -440,19 +441,19 @@ RUNNER_TEST(m060_security_server_check_privilege_by_cookie) {
     int ret;
     readwrite_stats stats;
     initialize_stats(&stats);
-    RUNNER_ASSERT_MSG(-1 != system("touch /opt/home/root/pid_cycle"),
+    RUNNER_ASSERT_MSG_BT(-1 != system("touch /opt/home/root/pid_cycle"),
                 "Cannot prepare environment for test.");
-    RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(subject_label),
+    RUNNER_ASSERT_MSG_BT(0 == smack_set_label_for_self(subject_label),
                 "Cannot prepare environment for test.");
-    RUNNER_ASSERT_MSG(0 == (ret = smack_accesses_new(&handle)), "Error in smack_accesses_new()");
-    RUNNER_ASSERT_MSG(0 == smack_accesses_add(handle,
+    RUNNER_ASSERT_MSG_BT(0 == (ret = smack_accesses_new(&handle)), "Error in smack_accesses_new()");
+    RUNNER_ASSERT_MSG_BT(0 == smack_accesses_add(handle,
                                subject_label,
                                object_label,
                                access_rights), "Error in smack_accesses_add()" );
-    RUNNER_ASSERT_MSG(0 == (ret = smack_accesses_apply(handle)), "Error in smack_accesses_apply(); ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(0 == (ret = smack_accesses_apply(handle)), "Error in smack_accesses_apply(); ret = " << ret);
     smack_accesses_free(handle);
-    RUNNER_ASSERT_MSG(0 == (ret = smack_set_label_for_self(subject_label)), "Error in smack_set_label_for_self(); ret = " << ret);
-    RUNNER_ASSERT_MSG(SECURITY_SERVER_API_SUCCESS == security_server_request_cookie(cookie, cookie_size), "Error in security_server_request_cookie()");
+    RUNNER_ASSERT_MSG_BT(0 == (ret = smack_set_label_for_self(subject_label)), "Error in smack_set_label_for_self(); ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_SUCCESS == security_server_request_cookie(cookie, cookie_size), "Error in security_server_request_cookie()");
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         /*odd(i) - ask for possessed privileges, even(i) ask for not possessed privileges */
@@ -467,7 +468,7 @@ RUNNER_TEST(m060_security_server_check_privilege_by_cookie) {
                       object_label,
                       access_rights_ext);
 
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_check_privilege_by_cookie");
@@ -486,30 +487,30 @@ RUNNER_MULTIPROCESS_TEST(m070_security_server_check_privilege_by_sockfd) {
     readwrite_stats stats;
     initialize_stats(&stats);
     smack_accesses *handle;
-    RUNNER_ASSERT(0 == smack_accesses_new(&handle));
-    RUNNER_ASSERT(0 == smack_accesses_add(handle,
+    RUNNER_ASSERT_BT(0 == smack_accesses_new(&handle));
+    RUNNER_ASSERT_BT(0 == smack_accesses_add(handle,
                            subject_label,
                            object_label,
                            access_rights));
-    RUNNER_ASSERT(0 == smack_accesses_apply(handle));
+    RUNNER_ASSERT_BT(0 == smack_accesses_apply(handle));
     smack_accesses_free(handle);
     int pid = fork();
-    RUNNER_ASSERT(-1 != pid);
+    RUNNER_ASSERT_BT(-1 != pid);
     if (0 == pid) {
         // child
         int sockfd = create_new_socket();
-        RUNNER_ASSERT_MSG(sockfd >= 0, "create_new_socket() failed");
+        RUNNER_ASSERT_MSG_BT(sockfd >= 0, "create_new_socket() failed");
 
         SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
 
-        RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
+        RUNNER_ASSERT_MSG_BT(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
 
-        RUNNER_ASSERT_MSG(listen(sockfd, 5) >= 0, "child listen failed");
+        RUNNER_ASSERT_MSG_BT(listen(sockfd, 5) >= 0, "child listen failed");
 
         struct sockaddr_un client_addr;
         socklen_t client_len = sizeof(client_addr);
         int csockfd;
-        RUNNER_ASSERT_MSG((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
+        RUNNER_ASSERT_MSG_BT((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
 
         close(csockfd);
         exit(EXIT_SUCCESS);
@@ -518,7 +519,7 @@ RUNNER_MULTIPROCESS_TEST(m070_security_server_check_privilege_by_sockfd) {
         //parent
         sleep(2);
         int sockfd = connect_to_testserver();
-        RUNNER_ASSERT_MSG(sockfd >= 0, "connect_to_testserver() failed");
+        RUNNER_ASSERT_MSG_BT(sockfd >= 0, "connect_to_testserver() failed");
 
         SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
 
@@ -535,7 +536,7 @@ RUNNER_MULTIPROCESS_TEST(m070_security_server_check_privilege_by_sockfd) {
                              sockfd,
                              object_label,
                              access_rights);
-            RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+            RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
             end_stats_update(&stats);
         }
 
@@ -552,13 +553,13 @@ RUNNER_TEST(m080_security_server_get_cookie_pid) {
     cookie_size = security_server_get_cookie_size();
     char cookie[cookie_size];
     ret = security_server_request_cookie(cookie, cookie_size);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "security_server_request_cookie failed; ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "security_server_request_cookie failed; ret = " << ret);
     readwrite_stats stats;
     initialize_stats(&stats);
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_get_cookie_pid(cookie);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_request_cookie");
@@ -575,7 +576,7 @@ RUNNER_TEST(m090_security_server_is_pwd_valid) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_is_pwd_valid");
@@ -591,7 +592,7 @@ RUNNER_TEST(m100_security_server_set_pwd) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_set_pwd("this_is_current_pwd", "this_is_new_pwd", 20, 365);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_set_pwd");
@@ -607,7 +608,7 @@ RUNNER_TEST(m110_security_server_set_pwd_validity) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_set_pwd_validity(2);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_set_pwd_validity");
@@ -623,7 +624,7 @@ RUNNER_TEST(m120_security_server_set_pwd_max_challenge) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_set_pwd_max_challenge(3);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_set_pwd_max_challenge");
@@ -639,7 +640,7 @@ RUNNER_TEST(m130_security_server_reset_pwd) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_reset_pwd("apud", 1, 2);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_reset_pwd");
@@ -656,7 +657,7 @@ RUNNER_TEST(m140_security_server_chk_pwd) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_chk_pwd("is_this_password", &attempt, &max_attempt, &expire_sec);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_chk_pwd");
@@ -672,7 +673,7 @@ RUNNER_TEST(m150_security_server_set_pwd_history) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_set_pwd_history(100);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_set_pwd_history");
@@ -690,7 +691,7 @@ RUNNER_TEST(m160_security_server_app_give_access) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_app_give_access(customer_label, customer_pid);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_app_give_access");
@@ -710,7 +711,7 @@ RUNNER_TEST(m170_security_server_check_privilege_by_pid) {
     for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
         start_stats_update(&stats);
         ret = security_server_check_privilege_by_pid(pid, object, access_rights);
-        RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
         end_stats_update(&stats);
     }
     finish_stats(&stats, "security_server_check_privilege_by_pid");
index 2f977f2..8f69bc0 100644 (file)
 #define ENVIRONMENT                                                       \
     do {                                                                  \
         const char *subject_label = "mylabel";                            \
-        RUNNER_ASSERT_MSG(-1 != system("touch /opt/home/root/pid_cycle"), \
+        RUNNER_ASSERT_MSG_BT(-1 != system("touch /opt/home/root/pid_cycle"), \
             "Cannot prepare environment for test.");                      \
-        RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(subject_label),   \
+        RUNNER_ASSERT_MSG_BT(0 == smack_set_label_for_self(subject_label),   \
             "Cannot prepare environment for test.");                      \
-        RUNNER_ASSERT_MSG(-1 != setgid(1),                                \
+        RUNNER_ASSERT_MSG_BT(-1 != setgid(1),                                \
             "Cannot prepare environment for test.");                      \
-        RUNNER_ASSERT_MSG(-1 != setuid(1),                                \
+        RUNNER_ASSERT_MSG_BT(-1 != setuid(1),                                \
             "Cannot prepare environment for test");                       \
     } while (0)
 
 #define ENVIRONMENT_NOSMACK                                               \
     do {                                                                  \
         int fd = open("/opt/home/root/pid_cycle", O_CREAT|O_APPEND, 0444);\
-        RUNNER_ASSERT_MSG(fd >= 0,                                        \
+        RUNNER_ASSERT_MSG_BT(fd >= 0,                                        \
             "Couldn't create pid_cycle file. errno: " << strerror(errno));\
         close(fd);                                                        \
-        RUNNER_ASSERT_MSG(-1 != setgid(1),                                \
+        RUNNER_ASSERT_MSG_BT(-1 != setgid(1),                                \
             "Cannot prepare environment for test.");                      \
-        RUNNER_ASSERT_MSG(-1 != setuid(1),                                \
+        RUNNER_ASSERT_MSG_BT(-1 != setuid(1),                                \
             "Cannot prepare environment for test");                       \
     } while (0)
 
@@ -90,7 +90,7 @@ RUNNER_CHILD_TEST_SMACK(tc01_security_server_get_cookie_size)
     ENVIRONMENT;
 
     int ret = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(20 == ret, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(20 == ret, "ret = " << ret);
 }
 
 /*
@@ -107,7 +107,7 @@ RUNNER_CHILD_TEST_SMACK(tc02_security_server_request_cookie_normal_case)
     char cookie[20];
     int ret = security_server_request_cookie(cookie, 20);
     LogDebug("ret = " << ret);
-    RUNNER_ASSERT(SECURITY_SERVER_API_SUCCESS == ret);
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_SUCCESS == ret);
 }
 
 /*
@@ -124,7 +124,7 @@ RUNNER_CHILD_TEST_SMACK(tc03_security_server_request_cookie_too_small_buffer_siz
     char cookie[20];
     int ret = security_server_request_cookie(cookie, 10);
     LogDebug("ret = " << ret);
-    RUNNER_ASSERT(SECURITY_SERVER_API_ERROR_BUFFER_TOO_SMALL == ret);
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_ERROR_BUFFER_TOO_SMALL == ret);
 }
 
 /*
@@ -143,10 +143,10 @@ RUNNER_CHILD_TEST_SMACK(tc04_security_server_get_gid)
 
     int ret = security_server_get_gid("abc123xyz_pysiaczek");
     LogDebug("ret = " << ret);
-    RUNNER_ASSERT_MSG(SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT == ret, "Ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT == ret, "Ret: " << ret);
     ret = security_server_get_gid("root");
     LogDebug("ret = " << ret);
-    RUNNER_ASSERT_MSG(0 == ret, "Ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(0 == ret, "Ret: " << ret);
 }
 
 /*
@@ -170,20 +170,20 @@ RUNNER_CHILD_TEST_SMACK(tc05_check_privilege_by_cookie)
     access.add(subject_label, "security-server::api-cookie-check", "w", TRACE_FROM_HERE);
     access.apply(TRACE_FROM_HERE);
 
-    RUNNER_ASSERT(0 == smack_set_label_for_self(subject_label));
+    RUNNER_ASSERT_BT(0 == smack_set_label_for_self(subject_label));
 
-    RUNNER_ASSERT(SECURITY_SERVER_API_SUCCESS ==
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_SUCCESS ==
         security_server_request_cookie(cookie,20));
 
-    RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+    RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
-    RUNNER_ASSERT(SECURITY_SERVER_API_SUCCESS ==
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_SUCCESS ==
         security_server_check_privilege_by_cookie(
             cookie,
             object_label,
             access_rights));
 
-    RUNNER_ASSERT(SECURITY_SERVER_API_ERROR_ACCESS_DENIED ==
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_ERROR_ACCESS_DENIED ==
         security_server_check_privilege_by_cookie(
             cookie,
             object_label,
@@ -208,45 +208,45 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc06_check_privilege_by_sockfd)
     int result2 = -1;
 
     smack_accesses *handle;
-    RUNNER_ASSERT(0 == smack_accesses_new(&handle));
-    RUNNER_ASSERT(0 == smack_accesses_add(handle,
+    RUNNER_ASSERT_BT(0 == smack_accesses_new(&handle));
+    RUNNER_ASSERT_BT(0 == smack_accesses_add(handle,
             subject_label,
             object_label,
             access_rights));
-    RUNNER_ASSERT(0 == smack_accesses_apply(handle));
+    RUNNER_ASSERT_BT(0 == smack_accesses_apply(handle));
     smack_accesses_free(handle);
 
     int pid = fork();
     char *label;
-    RUNNER_ASSERT(-1 != pid);
+    RUNNER_ASSERT_BT(-1 != pid);
 
     if (0 == pid) {
         // child
-        RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
+        RUNNER_ASSERT_MSG_BT(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
 
         int sockfd = create_new_socket();
-        RUNNER_ASSERT_MSG(sockfd >= 0, "create_new_socket() failed");
+        RUNNER_ASSERT_MSG_BT(sockfd >= 0, "create_new_socket() failed");
 
         SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
 
         label = security_server_get_smacklabel_sockfd(sockfd);
-        RUNNER_ASSERT_MSG(label != NULL, "security_server_get_smacklabel_sockfd failed");
-        RUNNER_ASSERT_MSG(strcmp(label,"") == 0, "label is \"" << label << "\"");
+        RUNNER_ASSERT_MSG_BT(label != NULL, "security_server_get_smacklabel_sockfd failed");
+        RUNNER_ASSERT_MSG_BT(strcmp(label,"") == 0, "label is \"" << label << "\"");
         free(label);
 
-        RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+        RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
-        RUNNER_ASSERT_MSG(listen(sockfd, 5) >= 0, "child listen failed");
+        RUNNER_ASSERT_MSG_BT(listen(sockfd, 5) >= 0, "child listen failed");
 
         label = security_server_get_smacklabel_sockfd(sockfd);
-        RUNNER_ASSERT_MSG(label != NULL, "security_server_get_smacklabel_sockfd failed");
-        RUNNER_ASSERT_MSG(strcmp(label,"") == 0, "label is \"" << label << "\"");
+        RUNNER_ASSERT_MSG_BT(label != NULL, "security_server_get_smacklabel_sockfd failed");
+        RUNNER_ASSERT_MSG_BT(strcmp(label,"") == 0, "label is \"" << label << "\"");
         free(label);
 
         struct sockaddr_un client_addr;
         socklen_t client_len = sizeof(client_addr);
         int csockfd;
-        RUNNER_ASSERT_MSG((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
+        RUNNER_ASSERT_MSG_BT((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
 
         usleep(500);
 
@@ -256,13 +256,13 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc06_check_privilege_by_sockfd)
         // parent
         sleep(1);
         int sockfd = connect_to_testserver();
-        RUNNER_ASSERT_MSG(sockfd >= 0, "connect_to_testserver() failed");
+        RUNNER_ASSERT_MSG_BT(sockfd >= 0, "connect_to_testserver() failed");
 
         SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
 
         label = security_server_get_smacklabel_sockfd(sockfd);
-        RUNNER_ASSERT_MSG(label != NULL, "security_server_get_smacklabel_sockfd failed");
-        RUNNER_ASSERT_MSG(strcmp(label,subject_label) == 0, "label is \"" << label << "\"" << ", subject_label is \"" << subject_label << "\"" );
+        RUNNER_ASSERT_MSG_BT(label != NULL, "security_server_get_smacklabel_sockfd failed");
+        RUNNER_ASSERT_MSG_BT(strcmp(label,subject_label) == 0, "label is \"" << label << "\"" << ", subject_label is \"" << subject_label << "\"" );
         free(label);
 
         result1 = security_server_check_privilege_by_sockfd(
@@ -275,8 +275,8 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc06_check_privilege_by_sockfd)
             access_rights_ext);
     }
 
-    RUNNER_ASSERT_MSG(SECURITY_SERVER_API_SUCCESS == result1, "result = " << result1);
-    RUNNER_ASSERT_MSG(SECURITY_SERVER_API_ERROR_ACCESS_DENIED == result2, "result = " << result2);
+    RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_SUCCESS == result1, "result = " << result1);
+    RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_ERROR_ACCESS_DENIED == result2, "result = " << result2);
 }
 
 /*
@@ -304,25 +304,25 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc07_check_privilege_by_sockfd)
     access.apply(TRACE_FROM_HERE);
 
     int pid = fork();
-    RUNNER_ASSERT(-1 != pid);
+    RUNNER_ASSERT_BT(-1 != pid);
 
     if (0 == pid) {
 
         pid = fork();
-        RUNNER_ASSERT(-1 != pid);
+        RUNNER_ASSERT_BT(-1 != pid);
 
         if (0 == pid) {
             // child
             int sockfd = create_new_socket();
-            RUNNER_ASSERT_MSG(sockfd >= 0, "create_new_socket() failed");
+            RUNNER_ASSERT_MSG_BT(sockfd >= 0, "create_new_socket() failed");
 
             SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
 
-            RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
+            RUNNER_ASSERT_MSG_BT(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
 
-            RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+            RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
-            RUNNER_ASSERT_MSG(listen(sockfd, 5) >= 0, "child listen failed");
+            RUNNER_ASSERT_MSG_BT(listen(sockfd, 5) >= 0, "child listen failed");
 
             struct sockaddr_un client_addr;
             socklen_t client_len = sizeof(client_addr);
@@ -335,7 +335,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc07_check_privilege_by_sockfd)
             // parent
             sleep(1);
             int sockfd = connect_to_testserver();
-            RUNNER_ASSERT_MSG(sockfd >= 0, "connect_to_testserver() failed");
+            RUNNER_ASSERT_MSG_BT(sockfd >= 0, "connect_to_testserver() failed");
 
             result1 = security_server_check_privilege_by_sockfd(
                 sockfd,
@@ -348,8 +348,8 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc07_check_privilege_by_sockfd)
 
             close(sockfd);
 
-            RUNNER_ASSERT_MSG(SECURITY_SERVER_API_SUCCESS == result1, "result1 = " << result1);
-            RUNNER_ASSERT_MSG(SECURITY_SERVER_API_ERROR_ACCESS_DENIED == result2, " result2 = " << result2);
+            RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_SUCCESS == result1, "result1 = " << result1);
+            RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_ERROR_ACCESS_DENIED == result2, " result2 = " << result2);
         }
     }
 }
@@ -367,7 +367,7 @@ RUNNER_CHILD_TEST_NOSMACK(tc01_security_server_get_cookie_size_nosmack)
     ENVIRONMENT_NOSMACK;
 
     int ret = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(ret == 20, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == 20, "ret = " << ret);
 }
 
 RUNNER_CHILD_TEST_NOSMACK(tc02_security_server_request_cookie_normal_case_nosmack)
@@ -376,7 +376,7 @@ RUNNER_CHILD_TEST_NOSMACK(tc02_security_server_request_cookie_normal_case_nosmac
 
     char cookie[20];
     int ret = security_server_request_cookie(cookie, 20);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 RUNNER_CHILD_TEST_NOSMACK(tc03_security_server_request_cookie_too_small_buffer_size_nosmack)
@@ -385,7 +385,7 @@ RUNNER_CHILD_TEST_NOSMACK(tc03_security_server_request_cookie_too_small_buffer_s
 
     char cookie[20];
     int ret = security_server_request_cookie(cookie, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_BUFFER_TOO_SMALL, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_BUFFER_TOO_SMALL, "ret = " << ret);
 }
 
 RUNNER_CHILD_TEST_NOSMACK(tc04_security_server_get_gid_nosmack)
@@ -393,9 +393,9 @@ RUNNER_CHILD_TEST_NOSMACK(tc04_security_server_get_gid_nosmack)
     ENVIRONMENT_NOSMACK;
 
     int ret = security_server_get_gid("definitely_not_existing_object");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT, "ret = " << ret);
     ret = security_server_get_gid("root");
-    RUNNER_ASSERT_MSG(ret == 0, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "ret = " << ret);
 }
 
 /*
@@ -410,16 +410,16 @@ RUNNER_CHILD_TEST_NOSMACK(tc05_check_privilege_by_cookie_nosmack)
     char cookie[20];
     const char* object_label = "tc05objectlabel";
 
-    RUNNER_ASSERT(security_server_request_cookie(cookie,20) == SECURITY_SERVER_API_SUCCESS);
+    RUNNER_ASSERT_BT(security_server_request_cookie(cookie,20) == SECURITY_SERVER_API_SUCCESS);
 
-    RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+    RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
-    RUNNER_ASSERT(SECURITY_SERVER_API_SUCCESS ==
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_SUCCESS ==
         security_server_check_privilege_by_cookie(cookie, object_label, "r"));
 
     //On NOSMACK env security server should return success on any accesses, even those that are
     //incorrect.
-    RUNNER_ASSERT(SECURITY_SERVER_API_SUCCESS ==
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_SUCCESS ==
         security_server_check_privilege_by_cookie(cookie, object_label, "rw"));
 }
 
@@ -446,33 +446,33 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc06_check_privilege_by_sockfd_nosmack)
 
     int pid = fork();
     char* label;
-    RUNNER_ASSERT(pid >= 0);
+    RUNNER_ASSERT_BT(pid >= 0);
 
     int ret;
 
     if (pid == 0) { //child process - server
         //create new socket
         int sockfd = create_new_socket();
-        RUNNER_ASSERT_MSG(sockfd >= 0, "create_new_socket() failed");
+        RUNNER_ASSERT_MSG_BT(sockfd >= 0, "create_new_socket() failed");
 
         SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
 
         //check if get_smacklabel_sockfd works correctly
         label = security_server_get_smacklabel_sockfd(sockfd);
-        RUNNER_ASSERT_MSG(label != NULL, "security_server_get_smacklabel_sockfd failed");
+        RUNNER_ASSERT_MSG_BT(label != NULL, "security_server_get_smacklabel_sockfd failed");
         ret = strcmp(label, "");
         free(label);
-        RUNNER_ASSERT_MSG(ret == 0, "label is \"" << label << "\"");
+        RUNNER_ASSERT_MSG_BT(ret == 0, "label is \"" << label << "\"");
 
-        RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+        RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
-        RUNNER_ASSERT_MSG(listen(sockfd, 5) >= 0, "child listen failed");
+        RUNNER_ASSERT_MSG_BT(listen(sockfd, 5) >= 0, "child listen failed");
 
         struct sockaddr_un client_addr;
         socklen_t client_len = sizeof(client_addr);
 
         int csockfd;
-        RUNNER_ASSERT_MSG((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
+        RUNNER_ASSERT_MSG_BT((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
 
         //wait a little bit for parent to do it's job
         usleep(200);
@@ -484,22 +484,22 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc06_check_privilege_by_sockfd_nosmack)
         //parent
         sleep(1);
         int sockfd = connect_to_testserver();
-        RUNNER_ASSERT_MSG(sockfd >= 0, "Failed to connect to server.");
+        RUNNER_ASSERT_MSG_BT(sockfd >= 0, "Failed to connect to server.");
 
         SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
 
         label = security_server_get_smacklabel_sockfd(sockfd);
-        RUNNER_ASSERT_MSG(label != NULL, "get_smacklabel_sockfd failed.");
+        RUNNER_ASSERT_MSG_BT(label != NULL, "get_smacklabel_sockfd failed.");
         ret = strcmp(label, "");
         free(label);
-        RUNNER_ASSERT_MSG(ret == 0, "label is \"" << label << "\"");
+        RUNNER_ASSERT_MSG_BT(ret == 0, "label is \"" << label << "\"");
 
         result1 = security_server_check_privilege_by_sockfd(sockfd, object_label, "r");
         result2 = security_server_check_privilege_by_sockfd(sockfd, object_label, "rw");
     }
 
-    RUNNER_ASSERT_MSG(result1 == SECURITY_SERVER_API_SUCCESS, "result = " << result1);
-    RUNNER_ASSERT_MSG(result2 == SECURITY_SERVER_API_SUCCESS, "result = " << result2);
+    RUNNER_ASSERT_MSG_BT(result1 == SECURITY_SERVER_API_SUCCESS, "result = " << result1);
+    RUNNER_ASSERT_MSG_BT(result2 == SECURITY_SERVER_API_SUCCESS, "result = " << result2);
 }
 
 /**
@@ -513,32 +513,32 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc07_check_privilege_by_sockfd_nosmack)
     int result2 = -1;
 
     int pid = fork();
-    RUNNER_ASSERT(-1 != pid);
+    RUNNER_ASSERT_BT(-1 != pid);
 
     if (pid == 0) {
 
         pid = fork();
-        RUNNER_ASSERT(-1 != pid);
+        RUNNER_ASSERT_BT(-1 != pid);
 
         if (pid == 0) { //child process
             //Create socket
             int sockfd = create_new_socket();
-            RUNNER_ASSERT_MSG(sockfd >= 0, "create_new_socket() failed");
+            RUNNER_ASSERT_MSG_BT(sockfd >= 0, "create_new_socket() failed");
 
             SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
 
             //Drop privileges
-            RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+            RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
             //Prepare for accepting
-            RUNNER_ASSERT_MSG(listen(sockfd, 5) >= 0, "child listen failed");
+            RUNNER_ASSERT_MSG_BT(listen(sockfd, 5) >= 0, "child listen failed");
 
             struct sockaddr_un client_addr;
             socklen_t client_len = sizeof(client_addr);
 
             //Accept connections
             int csockfd;
-            RUNNER_ASSERT_MSG((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
+            RUNNER_ASSERT_MSG_BT((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
 
             //wait a little bit for parent to do it's job
             usleep(200);
@@ -548,14 +548,14 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc07_check_privilege_by_sockfd_nosmack)
             exit(0);
         } else {    //parent process
             //Drop root privileges
-            RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+            RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
             //Wait for server to set up
             sleep(1);
 
             //Connect and check privileges
             int sockfd = connect_to_testserver();
-            RUNNER_ASSERT_MSG(sockfd >= 0, "Failed to create socket fd.");
+            RUNNER_ASSERT_MSG_BT(sockfd >= 0, "Failed to create socket fd.");
 
             result1 = security_server_check_privilege_by_sockfd(sockfd, object_label, "r");
             result2 = security_server_check_privilege_by_sockfd(sockfd, object_label, "rw");
@@ -563,8 +563,8 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc07_check_privilege_by_sockfd_nosmack)
             close(sockfd);
 
             //Both results (just like in the previous test case) should return success.
-            RUNNER_ASSERT_MSG(SECURITY_SERVER_API_SUCCESS == result1, "result1 = " << result1);
-            RUNNER_ASSERT_MSG(SECURITY_SERVER_API_SUCCESS == result2, "result2 = " << result2);
+            RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_SUCCESS == result1, "result1 = " << result1);
+            RUNNER_ASSERT_MSG_BT(SECURITY_SERVER_API_SUCCESS == result2, "result2 = " << result2);
         }
     }
 }
@@ -590,270 +590,270 @@ error:
 RUNNER_TEST(tc10_security_server_get_uid_by_cookie)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //checking function
     uid_t cookieUid, realUid;
     realUid = getuid();
     retval = security_server_get_uid_by_cookie(&cookie[0], &cookieUid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie. My uid: " << realUid << " Server error: " << retval);
-    RUNNER_ASSERT_MSG(realUid == cookieUid, "No match in received UID");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie. My uid: " << realUid << " Server error: " << retval);
+    RUNNER_ASSERT_MSG_BT(realUid == cookieUid, "No match in received UID");
 
     //checking for input parameters
     retval = security_server_get_uid_by_cookie(NULL, &cookieUid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in checking input parameters by function");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in checking input parameters by function");
     retval = security_server_get_uid_by_cookie(&cookie[0], NULL);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in checking input parameters by function");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in checking input parameters by function");
 }
 
 RUNNER_CHILD_TEST_SMACK(tc11_security_server_get_uid_by_cookie_smack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG(smack_revoke_subject("BialyMis") == 0, "Error in smack_revoke_subject");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(smack_revoke_subject("BialyMis") == 0, "Error in smack_revoke_subject");
     //drop privileges
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     //checking function
     uid_t cookieUid;
     retval = security_server_get_uid_by_cookie(&cookie[0], &cookieUid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "Socket not protected by smack");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "Socket not protected by smack");
 }
 
 RUNNER_CHILD_TEST_SMACK(tc12_security_server_get_uid_by_cookie_smack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     uid_t realUid = getuid();
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
     //drop privileges
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     //checking function
     uid_t cookieUid;
     retval = security_server_get_uid_by_cookie(&cookie[0], &cookieUid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie");
-    RUNNER_ASSERT_MSG(realUid == cookieUid, "No match in received UID");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie");
+    RUNNER_ASSERT_MSG_BT(realUid == cookieUid, "No match in received UID");
 }
 
 RUNNER_CHILD_TEST_NOSMACK(tc12_security_server_get_uid_by_cookie_nosmack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     uid_t realUid = getuid();
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //drop privileges
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     //checking function
     uid_t cookieUid;
     retval = security_server_get_uid_by_cookie(&cookie[0], &cookieUid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie");
-    RUNNER_ASSERT_MSG(realUid == cookieUid, "No match in received UID");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie");
+    RUNNER_ASSERT_MSG_BT(realUid == cookieUid, "No match in received UID");
 }
 
 RUNNER_CHILD_TEST_SMACK(tc13_security_server_get_uid_by_cookie_smack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
-    RUNNER_ASSERT_MSG(apply_smack_rule("BialyMis", "security-server::api-cookie-get", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-get", "w") == 0, "Error in adding rule");
     //drop privileges
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //checking function
     uid_t cookieUid, realUid = getuid();
     retval = security_server_get_uid_by_cookie(&cookie[0], &cookieUid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie");
-    RUNNER_ASSERT_MSG(realUid == cookieUid, "No match in received UID");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie");
+    RUNNER_ASSERT_MSG_BT(realUid == cookieUid, "No match in received UID");
 }
 
 RUNNER_CHILD_TEST_NOSMACK(tc13_security_server_get_uid_by_cookie_nosmack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     //drop privileges
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //checking function
     uid_t cookieUid, realUid = getuid();
     retval = security_server_get_uid_by_cookie(&cookie[0], &cookieUid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie");
-    RUNNER_ASSERT_MSG(realUid == cookieUid, "No match in received UID");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get UID from cookie");
+    RUNNER_ASSERT_MSG_BT(realUid == cookieUid, "No match in received UID");
 }
 
 RUNNER_TEST(tc14_security_server_get_gid_by_cookie)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //checking function
     gid_t cookieGid, realGid;
     realGid = getgid();
     retval = security_server_get_gid_by_cookie(&cookie[0], &cookieGid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
-    RUNNER_ASSERT_MSG(realGid == cookieGid, "No match in received GID");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
+    RUNNER_ASSERT_MSG_BT(realGid == cookieGid, "No match in received GID");
 
     //checking for input parameters
     retval = security_server_get_gid_by_cookie(NULL, &cookieGid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in checking input parameters by function");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in checking input parameters by function");
     retval = security_server_get_gid_by_cookie(&cookie[0], NULL);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in checking input parameters by function");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "Error in checking input parameters by function");
 
 }
 
 RUNNER_CHILD_TEST_SMACK(tc15_security_server_get_gid_by_cookie_smack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG(smack_revoke_subject("BialyMis") == 0, "Error in smack_revoke_subject");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(smack_revoke_subject("BialyMis") == 0, "Error in smack_revoke_subject");
     //drop privileges
-    RUNNER_ASSERT_MSG(setgid(APP_GID) == 0, "Unable to drop privileges");
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setgid(APP_GID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     //checking function
     gid_t cookieGid, realGid;
     realGid = getgid();
     retval = security_server_get_gid_by_cookie(&cookie[0], &cookieGid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "Socket not protected by smack");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "Socket not protected by smack");
 }
 
 RUNNER_CHILD_TEST_SMACK(tc16_security_server_get_gid_by_cookie_smack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     std::vector<char> cookie(cookieSize);
 
     gid_t realGid = getgid();
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
     //drop privileges
-    RUNNER_ASSERT_MSG(setgid(APP_GID) == 0, "Unable to drop privileges");
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setgid(APP_GID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     //checking function
     gid_t cookieGid;
     retval = security_server_get_gid_by_cookie(&cookie[0], &cookieGid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
-    RUNNER_ASSERT_MSG(realGid == cookieGid, "No match in received GID. ReadGid: " << realGid << " CookieGid: " << cookieGid);
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
+    RUNNER_ASSERT_MSG_BT(realGid == cookieGid, "No match in received GID. ReadGid: " << realGid << " CookieGid: " << cookieGid);
 }
 
 RUNNER_CHILD_TEST_NOSMACK(tc16_security_server_get_gid_by_cookie_nosmack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     std::vector<char> cookie(cookieSize);
 
     gid_t realGid = getgid();
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //drop privileges
-    RUNNER_ASSERT_MSG(setgid(APP_GID) == 0, "Unable to drop privileges");
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setgid(APP_GID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     //checking function
     gid_t cookieGid;
     retval = security_server_get_gid_by_cookie(&cookie[0], &cookieGid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
-    RUNNER_ASSERT_MSG(realGid == cookieGid, "No match in received GID. ReadGid: " << realGid << " CookieGid: " << cookieGid);
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
+    RUNNER_ASSERT_MSG_BT(realGid == cookieGid, "No match in received GID. ReadGid: " << realGid << " CookieGid: " << cookieGid);
 }
 
 RUNNER_CHILD_TEST_SMACK(tc17_security_server_get_gid_by_cookie_smack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
-    RUNNER_ASSERT_MSG(apply_smack_rule("BialyMis", "security-server::api-cookie-get", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-get", "w") == 0, "Error in adding rule");
     //drop privileges
-    RUNNER_ASSERT_MSG(setgid(APP_GID) == 0, "Unable to drop privileges");
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setgid(APP_GID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //checking function
     gid_t cookieGid, realGid = getgid();
     retval = security_server_get_gid_by_cookie(&cookie[0], &cookieGid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
-    RUNNER_ASSERT_MSG(realGid == cookieGid, "No match in received GID. ReadGid: " << realGid << " CookieGid: " << cookieGid);
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
+    RUNNER_ASSERT_MSG_BT(realGid == cookieGid, "No match in received GID. ReadGid: " << realGid << " CookieGid: " << cookieGid);
 }
 
 RUNNER_CHILD_TEST_NOSMACK(tc17_security_server_get_gid_by_cookie_nosmack)
 {
     int cookieSize = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(cookieSize == 20, "Wrong cookie size");
+    RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     //drop privileges
-    RUNNER_ASSERT_MSG(setgid(APP_GID) == 0, "Unable to drop privileges");
-    RUNNER_ASSERT_MSG(setuid(APP_UID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setgid(APP_GID) == 0, "Unable to drop privileges");
+    RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
     std::vector<char> cookie(cookieSize);
     int retval = security_server_request_cookie(&cookie[0], cookieSize);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //checking function
     gid_t cookieGid, realGid = getgid();
     retval = security_server_get_gid_by_cookie(&cookie[0], &cookieGid);
-    RUNNER_ASSERT_MSG(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
-    RUNNER_ASSERT_MSG(realGid == cookieGid, "No match in received GID. ReadGid: " << realGid << " CookieGid: " << cookieGid);
+    RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get GID from cookie");
+    RUNNER_ASSERT_MSG_BT(realGid == cookieGid, "No match in received GID. ReadGid: " << realGid << " CookieGid: " << cookieGid);
 }
 
 RUNNER_TEST_SMACK(tc18_security_server_get_smacklabel_cookie) {
@@ -866,22 +866,22 @@ RUNNER_TEST_SMACK(tc18_security_server_get_smacklabel_cookie) {
     char *cookie = NULL;
 
     int cookie_size = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(PROPER_COOKIE_SIZE == cookie_size, "Wrong cookie size from security-server");
+    RUNNER_ASSERT_MSG_BT(PROPER_COOKIE_SIZE == cookie_size, "Wrong cookie size from security-server");
 
     mypid = getpid();
 
     cookie = (char*) calloc(cookie_size, 1);
-    RUNNER_ASSERT_MSG(NULL != cookie, "Memory allocation error");
+    RUNNER_ASSERT_MSG_BT(NULL != cookie, "Memory allocation error");
 
     res = security_server_request_cookie(cookie, cookie_size);
     if (res != SECURITY_SERVER_API_SUCCESS) {
         free(cookie);
-        RUNNER_ASSERT_MSG(res == SECURITY_SERVER_API_SUCCESS, "Error in requesting cookie from security-server");
+        RUNNER_ASSERT_MSG_BT(res == SECURITY_SERVER_API_SUCCESS, "Error in requesting cookie from security-server");
     }
 
     label_ss = security_server_get_smacklabel_cookie(cookie);
     free(cookie);
-    RUNNER_ASSERT_MSG(label_ss != NULL, "Error in getting label by cookie");
+    RUNNER_ASSERT_MSG_BT(label_ss != NULL, "Error in getting label by cookie");
 
 
     std::string label_cookie(label_ss);
@@ -890,12 +890,12 @@ RUNNER_TEST_SMACK(tc18_security_server_get_smacklabel_cookie) {
     res = smack_new_label_from_self(&label_smack);
     if (res < 0) {
         free(label_smack);
-        RUNNER_ASSERT_MSG(res == 0, "Error in getting self SMACK label");
+        RUNNER_ASSERT_MSG_BT(res == 0, "Error in getting self SMACK label");
     }
     std::string label_self(label_smack ? label_smack : "");
     free(label_smack);
 
-    RUNNER_ASSERT_MSG(label_self == label_cookie, "No match in SMACK labels");
+    RUNNER_ASSERT_MSG_BT(label_self == label_cookie, "No match in SMACK labels");
 
 
     //TODO: here could be label change using SMACK API and checking if it
@@ -919,11 +919,11 @@ RUNNER_TEST_NOSMACK(tc18_security_server_get_smacklabel_cookie_nosmack) {
     char* cookie = NULL;
 
     int cookie_size = security_server_get_cookie_size();
-    RUNNER_ASSERT_MSG(PROPER_COOKIE_SIZE == cookie_size,
+    RUNNER_ASSERT_MSG_BT(PROPER_COOKIE_SIZE == cookie_size,
             "Wrong cookie size from security-server. Size: " << cookie_size);
 
     cookie = (char*) calloc(cookie_size, sizeof(char));
-    RUNNER_ASSERT_MSG(NULL != cookie, "Memory allocation error");
+    RUNNER_ASSERT_MSG_BT(NULL != cookie, "Memory allocation error");
 
     mypid = getpid();
 
@@ -931,16 +931,16 @@ RUNNER_TEST_NOSMACK(tc18_security_server_get_smacklabel_cookie_nosmack) {
     res = security_server_request_cookie(cookie, cookie_size);
     std::unique_ptr<char, std::function<void(char*)> > cookie_ptr(cookie, free);
     cookie = NULL;
-    RUNNER_ASSERT_MSG(res == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(res == SECURITY_SERVER_API_SUCCESS,
             "Error in requesting cookie from security-server. Result: " << res);
 
     label_ss = security_server_get_smacklabel_cookie(cookie_ptr.get());
-    RUNNER_ASSERT_MSG(label_ss != NULL, "Error in getting label by cookie");
+    RUNNER_ASSERT_MSG_BT(label_ss != NULL, "Error in getting label by cookie");
 
     //Check if label_ss is correct, that is only one NULL character.
     if (label_ss[0] != '\0') {
         free(label_ss);
-        RUNNER_ASSERT_MSG(label_ss[0] == '\0', "label_ss was not an empty string.");
+        RUNNER_ASSERT_MSG_BT(label_ss[0] == '\0', "label_ss was not an empty string.");
     }
 
     free(label_ss);
index cc8f329..204d157 100644 (file)
@@ -44,28 +44,28 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
     char *smack_context = NULL;
 
     pid_t pid = fork();
-    RUNNER_ASSERT_MSG(-1 != pid, "fork() failed");
+    RUNNER_ASSERT_MSG_BT(-1 != pid, "fork() failed");
 
     if (pid == 0) {
         // child
         ret = smack_set_label_for_self(subject_child);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_set__label_for_self() failed, ret: " << ret);
 
         ret = smack_accesses_new(&handle);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_accesses_new() failed, ret: " << ret);
 
         ret = smack_accesses_add(handle, subject_child, API_DATA_SHARE, API_FREE_ACCESS);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_accesses_add() failed, ret: " << ret);
 
         ret = smack_accesses_apply(handle);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_accesses_apply() failed, ret: " << ret);
 
         ret = smack_set_label_for_self(subject_child);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_set_label_for_self() failed, ret: " << ret);
 
         smack_accesses_free(handle);
@@ -78,14 +78,14 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
         ret = dbus_error_is_set(&err);
         if (1 == ret) {
             dbus_error_free(&err);
-            RUNNER_ASSERT_MSG(0 == ret, "dbus_bus_get() failed, ret: " << ret);
+            RUNNER_ASSERT_MSG_BT(0 == ret, "dbus_bus_get() failed, ret: " << ret);
         }
 
         // request our name on the bus
         ret = dbus_bus_request_name(conn, DBUS_CALLER_NAME, DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
         if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
         dbus_error_free(&err);
-        RUNNER_ASSERT_MSG(DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret,
+        RUNNER_ASSERT_MSG_BT(DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret,
             "dbus_bus_request_name() failed, ret: " << ret);
         }
 
@@ -95,13 +95,13 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
                                            DBUS_SMACK_INTERFACE,
                                            DBUS_SMACK_METHOD);
 
-        RUNNER_ASSERT_MSG(NULL != msg,
+        RUNNER_ASSERT_MSG_BT(NULL != msg,
             "dbus_message_new_method_call() failed, ret: " << ret);
 
         // append arguments, we need SMACK context for our parent process "test.method.server"
         dbus_message_iter_init_append(msg, &args);
         ret = dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &dbus_server_name);
-        RUNNER_ASSERT_MSG(1 == ret, "Out of memory");
+        RUNNER_ASSERT_MSG_BT(1 == ret, "Out of memory");
 
         // wait for parent to connect to DBus
         sleep(3);
@@ -109,8 +109,8 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
         // send message and get a handle for a reply
         // -1 is default timeout
         ret = dbus_connection_send_with_reply (conn, msg, &pending, -1);
-        RUNNER_ASSERT_MSG(1 == ret, "Out of memory");
-        RUNNER_ASSERT_MSG(NULL != pending, "Pending call null");
+        RUNNER_ASSERT_MSG_BT(1 == ret, "Out of memory");
+        RUNNER_ASSERT_MSG_BT(NULL != pending, "Pending call null");
 
         dbus_connection_flush(conn);
 
@@ -122,14 +122,14 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
 
         // get the reply
         msg = dbus_pending_call_steal_reply(pending);
-        RUNNER_ASSERT_MSG(NULL != msg, "Reply null");
+        RUNNER_ASSERT_MSG_BT(NULL != msg, "Reply null");
 
         // free message handle
         dbus_pending_call_unref(pending);
 
         ret = dbus_message_iter_init(msg, &iter);
         if (0 == ret) {
-            RUNNER_ASSERT_MSG(0 == ret, "Message has no arguments");
+            RUNNER_ASSERT_MSG_BT(0 == ret, "Message has no arguments");
         } else {
             dbus_message_iter_recurse(&iter, &var);
             while (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_INVALID) {
@@ -154,7 +154,7 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
         dbus_connection_unref(conn);
 
         ret = strcmp(smack_context, subject_parent);
-        RUNNER_ASSERT_MSG(0 == ret,
+        RUNNER_ASSERT_MSG_BT(0 == ret,
             "Context mismatch! context from dbus: " << smack_context);
 
         exit(0);
@@ -162,23 +162,23 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
     } else {
         // parent
         ret = smack_set_label_for_self(subject_parent);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_set_label_for_self() failed, ret: " << ret);
 
         ret = smack_accesses_new(&handle);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_accesses_new() failed, ret: " << ret);
 
         ret = smack_accesses_add(handle, subject_parent, API_DATA_SHARE, API_FREE_ACCESS);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_accesses_add() failed, ret: " << ret);
 
         ret = smack_accesses_apply(handle);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_accesses_apply() failed, ret: " << ret);
 
         ret = smack_set_label_for_self(subject_parent);
-        RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS,
+        RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS,
             "smack_set_label_for_self() failed, ret: " << ret);
 
         smack_accesses_free(handle);
@@ -191,14 +191,14 @@ RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
         ret = dbus_error_is_set(&err);
         if (1 == ret) {
             dbus_error_free(&err);
-            RUNNER_ASSERT_MSG(0 == ret, "dbus_bus_get() failed, ret: " << ret);
+            RUNNER_ASSERT_MSG_BT(0 == ret, "dbus_bus_get() failed, ret: " << ret);
         }
 
         // request our name on the bus and check for errors
         ret = dbus_bus_request_name(conn, DBUS_SERVER_NAME, DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
         if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
             dbus_error_free(&err);
-            RUNNER_ASSERT_MSG(DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret,
+            RUNNER_ASSERT_MSG_BT(DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret,
                 "dbus_bus_request_name() failed, ret: " << ret);
         }
 
@@ -231,7 +231,7 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
     char *smack_context = NULL;
 
     pid_t pid = fork();
-    RUNNER_ASSERT_MSG(-1 != pid, "fork() failed");
+    RUNNER_ASSERT_MSG_BT(-1 != pid, "fork() failed");
 
     if (pid == 0) {
         // child
@@ -244,14 +244,14 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
         ret = dbus_error_is_set(&err);
         if (1 == ret) {
             dbus_error_free(&err);
-            RUNNER_ASSERT_MSG(false, "Failed to connect to system bus. Ret " << ret);
+            RUNNER_ASSERT_MSG_BT(false, "Failed to connect to system bus. Ret " << ret);
         }
 
         // request our name on the bus; failure = exit with result 2
         ret = dbus_bus_request_name(conn, DBUS_CALLER_NAME, DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
         if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
             dbus_error_free(&err);
-            RUNNER_ASSERT_MSG(false, "Failed to request name on the bus. Ret " << ret);
+            RUNNER_ASSERT_MSG_BT(false, "Failed to request name on the bus. Ret " << ret);
         }
 
         // crate a new method call for checking SMACK context from DBus interface
@@ -260,12 +260,12 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
                                            DBUS_SMACK_INTERFACE,
                                            DBUS_SMACK_METHOD);
 
-        RUNNER_ASSERT_MSG(msg != NULL, "dbus_message_new_method_call() failed.");
+        RUNNER_ASSERT_MSG_BT(msg != NULL, "dbus_message_new_method_call() failed.");
 
         // append arguments, we need SMACK context for our parent process "test.method.server"
         dbus_message_iter_init_append(msg, &args);
         ret = dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &dbus_server_name);
-        RUNNER_ASSERT_MSG(ret == 1, "Out of memory. Ret " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == 1, "Out of memory. Ret " << ret);
 
         // wait for parent to connect to DBus
         sleep(3);
@@ -273,8 +273,8 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
         // send message and get a handle for a reply
         // -1 is default timeout
         ret = dbus_connection_send_with_reply (conn, msg, &pending, -1);
-        RUNNER_ASSERT_MSG(ret == 1, "Out of memory. Ret " << ret);
-        RUNNER_ASSERT_MSG(pending != NULL, "Pending call is NULL.");
+        RUNNER_ASSERT_MSG_BT(ret == 1, "Out of memory. Ret " << ret);
+        RUNNER_ASSERT_MSG_BT(pending != NULL, "Pending call is NULL.");
 
         dbus_connection_flush(conn);
 
@@ -286,13 +286,13 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
 
         // get the reply
         msg = dbus_pending_call_steal_reply(pending);
-        RUNNER_ASSERT_MSG(msg != NULL, "Failed to get the reply from bus.");
+        RUNNER_ASSERT_MSG_BT(msg != NULL, "Failed to get the reply from bus.");
 
         // free message handle
         dbus_pending_call_unref(pending);
 
         ret = dbus_message_iter_init(msg, &iter);
-        RUNNER_ASSERT_MSG(ret != 0, "DBus message has no arguments. Ret " << ret);
+        RUNNER_ASSERT_MSG_BT(ret != 0, "DBus message has no arguments. Ret " << ret);
 
         dbus_message_iter_recurse(&iter, &var);
         while (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_INVALID) {
@@ -316,7 +316,7 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
         dbus_connection_unref(conn);
 
         ret = strcmp(smack_context, subject_parent);
-        RUNNER_ASSERT_MSG(ret == 0, "Context mismatch. Context " << smack_context);
+        RUNNER_ASSERT_MSG_BT(ret == 0, "Context mismatch. Context " << smack_context);
 
         exit(0);
 
@@ -331,14 +331,14 @@ RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
         ret = dbus_error_is_set(&err);
         if (1 == ret) {
             dbus_error_free(&err);
-            RUNNER_ASSERT_MSG(0 == ret, "dbus_bus_get() failed, ret: " << ret);
+            RUNNER_ASSERT_MSG_BT(0 == ret, "dbus_bus_get() failed, ret: " << ret);
         }
 
         // request our name on the bus and check for errors
         ret = dbus_bus_request_name(conn, DBUS_SERVER_NAME, DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
         if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
             dbus_error_free(&err);
-            RUNNER_ASSERT_MSG(DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret,
+            RUNNER_ASSERT_MSG_BT(DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret,
                 "dbus_bus_request_name() failed, ret: " << ret);
         }
 
index 55bfadd..2ed8534 100644 (file)
@@ -47,10 +47,10 @@ RUNNER_CHILD_TEST_SMACK(tc13_open_for_new_file)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_open_for(file, fd_ptr.get());
-    RUNNER_ASSERT_MSG(ret == 0, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << ret);
 
     ret = write(*fd_ptr, write_buf1, strlen(write_buf1));
-    RUNNER_ASSERT_MSG(ret == (int)strlen(write_buf1), "error in write: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == (int)strlen(write_buf1), "error in write: " << ret);
 }
 
 RUNNER_CHILD_TEST_SMACK(tc14_open_for_read_from_existing_file)
@@ -63,13 +63,13 @@ RUNNER_CHILD_TEST_SMACK(tc14_open_for_read_from_existing_file)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_open_for(file, fd_ptr.get());
-    RUNNER_ASSERT_MSG(ret == 0, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << ret);
 
     ret = read(*fd_ptr, read_buf1, strlen(write_buf1));
     int err = errno;
-    RUNNER_ASSERT_MSG(ret == (int)strlen(write_buf1), "error in read: " << ret << " err: " << strerror(err));
+    RUNNER_ASSERT_MSG_BT(ret == (int)strlen(write_buf1), "error in read: " << ret << " err: " << strerror(err));
 
-    RUNNER_ASSERT_MSG(strncmp(read_buf1, write_buf1, strlen(read_buf1)) == 0, "string mismatch");
+    RUNNER_ASSERT_MSG_BT(strncmp(read_buf1, write_buf1, strlen(read_buf1)) == 0, "string mismatch");
 }
 
 RUNNER_CHILD_TEST_SMACK(tc15_open_for_write_to_existing_file)
@@ -81,20 +81,20 @@ RUNNER_CHILD_TEST_SMACK(tc15_open_for_write_to_existing_file)
 
     ret = write(*fd_ptr, write_buf2, strlen(write_buf2));
     int err = errno;
-    RUNNER_ASSERT_MSG(ret == (int)strlen(write_buf2), "error in read: " << ret << " err: " << strerror(err));
+    RUNNER_ASSERT_MSG_BT(ret == (int)strlen(write_buf2), "error in read: " << ret << " err: " << strerror(err));
 
     SecurityServer::AccessProvider provider(TEST01_SUBJECT);
     provider.allowFunction("security_server_open_for", TRACE_FROM_HERE);
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     ret = security_server_open_for(file, fd_ptr.get());
-    RUNNER_ASSERT_MSG(ret == 0, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << ret);
 
     ret = read(*fd_ptr, read_buf2, strlen(write_buf2));
     err = errno;
-    RUNNER_ASSERT_MSG(ret == (int)strlen(write_buf2), "error in read: " << ret << " err: " << strerror(err));
+    RUNNER_ASSERT_MSG_BT(ret == (int)strlen(write_buf2), "error in read: " << ret << " err: " << strerror(err));
 
-    RUNNER_ASSERT_MSG(strncmp(read_buf2, write_buf2, strlen(read_buf2)) == 0, "string mismatch");
+    RUNNER_ASSERT_MSG_BT(strncmp(read_buf2, write_buf2, strlen(read_buf2)) == 0, "string mismatch");
 }
 
 RUNNER_CHILD_TEST_SMACK(tc16_open_for_bad_file_name)
@@ -110,6 +110,6 @@ RUNNER_CHILD_TEST_SMACK(tc16_open_for_bad_file_name)
                                         "..","." };
     for (auto iter = badFile.begin(); iter != badFile.end(); ++iter) {
         int ret = security_server_open_for((*iter).c_str(), fd_ptr.get());
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
     }
 }
index a8dcfb7..e5e2ed3 100644 (file)
@@ -29,6 +29,7 @@
 #include <dirent.h>
 #include "security-server.h"
 #include <dpl/test/test_runner.h>
+#include <tests_common.h>
 #include <dlog.h>
 #include "security_server_clean_env.h"
 #include <tracker.h>
@@ -63,10 +64,10 @@ RUNNER_TEST(tc01_clear_environment)
 
         ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
 
-        RUNNER_ASSERT_MSG(expire_sec == 0, "expire_sec = " << expire_sec);
-        RUNNER_ASSERT_MSG(max_attempt == 0, "max_attempt = " << max_attempt);
-        RUNNER_ASSERT_MSG(attempt == 0, "attempt = " << attempt);
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(expire_sec == 0, "expire_sec = " << expire_sec);
+        RUNNER_ASSERT_MSG_BT(max_attempt == 0, "max_attempt = " << max_attempt);
+        RUNNER_ASSERT_MSG_BT(attempt == 0, "attempt = " << attempt);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
     }
     else
     {
@@ -90,20 +91,20 @@ RUNNER_TEST(tc02_security_server_set_pwd_validity)
     // TESTS:
     // WITHOUT password
     ret = security_server_set_pwd_validity(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
 
     ret = security_server_set_pwd_validity(11);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
 
     // WITH password
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     ret = security_server_set_pwd_validity(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     ret = security_server_set_pwd_validity(11);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -119,20 +120,20 @@ RUNNER_TEST(tc03_security_server_set_pwd_max_challenge)
     // TESTS:
     // WITHOUT password
     ret = security_server_set_pwd_max_challenge(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
 
     ret = security_server_set_pwd_max_challenge(6);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
 
     // WITH password
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     ret = security_server_set_pwd_max_challenge(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     ret = security_server_set_pwd_max_challenge(6);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -145,7 +146,7 @@ RUNNER_TEST(tc04_security_server_chk_pwd_too_long_password_case)
 
     // 33 char password
     ret = security_server_chk_pwd("abcdefghijklmnopqrstuvwxyz0123456", &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /**
@@ -157,16 +158,16 @@ RUNNER_TEST(tc05_security_server_chk_pwd_null_input_case)
     unsigned int attempt, max_attempt, expire_sec;
 
     ret = security_server_chk_pwd(NULL, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     ret = security_server_chk_pwd("password", NULL, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     ret = security_server_chk_pwd("password", &attempt, NULL, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     ret = security_server_chk_pwd("password", &attempt, &max_attempt, NULL);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /**
@@ -183,9 +184,9 @@ RUNNER_TEST(tc06_security_server_chk_pwd_no_password_case)
     // TEST
     ret = security_server_chk_pwd("isthisempty", &attempt, &max_attempt, &expire_sec);
 
-    RUNNER_ASSERT_MSG(expire_sec == 0, expire_sec);
-    RUNNER_ASSERT_MSG(max_attempt == 0, max_attempt);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(expire_sec == 0, expire_sec);
+    RUNNER_ASSERT_MSG_BT(max_attempt == 0, max_attempt);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret = " << ret);
 }
 
 /**
@@ -200,7 +201,7 @@ RUNNER_TEST(tc07_security_server_set_pwd_null_input_case)
 
     // TEST
     ret = security_server_set_pwd(NULL, NULL, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /**
@@ -216,7 +217,7 @@ RUNNER_TEST(tc08_security_server_set_pwd_too_long_input_param)
     // TEST
     // 33 char password
     ret = security_server_set_pwd("abcdefghijklmnopqrstuvwxyz0123456", "abcdefghijklmnopqrstuvwxyz0123456", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /**
@@ -231,7 +232,7 @@ RUNNER_TEST(tc09_security_server_set_pwd_current_pwd_empty)
 
     // TEST
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -243,19 +244,19 @@ RUNNER_TEST(tc10_security_server_set_pwd_current_pwd_max_valid_period_in_days)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     // UINT_MAX will cause api error, it is to big value
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, UINT_MAX);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
     sleep(1);
     // calculate max applicable valid days that will not be rejected by ss
     // ensure, that after conversion from days to seconds in ss there will be no uint overflow
     unsigned int valid_days = ((UINT_MAX - time(NULL)) / 86400) - 1;
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, valid_days);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -267,12 +268,12 @@ RUNNER_TEST(tc11_security_server_set_pwd_current_pwd_max_max_challenge)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, UINT_MAX, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -284,12 +285,12 @@ RUNNER_TEST(tc12_security_server_set_pwd_current_pwd_nonempty2zero)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_set_pwd(TEST_PASSWORD, "", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /**
@@ -301,7 +302,7 @@ RUNNER_TEST(tc14_security_server_set_pwd_current_pwd_too_long_input_param)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
@@ -309,7 +310,7 @@ RUNNER_TEST(tc14_security_server_set_pwd_current_pwd_too_long_input_param)
     long_password[5000] = '\0';
     memset(long_password, 'A', 5000);
     ret = security_server_set_pwd(TEST_PASSWORD,long_password, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /**
@@ -323,12 +324,12 @@ RUNNER_TEST(tc15_security_server_chk_pwd_shortest_password)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_chk_pwd("", &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /**
@@ -340,21 +341,21 @@ RUNNER_TEST(tc16_security_server_set_pwd_validity)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     ret = security_server_set_pwd_validity(0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     ret = security_server_set_pwd_validity(1);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //When trying to set UINT_MAX we should get error.
     ret = security_server_set_pwd_validity(UINT_MAX);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     ret = security_server_set_pwd_validity(2);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -368,13 +369,13 @@ RUNNER_TEST(tc17_security_server_is_pwd_valid)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 2);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST:
     sleep(1);
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST,  "ret = " << ret);
-    RUNNER_ASSERT_MSG((expire_sec > 172795) && (expire_sec < 172805),  "expire_sec = " << expire_sec);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST,  "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT((expire_sec > 172795) && (expire_sec < 172805),  "expire_sec = " << expire_sec);
 }
 
 /**
@@ -389,24 +390,24 @@ RUNNER_TEST(tc18_security_server_set_pwd_max_challenge)
     // ensure, that after conversion from days to seconds in ss there will be no uint overflow
     unsigned int valid_days = ((UINT_MAX - time(NULL)) / 86400) - 1;
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, valid_days);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TESTS
     sleep(1);
     ret = security_server_set_pwd_max_challenge(0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_max_challenge(UINT_MAX);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_max_challenge(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_max_challenge(6);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 
@@ -420,15 +421,15 @@ RUNNER_TEST(tc19_security_server_is_pwd_valid)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     sleep(1);
     ret = security_server_set_pwd_max_challenge(6);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
-    RUNNER_ASSERT_MSG(max_attempt == 6,  "max_attempt = " << max_attempt);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(max_attempt == 6,  "max_attempt = " << max_attempt);
 }
 
 /**
@@ -442,16 +443,16 @@ RUNNER_TEST(tc20_security_server_chk_pwd)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_chk_pwd(TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, ret);
 
     sleep(1);
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
 }
 
 /**
@@ -465,12 +466,12 @@ RUNNER_TEST(tc21_security_server_chk_incorrect_pwd)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //TEST
     sleep(1);
     ret = security_server_chk_pwd(SECOND_TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
 }
 
 /**
@@ -483,12 +484,12 @@ RUNNER_TEST(tc22_security_server_set_pwd_incorrect_current)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_set_pwd(SECOND_TEST_PASSWORD, THIRD_TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH,  "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH,  "ret = " << ret);
 }
 
 /**
@@ -501,12 +502,12 @@ RUNNER_TEST(tc23_security_server_set_pwd_correct_current)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -520,27 +521,27 @@ RUNNER_TEST(tc24_security_server_attempt_exceeding)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     printf("5 subtests started...");
     for (i = 1; i <= 5; i++) {
         sleep(1);
         ret = security_server_chk_pwd(SECOND_TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
-        RUNNER_ASSERT_MSG(attempt == i, "attempt = " << attempt << ", expected " << i);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(attempt == i, "attempt = " << attempt << ", expected " << i);
     }
     printf("DONE\n");
 
     sleep(1);
     ret = security_server_chk_pwd(TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     sleep(1);
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
-    RUNNER_ASSERT_MSG(attempt == 0, "ret = " << ret);
-    RUNNER_ASSERT_MSG(max_attempt == 10, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(attempt == 0, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(max_attempt == 10, "ret = " << ret);
 }
 
 /**
@@ -554,26 +555,26 @@ RUNNER_TEST(tc25_security_server_attempt_exceeding)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 1);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     printf("10 subtests started...");
     for (i = 1; i <= 10; i++) {
         sleep(1);
         ret = security_server_chk_pwd(SECOND_TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
-        RUNNER_ASSERT_MSG(attempt == i, "attempt = " << attempt << ", expected " << i);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(attempt == i, "attempt = " << attempt << ", expected " << i);
     }
 
     // The check, that exceeds max number
     sleep(1);
     ret = security_server_chk_pwd(SECOND_TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MAX_ATTEMPTS_EXCEEDED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MAX_ATTEMPTS_EXCEEDED, "ret = " << ret);
     printf("DONE\n");
 
     sleep(1);
     ret = security_server_chk_pwd(TEST_PASSWORD,  &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MAX_ATTEMPTS_EXCEEDED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MAX_ATTEMPTS_EXCEEDED, "ret = " << ret);
 }
 
 /**
@@ -586,12 +587,12 @@ RUNNER_TEST(tc26_security_server_reset_pwd)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 5, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_reset_pwd(TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -604,14 +605,14 @@ RUNNER_TEST(tc27_security_server_chk_pwd_too_long_password)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 5, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     char* long_password = (char*) malloc(5001);
     long_password[5000] = '\0';
     memset(long_password, 'A', 5000);
     ret = security_server_chk_pwd(long_password,  &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /**
@@ -625,13 +626,13 @@ RUNNER_TEST(tc28_security_server_check_expiration)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 5, 1);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
-    RUNNER_ASSERT_MSG((expire_sec < 86402) && (expire_sec > 86396), "expire_sec = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT((expire_sec < 86402) && (expire_sec > 86396), "expire_sec = " << ret);
 }
 
 /**
@@ -644,40 +645,40 @@ RUNNER_TEST(tc29_security_server_set_pwd_history)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 5, 1);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TESTS
     sleep(1);
     ret = security_server_set_pwd_history(100);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(51);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(-5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(50);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(INT_MAX);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(INT_MIN);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 
@@ -722,11 +723,11 @@ RUNNER_TEST(tc30_security_server_check_history)
     clean_password_dir();
 
     ret = security_server_set_pwd_history(9);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     sleep(1);
     ret = security_server_reset_pwd("history0", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     printf("11 subtests started...");
     for (i = 0; i < 11; i++) {
@@ -735,21 +736,21 @@ RUNNER_TEST(tc30_security_server_check_history)
 
         sleep(1);
         ret = security_server_set_pwd(buf1, buf2, 0, 0);
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     }
     printf("DONE\n");
 
     sleep(1);
     ret = security_server_set_pwd("history11", "history1", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd("history1", "history8", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
 
     sleep(1);
     ret = security_server_set_pwd("history1", "history12", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     printf("48 subtests started...");
     for (i = 12; i < 60; i++) {
@@ -759,7 +760,7 @@ RUNNER_TEST(tc30_security_server_check_history)
         sprintf(buf2, "history%d", i + 1);
 
         ret = security_server_set_pwd(buf1, buf2, 0, 0);
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     }
     printf("DONE\n");
 
@@ -785,7 +786,7 @@ RUNNER_TEST(tc31_security_server_replay_attack)
         usleep(i);
     }
 
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
 }
 
 /**
@@ -800,27 +801,27 @@ RUNNER_TEST(tc32_security_server_challenge_on_expired_password)
     // Prepare environment
     reset_security_server(TRACE_FROM_HERE);
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 4, 1);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST
     sleep(1);
     ret = security_server_chk_pwd(TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     ret = gettimeofday(&cur_time, NULL);
-    RUNNER_ASSERT_MSG(ret > -1, ret);
+    RUNNER_ASSERT_MSG_BT(ret > -1, ret);
 
     cur_time.tv_sec += (expire_sec + 1);
     ret = settimeofday(&cur_time, NULL);
-    RUNNER_ASSERT_MSG(ret > -1, ret);
+    RUNNER_ASSERT_MSG_BT(ret > -1, ret);
 
     sleep(1);
     ret = security_server_chk_pwd(TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXPIRED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXPIRED, "ret = " << ret);
 
     sleep(1);
     ret = security_server_chk_pwd(SECOND_TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH, "ret = " << ret);
 }
 
 /**
@@ -835,7 +836,7 @@ RUNNER_TEST(tc33_security_server_reset_by_null_pwd)
 
     // TEST
     ret = security_server_reset_pwd(NULL, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret = " << ret);
 }
 
 /*
@@ -860,26 +861,26 @@ void verify_chk_pwd_basic(
     int ret = security_server_chk_pwd(challenge, &attempt, &max_attempt, &expire_sec);
 
     // validate returned value
-    RUNNER_ASSERT_MSG(ret == expected_result,
+    RUNNER_ASSERT_MSG_BT(ret == expected_result,
         tracker.str() <<
         "security_server_chk_pwd returned "
          << ret << " (expected: " << expected_result << ")");
 
     // validate current attempts value
-    RUNNER_ASSERT_MSG(attempt == expected_current_attempt,
+    RUNNER_ASSERT_MSG_BT(attempt == expected_current_attempt,
         tracker.str() <<
         "security_server_chk_pwd returned attempt = " << attempt <<
         " (expected: " << expected_current_attempt << ")");
 
     // validate max attempt value
-    RUNNER_ASSERT_MSG(max_attempt == expected_max_attempt,
+    RUNNER_ASSERT_MSG_BT(max_attempt == expected_max_attempt,
         tracker.str() <<
         "security_server_chk_pwd returned max_attempt = " << max_attempt <<
         " (expected: " << expected_max_attempt << ")");
 
     // validate expire seconds
     if (expected_valid_secs == PASSWORD_INFINITE_EXPIRATION_TIME) {
-        RUNNER_ASSERT_MSG(expire_sec == expected_valid_secs,
+        RUNNER_ASSERT_MSG_BT(expire_sec == expected_valid_secs,
             tracker.str() <<
             "security_server_chk_pwd returned expire_sec = " << expire_sec <<
             " (expected: " << expected_valid_secs << ")");
@@ -888,7 +889,7 @@ void verify_chk_pwd_basic(
         unsigned int begin = expected_valid_secs > 5 ? expected_valid_secs - 5 : 0;
         unsigned int end   = expected_valid_secs + 5;
 
-        RUNNER_ASSERT_MSG(expire_sec >= begin && expire_sec <= end,
+        RUNNER_ASSERT_MSG_BT(expire_sec >= begin && expire_sec <= end,
             tracker.str() <<
             "security_server_chk_pwd returned expire_sec = " << expire_sec <<
             " (expected: <" << begin << "," << end << ")");
@@ -923,7 +924,7 @@ RUNNER_TEST(tc34_security_server_max_attempts)
     reset_security_server(TRACE_FROM_HERE);
 
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // change max attempts number few times
     std::vector<unsigned int> max_challenge_tab = {1, 4, 2};
@@ -933,7 +934,7 @@ RUNNER_TEST(tc34_security_server_max_attempts)
 
         usleep(PASSWORD_RETRY_TIMEOUT_US);
         ret = security_server_set_pwd_max_challenge(max_challenges);
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
         // max_challenges-1 wrong password attempts
         for (unsigned int attempt_nr = 1; attempt_nr < max_challenges; ++attempt_nr)
@@ -963,7 +964,7 @@ RUNNER_TEST(tc35_security_server_decrease_max_attempts)
     reset_security_server(TRACE_FROM_HERE);
 
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, max_challenge_more, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // missed attempts
     for (unsigned int attempt = 1; attempt <= max_challenge_more; ++attempt)
@@ -977,7 +978,7 @@ RUNNER_TEST(tc35_security_server_decrease_max_attempts)
     // lower max_challenge
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd_max_challenge(max_challenge_less);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // try valid password - should pass (curr attempts is reset)
     verify_chk_pwd(TEST_PASSWORD, SECURITY_SERVER_API_SUCCESS, 1, max_challenge_less,
@@ -986,7 +987,7 @@ RUNNER_TEST(tc35_security_server_decrease_max_attempts)
     // remove max attempts limit
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd_max_challenge(0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // try valid password again - should pass
     verify_chk_pwd(TEST_PASSWORD, SECURITY_SERVER_API_SUCCESS, 1, 0, TRACE_FROM_HERE);
@@ -994,7 +995,7 @@ RUNNER_TEST(tc35_security_server_decrease_max_attempts)
     // try to change the password - should pass
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // validate new password
     verify_chk_pwd(SECOND_TEST_PASSWORD, SECURITY_SERVER_API_SUCCESS, 1, 0, TRACE_FROM_HERE);
@@ -1014,11 +1015,11 @@ RUNNER_TEST(tc36_security_server_challenge_previous_passwords)
     reset_security_server(TRACE_FROM_HERE);
 
     int ret = security_server_set_pwd_history(history_depth);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_reset_pwd(TEST_PASSWORD, max_challenge, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     for (int depth = 0; depth < history_depth; ++depth) {
         prev_pass = new_pass;
@@ -1028,7 +1029,7 @@ RUNNER_TEST(tc36_security_server_challenge_previous_passwords)
 
         usleep(PASSWORD_RETRY_TIMEOUT_US);
         ret = security_server_set_pwd(prev_pass.c_str(), new_pass.c_str(), max_challenge, 0);
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
         // challenge initial password
         verify_chk_pwd(
@@ -1062,7 +1063,7 @@ RUNNER_TEST(tc37_security_server_challenge_mixed)
 
     const unsigned int max_challenge = 2;
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, max_challenge, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // 2x correct pwd - verify that 'cuurrent attempt' isn't increased
     for (unsigned int i = 0; i < max_challenge; ++i)
@@ -1132,24 +1133,24 @@ RUNNER_TEST(tc38_security_server_history_depth_change)
     reset_security_server(TRACE_FROM_HERE);
 
     ret = security_server_set_pwd_history(initial_history_depth);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_reset_pwd(TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(SECOND_TEST_PASSWORD, THIRD_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST_PASSWORD, 2nd and 3rd remembered => 1st should be refused
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(THIRD_TEST_PASSWORD, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
 
     /*
      * Lower history depth. At this point SS should treat THIRD_TEST_PASSWORD as current pwd,
@@ -1157,15 +1158,15 @@ RUNNER_TEST(tc38_security_server_history_depth_change)
      */
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd_history(decreased_history_depth);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(THIRD_TEST_PASSWORD, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(TEST_PASSWORD, THIRD_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
 
     /*
      * Increase history depth to 3. At this point SS should remember TEST_PASSWORD
@@ -1173,17 +1174,17 @@ RUNNER_TEST(tc38_security_server_history_depth_change)
      */
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd_history(increased_history_depth);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // 3rd and TEST_PASSWORD remembered => 2nd should be accepted
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // TEST_PASSWORD, 2nd and 3rd remembered => 3rd should be refused
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(SECOND_TEST_PASSWORD, THIRD_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
 }
 
 /**
@@ -1199,7 +1200,7 @@ RUNNER_TEST(tc39_security_server_attempts_num_check_after_reset)
     reset_security_server(TRACE_FROM_HERE);
 
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, max_challenge, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // missed attempts
     for (unsigned int attempt = 1; attempt <= invalid_attempts_num; ++attempt)
@@ -1214,10 +1215,10 @@ RUNNER_TEST(tc39_security_server_attempts_num_check_after_reset)
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     attempt = max_attempt = expire_sec = UINT_MAX;
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
-    RUNNER_ASSERT_MSG(max_attempt == max_challenge, "max_attempt = " << max_attempt);
-    RUNNER_ASSERT_MSG(attempt == invalid_attempts_num, "attempt = " << attempt);
-    RUNNER_ASSERT_MSG(expire_sec == PASSWORD_INFINITE_EXPIRATION_TIME, "expire_sec = " <<
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(max_attempt == max_challenge, "max_attempt = " << max_attempt);
+    RUNNER_ASSERT_MSG_BT(attempt == invalid_attempts_num, "attempt = " << attempt);
+    RUNNER_ASSERT_MSG_BT(expire_sec == PASSWORD_INFINITE_EXPIRATION_TIME, "expire_sec = " <<
                       expire_sec);
 
     // restart server - triggers loading password data from file
@@ -1251,23 +1252,23 @@ RUNNER_TEST(tc40_security_server_history_check_after_reset)
     reset_security_server(TRACE_FROM_HERE);
 
     int ret = security_server_set_pwd_history(history_depth);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_reset_pwd(TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(SECOND_TEST_PASSWORD, THIRD_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(THIRD_TEST_PASSWORD, FOURTH_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     // restart server - triggers loading password data from file
     restart_security_server();
@@ -1275,15 +1276,15 @@ RUNNER_TEST(tc40_security_server_history_check_after_reset)
     // try to reuse history passwords
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(FOURTH_TEST_PASSWORD, THIRD_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(FOURTH_TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(FOURTH_TEST_PASSWORD, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 /**
@@ -1299,34 +1300,34 @@ RUNNER_TEST(tc41_security_server_empty_history_check)
 
     //set new history count
     int ret = security_server_set_pwd_history(history_depth);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //set new password and fill history
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_reset_pwd(TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(SECOND_TEST_PASSWORD, THIRD_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //make sure, that everything went OK - try setting something that would cause reuse error
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(THIRD_TEST_PASSWORD, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(THIRD_TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED, "ret = " << ret);
 
     //reset history limit to no history at all
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd_history(empty_history_depth);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //make sure, that current password still exists in memory
     //expected attempt 3 because our previous tries increased attempt counter
@@ -1340,16 +1341,16 @@ RUNNER_TEST(tc41_security_server_empty_history_check)
     //make sure that it's possible to reuse old password once history limit is set to 0
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(THIRD_TEST_PASSWORD, THIRD_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //once again try setting earlier used passwords - now API should return success
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(THIRD_TEST_PASSWORD, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 RUNNER_TEST(tc42_security_server_set_new_pwd_with_current_empty)
@@ -1359,12 +1360,12 @@ RUNNER_TEST(tc42_security_server_set_new_pwd_with_current_empty)
 
     //set a password
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //try setting different password and giving NULL as current once again
     usleep(PASSWORD_RETRY_TIMEOUT_US);
     ret = security_server_set_pwd(NULL, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
 }
 
 RUNNER_TEST(tc43_security_server_no_retry_timeout_is_pwd_valid)
@@ -1374,14 +1375,14 @@ RUNNER_TEST(tc43_security_server_no_retry_timeout_is_pwd_valid)
 
     //set a password
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //do test
     unsigned int attempt, max_attempt, expire_sec;
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXIST, "ret = " << ret);
 }
 
 RUNNER_TEST(tc44_security_server_retry_timeout_chk_pwd)
@@ -1391,14 +1392,14 @@ RUNNER_TEST(tc44_security_server_retry_timeout_chk_pwd)
 
     //set a password
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //do test
     unsigned int attempt, max_attempt, expire_sec;
     ret = security_server_chk_pwd(TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER, "ret = " << ret);
     ret = security_server_chk_pwd(TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER, "ret = " << ret);
 }
 
 RUNNER_TEST(tc45_security_server_retry_timeout_set_pwd)
@@ -1408,13 +1409,13 @@ RUNNER_TEST(tc45_security_server_retry_timeout_set_pwd)
 
     //set a password
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //do test
     ret = security_server_set_pwd(TEST_PASSWORD, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER, "ret = " << ret);
     ret = security_server_set_pwd(TEST_PASSWORD, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_PASSWORD_RETRY_TIMER, "ret = " << ret);
 }
 
 RUNNER_TEST(tc46_security_server_no_retry_timeout_set_pwd_validity)
@@ -1424,13 +1425,13 @@ RUNNER_TEST(tc46_security_server_no_retry_timeout_set_pwd_validity)
 
     //set a password
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //do test
     ret = security_server_set_pwd_validity(11);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     ret = security_server_set_pwd_validity(11);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 RUNNER_TEST(tc47_security_server_no_retry_timeout_reset_pwd)
@@ -1440,13 +1441,13 @@ RUNNER_TEST(tc47_security_server_no_retry_timeout_reset_pwd)
 
     //set a password
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //do test
     ret = security_server_reset_pwd(TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     ret = security_server_reset_pwd(TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 RUNNER_TEST(tc48_security_server_no_retry_timeout_pwd_history)
@@ -1456,13 +1457,13 @@ RUNNER_TEST(tc48_security_server_no_retry_timeout_pwd_history)
 
     //set a password
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //do test
     ret = security_server_set_pwd_history(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     ret = security_server_set_pwd_history(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 RUNNER_TEST(tc49_security_server_no_retry_timeout_set_pwd_max_challenge)
@@ -1472,13 +1473,13 @@ RUNNER_TEST(tc49_security_server_no_retry_timeout_set_pwd_max_challenge)
 
     //set a password
     int ret = security_server_set_pwd(NULL, TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 
     //do test
     ret = security_server_set_pwd_max_challenge(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     ret = security_server_set_pwd_max_challenge(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
 }
 
 RUNNER_TEST(tc50_security_server_set_pwd_current_pwd_with_infinite_expiration_time)
@@ -1489,17 +1490,17 @@ RUNNER_TEST(tc50_security_server_set_pwd_current_pwd_with_infinite_expiration_ti
     // Prepare environment
     reset_security_server();
     ret = security_server_set_pwd(NULL, TEST_PASSWORD, 10, 10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     usleep(PASSWORD_RETRY_TIMEOUT_US);
 
     // Assert security server sets infinite expiration time
     ret = security_server_set_pwd(TEST_PASSWORD, SECOND_TEST_PASSWORD, 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
     usleep(PASSWORD_RETRY_TIMEOUT_US);
 
     ret = security_server_chk_pwd(SECOND_TEST_PASSWORD, &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
-    RUNNER_ASSERT_MSG((time_t) expire_sec == PASSWORD_INFINITE_EXPIRATION_TIME,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret = " << ret);
+    RUNNER_ASSERT_MSG_BT((time_t) expire_sec == PASSWORD_INFINITE_EXPIRATION_TIME,
             "invalid expiration time " << expire_sec);
 
     clean_password_dir();
index dfa6996..90b1ff5 100644 (file)
@@ -165,16 +165,16 @@ void testFunction(bool isSmack)
     if (isSmack) {
         //preapre environment
         int ret = smack_set_label_for_self(g_subject.data());
-        RUNNER_ASSERT_MSG(ret == 0, "Error in smack_set_label_for_self()");
+        RUNNER_ASSERT_MSG_BT(ret == 0, "Error in smack_set_label_for_self()");
 
         struct smack_accesses *rulesRaw = NULL;
         ret = smack_accesses_new(&rulesRaw);
-        RUNNER_ASSERT_MSG(ret == 0, "Error in smack_accesses_new()");
+        RUNNER_ASSERT_MSG_BT(ret == 0, "Error in smack_accesses_new()");
         AccessesUniquePtr rules(rulesRaw, smack_accesses_free);
         ret = smack_accesses_add(rules.get(), g_subject.data(), g_object.data(), g_rule.data());
-        RUNNER_ASSERT_MSG(ret == 0, "Error in smack_accesses_add()");
+        RUNNER_ASSERT_MSG_BT(ret == 0, "Error in smack_accesses_add()");
         ret = smack_accesses_apply(rules.get());
-        RUNNER_ASSERT_MSG(ret == 0, "Error in smack_accesses_apply()");
+        RUNNER_ASSERT_MSG_BT(ret == 0, "Error in smack_accesses_apply()");
     }
 
     //spawning threads
@@ -193,7 +193,7 @@ RUNNER_CHILD_TEST_SMACK(tc_stress_cookie_api_smack)
 {
     testFunction(true);
 
-    RUNNER_ASSERT_MSG(g_successes == g_threadsNumber,
+    RUNNER_ASSERT_MSG_BT(g_successes == g_threadsNumber,
                       "Not all threads exit with success: "
                       << g_successes << "/ " << g_threadsNumber
                       << std::endl << "Errors:" << std::endl << g_errors);
@@ -203,7 +203,7 @@ RUNNER_CHILD_TEST_NOSMACK(tc_stress_cookie_api_no_smack)
 {
     testFunction(false);
 
-    RUNNER_ASSERT_MSG(g_successes == g_threadsNumber,
+    RUNNER_ASSERT_MSG_BT(g_successes == g_threadsNumber,
                       "Not all threads exit with success: "
                       << g_successes << "/ " << g_threadsNumber
                       << std::endl << "Errors:" << std::endl << g_errors);
index d2c2697..6dc2861 100644 (file)
@@ -64,31 +64,31 @@ int clear_password(char ** /*error*/)
         reset_security_server();
 
         ret = smack_accesses_new(&handle);
-        RUNNER_ASSERT_MSG(ret == 0, "ret: " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << ret);
 
         /* our subject 'subject_allow' has access to security-server::api-password-check */
         ret = smack_accesses_add(handle, subject_allow, API_PASSWD_CHECK, API_RULE_REQUIRED);
-        RUNNER_ASSERT_MSG(ret == 0, "ret: " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << ret);
 
         ret = smack_accesses_apply(handle);
-        RUNNER_ASSERT_MSG(ret == 0, "ret: " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << ret);
 
         ret = smack_set_label_for_self(subject_allow);
-        RUNNER_ASSERT_MSG(ret == 0, "ret: " << ret);
+        RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << ret);
 
         smack_accesses_free(handle);
 
         attempt = max_attempt = expire_sec = UINT_MAX;
         ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
 
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret: " << ret);
-        RUNNER_ASSERT(expire_sec == 0);
-        RUNNER_ASSERT(max_attempt == 0);
-        RUNNER_ASSERT(attempt == 0);
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret: " << ret);
+        RUNNER_ASSERT_BT(expire_sec == 0);
+        RUNNER_ASSERT_BT(max_attempt == 0);
+        RUNNER_ASSERT_BT(attempt == 0);
 
         /* we revoke all rules for subject 'subject_allow' */
         ret = smack_revoke_subject(subject_allow);
-        RUNNER_ASSERT_MSG(ret == 0, "Revoking subject didn't work.");
+        RUNNER_ASSERT_MSG_BT(ret == 0, "Revoking subject didn't work.");
 
         sleep(1);
 
@@ -104,7 +104,7 @@ void add_process_group(const char* group_name)
 {
     // get group ID by gtoup name
     group *gr = getgrnam(group_name);
-    RUNNER_ASSERT_MSG(gr != NULL, "Group '" << group_name << "' does not exist.");
+    RUNNER_ASSERT_MSG_BT(gr != NULL, "Group '" << group_name << "' does not exist.");
     const gid_t new_group_id = gr->gr_gid;
 
     // get number of groups that the current process belongs to
@@ -122,7 +122,7 @@ void add_process_group(const char* group_name)
     // add new group & apply change
     groups[ngroups] = new_group_id;
     int ret = setgroups(ngroups + 1, groups.data());
-    RUNNER_ASSERT_MSG(ret == 0, "setgroups failed. ret = " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "setgroups failed. ret = " << ret);
 }
 
 /*
@@ -132,7 +132,7 @@ void remove_process_group(const char* group_name)
 {
     // get group ID by gtoup name
     group *gr = getgrnam(group_name);
-    RUNNER_ASSERT_MSG(gr != NULL, "Group '" << group_name << "' does not exist.");
+    RUNNER_ASSERT_MSG_BT(gr != NULL, "Group '" << group_name << "' does not exist.");
     const gid_t new_group_id = gr->gr_gid;
 
     // get number of groups that the current process belongs to
@@ -149,7 +149,7 @@ void remove_process_group(const char* group_name)
 
             // apply change
             int ret = setgroups(ngroups - 1, groups.data());
-            RUNNER_ASSERT_MSG(ret == 0, "setgroups failed. ret = " << ret);
+            RUNNER_ASSERT_MSG_BT(ret == 0, "setgroups failed. ret = " << ret);
             return;
         }
 }
@@ -158,39 +158,39 @@ RUNNER_TEST_GROUP_INIT(SECURITY_SERVER_TESTS_SERVER);
 
 RUNNER_TEST(tc_security_server_get_gid_normal_case_trying_to_get_gid_of_tel_gprs)
 {
-    RUNNER_ASSERT(security_server_get_gid("tel_gprs") >= 0);
+    RUNNER_ASSERT_BT(security_server_get_gid("tel_gprs") >= 0);
 }
 
 RUNNER_TEST(tc_security_server_get_gid_empty_object_name)
 {
-    RUNNER_ASSERT(security_server_get_gid("") == SECURITY_SERVER_API_ERROR_INPUT_PARAM);
+    RUNNER_ASSERT_BT(security_server_get_gid("") == SECURITY_SERVER_API_ERROR_INPUT_PARAM);
 }
 
 RUNNER_TEST(tc_security_server_get_gid_wrong_object_name_teltel)
 {
-    RUNNER_ASSERT(security_server_get_gid("teltel") == SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT);
+    RUNNER_ASSERT_BT(security_server_get_gid("teltel") == SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT);
 }
 
 //RUNNER_CHILD_TEST(tc_cookie_check_groups_privilege_negative)
 //{
 //    remove_process_group(PROC_AUDIO_GROUP_NAME);
 //
-//    RUNNER_ASSERT(security_server_request_cookie((char*)cookie, COOKIE_SIZE) ==
+//    RUNNER_ASSERT_BT(security_server_request_cookie((char*)cookie, COOKIE_SIZE) ==
 //                                                 SECURITY_SERVER_API_SUCCESS);
 //    ret = security_server_get_gid(PROC_AUDIO_GROUP_NAME);
 //    ret = security_server_check_privilege((char*) cookie, ret);
-//    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+//    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 //}
 //
 //RUNNER_CHILD_TEST(tc_cookie_check_groups_privilege_positive)
 //{
 //    add_process_group(PROC_AUDIO_GROUP_NAME);
 //
-//    RUNNER_ASSERT(security_server_request_cookie((char*)cookie, COOKIE_SIZE) ==
+//    RUNNER_ASSERT_BT(security_server_request_cookie((char*)cookie, COOKIE_SIZE) ==
 //                                                 SECURITY_SERVER_API_SUCCESS);
 //    ret = security_server_get_gid(PROC_AUDIO_GROUP_NAME);
 //    ret = security_server_check_privilege((char*) cookie, ret);
-//    RUNNER_ASSERT(ret == SECURITY_SERVER_API_SUCCESS);
+//    RUNNER_ASSERT_BT(ret == SECURITY_SERVER_API_SUCCESS);
 //}
 
 //RUNNER_TEST(tc_ask_for_privilege_with_default_cookie_case_with_wrong_cookie)
@@ -200,7 +200,7 @@ RUNNER_TEST(tc_security_server_get_gid_wrong_object_name_teltel)
 //    for (i = 0; i < COOKIE_SIZE; i++)
 //        wrong_cookie[i] = rand() % 255;
 //    ret = security_server_check_privilege((const char*) wrong_cookie, ret);
-//    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+//    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 //}
 //
 
@@ -217,19 +217,19 @@ RUNNER_TEST(tc_ask_for_privilege_with_default_cookie_case_with_wrong_cookie)
 {
     const char wrong_cookie[20] = {'w','a','t','?'};
     int audioGID = security_server_get_gid("audio");
-    RUNNER_ASSERT(SECURITY_SERVER_API_ERROR_ACCESS_DENIED
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_ERROR_ACCESS_DENIED
         == security_server_check_privilege((const char*) wrong_cookie, audioGID));
 }
 
 RUNNER_TEST(tc_get_pid_of_non_existing_cookie)
 {
     const char wrong_cookie[20] = {'w', 'a', 't', '?'};
-    RUNNER_ASSERT(security_server_get_cookie_pid(wrong_cookie) == SECURITY_SERVER_API_ERROR_NO_SUCH_COOKIE);
+    RUNNER_ASSERT_BT(security_server_get_cookie_pid(wrong_cookie) == SECURITY_SERVER_API_ERROR_NO_SUCH_COOKIE);
 }
 
 RUNNER_TEST(tc_get_pid_of_null_cookie)
 {
-    RUNNER_ASSERT(security_server_get_cookie_pid(NULL) == SECURITY_SERVER_API_ERROR_INPUT_PARAM);
+    RUNNER_ASSERT_BT(security_server_get_cookie_pid(NULL) == SECURITY_SERVER_API_ERROR_INPUT_PARAM);
 }
 
 RUNNER_CHILD_TEST_SMACK(tc01a_security_server_app_give_access)
@@ -245,11 +245,11 @@ RUNNER_CHILD_TEST_SMACK(tc01a_security_server_app_give_access)
 
     smack_set_label_for_self(object);
 
-    RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+    RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
     security_server_app_give_access(subject, getpid());
 
-    RUNNER_ASSERT(1 == smack_have_access(subject, object, "rwxat"));
+    RUNNER_ASSERT_BT(1 == smack_have_access(subject, object, "rwxat"));
 }
 
 /*
@@ -266,11 +266,11 @@ RUNNER_CHILD_TEST_SMACK(tc01a_security_server_app_give_access)
     // time.
     sleep(1);
 
-    RUNNER_ASSERT(0 == smack_have_access(subject, object, "r----"));
-    RUNNER_ASSERT(0 == smack_have_access(subject, object, "-w---"));
-    RUNNER_ASSERT(0 == smack_have_access(subject, object, "--x--"));
-    RUNNER_ASSERT(0 == smack_have_access(subject, object, "---a-"));
-    RUNNER_ASSERT(0 == smack_have_access(subject, object, "----t"));
+    RUNNER_ASSERT_BT(0 == smack_have_access(subject, object, "r----"));
+    RUNNER_ASSERT_BT(0 == smack_have_access(subject, object, "-w---"));
+    RUNNER_ASSERT_BT(0 == smack_have_access(subject, object, "--x--"));
+    RUNNER_ASSERT_BT(0 == smack_have_access(subject, object, "---a-"));
+    RUNNER_ASSERT_BT(0 == smack_have_access(subject, object, "----t"));
 }*/
 
 RUNNER_CHILD_TEST_SMACK(tc01c_security_server_app_give_access_no_access)
@@ -282,13 +282,13 @@ RUNNER_CHILD_TEST_SMACK(tc01c_security_server_app_give_access_no_access)
     smack.add(subject, object, "-----", TRACE_FROM_HERE);
     smack.apply(TRACE_FROM_HERE);
 
-    RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(object), "Error in smack_label_for_self");
+    RUNNER_ASSERT_MSG_BT(0 == smack_set_label_for_self(object), "Error in smack_label_for_self");
 
-    RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+    RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
-    RUNNER_ASSERT(SECURITY_SERVER_API_ERROR_ACCESS_DENIED == security_server_app_give_access(subject, getpid()));
+    RUNNER_ASSERT_BT(SECURITY_SERVER_API_ERROR_ACCESS_DENIED == security_server_app_give_access(subject, getpid()));
 
-    RUNNER_ASSERT(0 == smack_have_access(subject, object, "r"));
+    RUNNER_ASSERT_BT(0 == smack_have_access(subject, object, "r"));
 }
 
 RUNNER_TEST_SMACK(tc02_check_privilege_by_pid)
@@ -300,11 +300,11 @@ RUNNER_TEST_SMACK(tc02_check_privilege_by_pid)
 
     //we checking existing rule, it should return positive
     ret = security_server_check_privilege_by_pid(pid, "_", "rx");
-    RUNNER_ASSERT(ret == SECURITY_SERVER_API_SUCCESS);
+    RUNNER_ASSERT_BT(ret == SECURITY_SERVER_API_SUCCESS);
 
     //we checking rule with label that not exist
     ret = security_server_check_privilege_by_pid(pid, "thislabelisnotreal", "rwxat");
-    RUNNER_ASSERT(ret != SECURITY_SERVER_API_SUCCESS);
+    RUNNER_ASSERT_BT(ret != SECURITY_SERVER_API_SUCCESS);
 }
 
 RUNNER_CHILD_TEST_SMACK(tc03_check_API_passwd_allow)
@@ -316,7 +316,7 @@ RUNNER_CHILD_TEST_SMACK(tc03_check_API_passwd_allow)
     attempt = max_attempt = expire_sec = 0;
 
     ret = clear_password(&str);
-    RUNNER_ASSERT_MSG(ret == 0, "ret: " << str);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << str);
 
     SecurityServer::AccessProvider provider(TEST03_SUBJECT);
     provider.allowAPI(API_PASSWD_CHECK, API_RULE_REQUIRED, TRACE_FROM_HERE);
@@ -325,29 +325,29 @@ RUNNER_CHILD_TEST_SMACK(tc03_check_API_passwd_allow)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     ret = security_server_set_pwd_validity(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret: " << ret);
 
     ret = security_server_set_pwd_max_challenge(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret: " << ret);
 
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD, "ret: " << ret);
 
     sleep(1);
     ret = security_server_set_pwd(NULL, "12345", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     sleep(1);
     ret = security_server_reset_pwd("12345",0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     sleep(1);
     ret = security_server_chk_pwd("12345", &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 }
 
 RUNNER_CHILD_TEST(tc04_check_API_passwd_denied)
@@ -378,29 +378,29 @@ RUNNER_CHILD_TEST(tc04_check_API_passwd_denied)
      */
 
     ret = security_server_set_pwd_validity(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     ret = security_server_set_pwd_max_challenge(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     sleep(1);
     ret = security_server_set_pwd("12345", "12346", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     sleep(1);
     ret = security_server_reset_pwd("12346",0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     sleep(1);
     ret = security_server_chk_pwd("12346", &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 }
 
 RUNNER_CHILD_TEST_SMACK(tc05_check_API_middleware_allow)
@@ -422,23 +422,23 @@ RUNNER_CHILD_TEST_SMACK(tc05_check_API_middleware_allow)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     ret = security_server_request_cookie(cookie, cookie_size);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     ret = security_server_get_gid(PROC_AUDIO_GROUP_NAME);
     ret = security_server_check_privilege(cookie, ret);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     ret = security_server_get_gid("root");
-    RUNNER_ASSERT_MSG(ret > -1, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret > -1, "ret: " << ret);
 
     ret = security_server_get_cookie_pid(cookie);
-    RUNNER_ASSERT_MSG(ret == getpid(), "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == getpid(), "ret: " << ret);
 
     ss_label = security_server_get_smacklabel_cookie(cookie);
-    RUNNER_ASSERT_MSG(ss_label != NULL, "ret: " << ss_label);
+    RUNNER_ASSERT_MSG_BT(ss_label != NULL, "ret: " << ss_label);
 
     ret = security_server_check_privilege_by_pid(getpid(), "_", "rx");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 }
 
 RUNNER_CHILD_TEST(tc06_check_API_middleware_denied)
@@ -452,22 +452,22 @@ RUNNER_CHILD_TEST(tc06_check_API_middleware_denied)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     ret = security_server_request_cookie(cookie, cookie_size);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     ret = security_server_check_privilege(cookie, DB_ALARM_GID);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     ret = security_server_get_gid("root");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     ret = security_server_get_cookie_pid(cookie);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     ss_label = security_server_get_smacklabel_cookie(cookie);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 
     ret = security_server_check_privilege_by_pid(getpid(), "_", "rx");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 }
 
 RUNNER_CHILD_TEST_SMACK(tc07_check_API_data_share_allow)
@@ -477,7 +477,7 @@ RUNNER_CHILD_TEST_SMACK(tc07_check_API_data_share_allow)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_app_give_access(TEST07_SUBJECT, getpid());
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 }
 
 RUNNER_CHILD_TEST_SMACK(tc08_check_API_data_share_denied)
@@ -486,7 +486,7 @@ RUNNER_CHILD_TEST_SMACK(tc08_check_API_data_share_denied)
     provider.applyAndSwithToUser(APP_UID, APP_GID, TRACE_FROM_HERE);
 
     int ret = security_server_app_give_access(TEST08_SUBJECT, getpid());
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 }
 
 RUNNER_CHILD_TEST(tc09_check_API_app_enable_permissions)
@@ -500,14 +500,14 @@ RUNNER_CHILD_TEST(tc09_check_API_app_enable_permissions)
     // need to install WGT once again, in case it was removed before
     DB_BEGIN
     ret = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Cannot uninstall WGT_APP_ID, ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Cannot uninstall WGT_APP_ID, ret: " << ret);
     ret = perm_app_install(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Cannot install WGT_APP_ID, ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Cannot install WGT_APP_ID, ret: " << ret);
     DB_END
 
     // enable permission
     ret = security_server_app_enable_permissions(WGT_APP_ID, APP_TYPE_WGT, perm_list, persistent);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     SecurityServer::AccessProvider provider(TEST09_SUBJECT);
     provider.allowFunction("security_server_app_has_privilege", TRACE_FROM_HERE);
@@ -527,14 +527,14 @@ RUNNER_CHILD_TEST(tc10_check_API_app_disable_permissions)
     // need to install WGT once again, in case it was removed before
     DB_BEGIN
     ret = perm_app_uninstall(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Cannot uninstall WGT_APP_ID, ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Cannot uninstall WGT_APP_ID, ret: " << ret);
     ret = perm_app_install(WGT_APP_ID);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Cannot install WGT_APP_ID, ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Cannot install WGT_APP_ID, ret: " << ret);
     DB_END
 
     // disable permission
     ret = security_server_app_disable_permissions(WGT_APP_ID, APP_TYPE_WGT, perm_list);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     SecurityServer::AccessProvider provider(TEST10_SUBJECT);
     provider.allowFunction("security_server_app_has_privilege", TRACE_FROM_HERE);
@@ -557,16 +557,16 @@ RUNNER_TEST(tc11_security_server_app_has_privilege)
                                         NULL};
     DB_BEGIN
     ret = perm_app_uninstall(TEST11_SUBJECT);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Cannot uninstall TEST11_SUBJECT, ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Cannot uninstall TEST11_SUBJECT, ret: " << ret);
     ret = perm_app_install(TEST11_SUBJECT);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Cannot install TEST11_SUBJECT, ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Cannot install TEST11_SUBJECT, ret: " << ret);
     DB_END
 
     // enable permission
     ret = security_server_app_enable_permissions(TEST11_SUBJECT, APP_TYPE_WGT, perm_list_pers, 1);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
     ret = security_server_app_enable_permissions(TEST11_SUBJECT, APP_TYPE_WGT, perm_list_temp, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     // Check if permissions are given using API with app_label parameter
     check_app_has_privilege(TEST11_SUBJECT, APP_TYPE_WGT, perm_list_pers, true);
@@ -588,16 +588,16 @@ RUNNER_CHILD_TEST(tc12_security_server_app_caller_has_privilege)
 
     DB_BEGIN
     ret = perm_app_uninstall(TEST11_SUBJECT);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Cannot uninstall TEST11_SUBJECT, ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Cannot uninstall TEST11_SUBJECT, ret: " << ret);
     ret = perm_app_install(TEST11_SUBJECT);
-    RUNNER_ASSERT_MSG(ret == PC_OPERATION_SUCCESS, "Cannot install TEST11_SUBJECT, ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == PC_OPERATION_SUCCESS, "Cannot install TEST11_SUBJECT, ret: " << ret);
     DB_END
 
     // enable permission
     ret = security_server_app_enable_permissions(TEST11_SUBJECT, APP_TYPE_WGT, perm_list_pers, 1);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
     ret = security_server_app_enable_permissions(TEST11_SUBJECT, APP_TYPE_WGT, perm_list_temp, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     SecurityServer::AccessProvider provider(TEST11_SUBJECT);
     provider.allowFunction("security_server_app_caller_has_privilege", TRACE_FROM_HERE);
@@ -618,10 +618,10 @@ RUNNER_CHILD_TEST(tc13_check_API_app_has_privilege_denied)
 
     // set smack label without previously assigned permissions to api socket
     ret = smack_set_label_for_self(TEST12_SUBJECT);
-    RUNNER_ASSERT_MSG(ret == 0, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == 0, "ret: " << ret);
 
     // drop root privileges
-    RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
+    RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
 
     // call common function to perform the check
     check_app_caller_has_privilege_denied(APP_TYPE_WGT, perm_list);
@@ -652,15 +652,15 @@ RUNNER_CHILD_TEST_NOSMACK(tc01_security_server_app_give_access_nosmack)
     int result = 0;
 
     result = drop_root_privileges();
-    RUNNER_ASSERT_MSG(result == 0,
+    RUNNER_ASSERT_MSG_BT(result == 0,
             "Failed to drop root privileges. Result: " << result << "uid = " << getuid());
 
     result = security_server_app_give_access(subject, getpid());
-    RUNNER_ASSERT_MSG(result == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(result == SECURITY_SERVER_API_SUCCESS,
             "Error in security_server_app_give_access. Result: " << result);
 
     result = smack_have_access(subject, object, "rwxat");
-    RUNNER_ASSERT_MSG(result == -1,
+    RUNNER_ASSERT_MSG_BT(result == -1,
             "smack_have_access should return error when SMACK is off. Result: " << result);
 }
 
@@ -679,12 +679,12 @@ RUNNER_TEST_NOSMACK(tc02_check_privilege_by_pid_nosmack)
 
     //we checking existing rule, it should return positive
     ret = security_server_check_privilege_by_pid(pid, "_", "rx");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "check_privilege_by_pid for existing label failed. Result: " << ret);
 
     //we checking rule with label that not exist
     ret = security_server_check_privilege_by_pid(pid, "thislabelisnotreal", "rwxat");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "check_privilege_by_pid for nonexisting label failed. Result: " << ret);
 }
 
@@ -704,11 +704,11 @@ int clear_password_nosmack()
         attempt = max_attempt = expire_sec = UINT_MAX;
         ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
 
-        RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD,
+        RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD,
                 "is_pwd_faild should return no password error. Result: " << ret);
-        RUNNER_ASSERT_MSG(expire_sec == 0, "expire_sec = " << expire_sec << ", should be 0.");
-        RUNNER_ASSERT_MSG(max_attempt == 0, "max_attempt = " << max_attempt << ", should be 0.");
-        RUNNER_ASSERT_MSG(attempt == 0, "attempt = " << attempt << ", should be 0.");
+        RUNNER_ASSERT_MSG_BT(expire_sec == 0, "expire_sec = " << expire_sec << ", should be 0.");
+        RUNNER_ASSERT_MSG_BT(max_attempt == 0, "max_attempt = " << max_attempt << ", should be 0.");
+        RUNNER_ASSERT_MSG_BT(attempt == 0, "attempt = " << attempt << ", should be 0.");
 
         sleep(1);
 
@@ -736,39 +736,39 @@ RUNNER_CHILD_TEST_NOSMACK(tc03_check_API_passwd_allow_nosmack)
 
     // drop root privileges
     ret = drop_root_privileges();
-    RUNNER_ASSERT_MSG(ret == 0,
+    RUNNER_ASSERT_MSG_BT(ret == 0,
             "Failed to drop root privileges. Result: " << ret << "uid = " << getuid());
 
     ret = security_server_set_pwd_validity(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD,
             "set_pwd_validity should return no password error. Result: " << ret);
 
     ret = security_server_set_pwd_max_challenge(5);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD,
             "set_pwd_max_challenge should return no password error. Result: " << ret);
 
     ret = security_server_is_pwd_valid(&attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD,
             "is_pwd_valid should return no password error. Result: " << ret);
 
     sleep(1);
     ret = security_server_set_pwd(NULL, "12345", 0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "set_pwd failed. Result: " << ret);
 
     sleep(1);
     ret = security_server_reset_pwd("12345",0, 0);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "reset_pwd failed. Result: " << ret);
 
     sleep(1);
     ret = security_server_chk_pwd("12345", &attempt, &max_attempt, &expire_sec);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "chk_pwd failed. Result: " << ret);
 
     sleep(1);
     ret = security_server_set_pwd_history(10);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "set_pwd_history failed. Result: " << ret);
 }
 
@@ -790,36 +790,36 @@ RUNNER_CHILD_TEST_NOSMACK(tc05_check_API_middleware_allow_nosmack)
 
     // drop root privileges
     ret = drop_root_privileges();
-    RUNNER_ASSERT_MSG(ret == 0,
+    RUNNER_ASSERT_MSG_BT(ret == 0,
             "Failed to drop root privileges. Result: " << ret << "uid = " << getuid());
 
     ret = security_server_request_cookie(cookie, cookie_size);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "request_cookie failed. Result: " << ret);
 
     ret = security_server_get_gid(PROC_AUDIO_GROUP_NAME);
-    RUNNER_ASSERT_MSG(ret > -1, "Failed to get \"" << PROC_AUDIO_GROUP_NAME << "\" gid. Result: "
+    RUNNER_ASSERT_MSG_BT(ret > -1, "Failed to get \"" << PROC_AUDIO_GROUP_NAME << "\" gid. Result: "
                       << ret);
 
     ret = security_server_check_privilege(cookie, ret);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "check_privilege failed. Result: " << ret);
 
     ret = security_server_get_gid("root");
-    RUNNER_ASSERT_MSG(ret > -1,
+    RUNNER_ASSERT_MSG_BT(ret > -1,
             "Failed to get \"root\" gid. Result: " << ret);
 
     ret = security_server_get_cookie_pid(cookie);
-    RUNNER_ASSERT_MSG(ret == getpid(),
+    RUNNER_ASSERT_MSG_BT(ret == getpid(),
             "get_cookie_pid returned different pid than it should. Result: " << ret);
 
     ss_label = security_server_get_smacklabel_cookie(cookie);
-    RUNNER_ASSERT_MSG(ss_label != NULL, "get_smacklabel_cookie failed.");
+    RUNNER_ASSERT_MSG_BT(ss_label != NULL, "get_smacklabel_cookie failed.");
 
     ret = security_server_check_privilege_by_pid(getpid(), "_", "rx");
     if(ret != SECURITY_SERVER_API_SUCCESS) {
         free(ss_label);
-        RUNNER_ASSERT_MSG(false, "check_privilege_by_pid failed. Result: " << ret);
+        RUNNER_ASSERT_MSG_BT(false, "check_privilege_by_pid failed. Result: " << ret);
     }
 }
 
@@ -836,11 +836,11 @@ RUNNER_CHILD_TEST_NOSMACK(tc07_check_API_data_share_allow_nosmack)
 
     // drop root privileges
     ret = drop_root_privileges();
-    RUNNER_ASSERT_MSG(ret == 0,
+    RUNNER_ASSERT_MSG_BT(ret == 0,
             "Failed to drop root privileges. Result: " << ret << "uid = " << getuid());
 
     ret = security_server_app_give_access(TEST07_SUBJECT, getpid());
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "app_give_access failed. Result: " << ret);
 }
 
index 255fdb2..9ac0c9a 100644 (file)
@@ -24,27 +24,27 @@ RUNNER_TEST(tc01_security_server_get_gid_weird_input_case)
 
     /* normal param case */
     ret = security_server_get_gid("tel_sim");
-    RUNNER_ASSERT_MSG(ret > -1, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret > -1, "ret: " << ret);
 
     /* wrong param case */
     ret = security_server_get_gid("elephony_akecall");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT, "ret: " << ret);
 
     /* weird param case */
     ret = security_server_get_gid(weird);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_NO_SUCH_OBJECT, "ret: " << ret);
 
     /* null param case */
     ret = security_server_get_gid(NULL);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 
     /* param too long case */
     ret = security_server_get_gid("abcdefghijklmnopqrstuvwxyz01234");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 
     /* empty param case */
     ret = security_server_get_gid("");
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 }
 
 /* from security_server_tests_server.cpp */
@@ -58,14 +58,14 @@ RUNNER_TEST(tc03_security_server_request_cookie_weird_input_case)
     char *cookie = NULL;
 
     ret = security_server_request_cookie(cookie, cookie_size);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 
     /* buffer size too small case */
     cookie_size = 19;
     char cookie2[cookie_size];
 
     ret = security_server_request_cookie(cookie2, cookie_size);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_BUFFER_TOO_SMALL, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_BUFFER_TOO_SMALL, "ret: " << ret);
 }
 
 RUNNER_TEST(tc04_security_server_check_privilege_weird_input_case)
@@ -78,18 +78,18 @@ RUNNER_TEST(tc04_security_server_check_privilege_weird_input_case)
     char *cookie = NULL;
 
     ret = security_server_check_privilege(cookie, gid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 
     char cookie2[cookie_size];
 
     ret = security_server_request_cookie(cookie2, cookie_size);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     /* big gid case */
     gid = 70666;
 
     ret = security_server_check_privilege(cookie2, gid);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 }
 RUNNER_TEST(tc05_security_server_check_privilege_by_cookie_weird_input_case)
 {
@@ -101,22 +101,22 @@ RUNNER_TEST(tc05_security_server_check_privilege_by_cookie_weird_input_case)
     /* null cookie case */
     char *cookie = NULL;
     ret = security_server_check_privilege_by_cookie(cookie, object, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 
     /* null object case */
     char *object2 = NULL;
     char cookie2[cookie_size];
 
     ret = security_server_request_cookie(cookie2, cookie_size);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
 
     ret = security_server_check_privilege_by_cookie(cookie2, object2, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 
     /* null access rights case */
     access_rights = NULL;
     ret = security_server_check_privilege_by_cookie(cookie2, object, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 }
 
 RUNNER_TEST_SMACK(tc06_security_server_check_privilege_by_sockfd_weird_input_case)
@@ -128,18 +128,18 @@ RUNNER_TEST_SMACK(tc06_security_server_check_privilege_by_sockfd_weird_input_cas
 
     /* invalid sockfd case */
     ret = security_server_check_privilege_by_sockfd(sockfd, object, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
     sockfd = 0;
 
     /* null object case */
     char *object2 = NULL;
     ret = security_server_check_privilege_by_sockfd(sockfd, object2, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 
     /* null access rights case */
     access_rights = NULL;
     ret = security_server_check_privilege_by_sockfd(sockfd, object, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM, "ret: " << ret);
 }
 
 RUNNER_TEST(tc07_security_server_get_cookie_pid_weird_input_case)
@@ -148,7 +148,7 @@ RUNNER_TEST(tc07_security_server_get_cookie_pid_weird_input_case)
     char *cookie = NULL;
 
     ret = security_server_get_cookie_pid(cookie);
-    RUNNER_ASSERT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM);
+    RUNNER_ASSERT_BT(ret == SECURITY_SERVER_API_ERROR_INPUT_PARAM);
 }
 
 ///////////////////////////
@@ -172,20 +172,20 @@ RUNNER_TEST_NOSMACK(tc06_security_server_check_privilege_by_sockfd_weird_input_c
 
     //invalid sockfd case
     ret = security_server_check_privilege_by_sockfd(sockfd, object, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "check_privilege_by_sockfd failed. Result: " << ret);
     sockfd = 0;
 
     //null object case
     char *object2 = NULL;
     ret = security_server_check_privilege_by_sockfd(sockfd, object2, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "check_privilege_by_sockfd failed. Result: " << ret);
 
     //null access rights case
     access_rights = NULL;
     ret = security_server_check_privilege_by_sockfd(sockfd, object, access_rights);
-    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS,
+    RUNNER_ASSERT_MSG_BT(ret == SECURITY_SERVER_API_SUCCESS,
             "check_privilege_by_sockfd failed. Result: " << ret);
 }