#include <dpl/singleton_safe_impl.h>
#include <dpl/test/test_runner.h>
#include <dpl/test/test_runner_child.h>
+#include <dpl/test/test_runner_multiprocess.h>
#include <errno.h>
#include <float.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
-#include <sys/wait.h>
#include <sys/un.h>
#include <unistd.h>
+#include <memory>
#include "security_server_mockup.h"
/*Number of calls in a single test*/
LogDebug("No function call succeeded\n");
}
+void closesockfdptr(int* sockfd_ptr)
+{
+ close(*sockfd_ptr);
+}
+typedef std::unique_ptr<int, std::function<void(int*)> > SockFDUniquePtr;
+
/*TEST CASES*/
RUNNER_TEST_GROUP_INIT(SECURITY_SERVER_API_SPEED_MEASURER)
* Create new processes and measures times of first calls of security_server_request_cookie in them
*
*/
-RUNNER_TEST(m031_security_server_request_cookie_first_time_only) {
+RUNNER_MULTIPROCESS_TEST(m031_security_server_request_cookie_first_time_only) {
int ret;
size_t cookie_size;
cookie_size = security_server_get_cookie_size();
{ /* 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");
- wait(NULL); /* Wait for child */
+
RUNNER_ASSERT_MSG(number_of_calls > 0, "commmunication error");
stats_update(&stats, number_of_calls, duration_of_calls);
}
* measurer: Fails only on connection error.
*/
-RUNNER_TEST(m070_security_server_check_privilege_by_sockfd) {
+RUNNER_MULTIPROCESS_TEST(m070_security_server_check_privilege_by_sockfd) {
const char *object_label = M70_OBJECT_LABEL;
const char *access_rights = "r";
const char *access_rights_ext = "rw";
if (0 == pid) {
// child
int sockfd = create_new_socket();
- if (0 != smack_set_label_for_self(subject_label)) {
- LogDebug("child, failed");
- exit(EXIT_FAILURE);
- }
- if (listen(sockfd, 5) < 0) {
- LogDebug("child, exit");
- exit(EXIT_FAILURE);
- }
+ RUNNER_ASSERT_MSG(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(listen(sockfd, 5) >= 0, "child listen failed");
+
struct sockaddr_un client_addr;
socklen_t client_len = sizeof(client_addr);
int csockfd;
- while(0 <= (csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len))) {
- close(csockfd);
- }
+ RUNNER_ASSERT_MSG((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
+
+ close(csockfd);
exit(EXIT_SUCCESS);
//end child
- }
- else {
+ } else {
//parent
sleep(2);
int sockfd = connect_to_testserver();
- LogDebug("Parent: sockfd: " << sockfd);
- if (sockfd >= 0) {
- 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 */
- if (i%2)
- ret = security_server_check_privilege_by_sockfd(
- sockfd,
- object_label,
- access_rights_ext);
- else
- ret = security_server_check_privilege_by_sockfd(
- sockfd,
- object_label,
- access_rights);
- RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
- end_stats_update(&stats);
- }
- kill(pid, SIGKILL);
- finish_stats(&stats, "check_privilege_by_sockfd");
+ RUNNER_ASSERT_MSG(sockfd >= 0, "connect_to_testserver() failed");
+
+ SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
+
+ 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 */
+ if (i%2)
+ ret = security_server_check_privilege_by_sockfd(
+ sockfd,
+ object_label,
+ access_rights_ext);
+ else
+ ret = security_server_check_privilege_by_sockfd(
+ sockfd,
+ object_label,
+ access_rights);
+ RUNNER_ASSERT_MSG(communication_succeeded(ret) == 0, "commmunication error; ret = " << ret);
+ end_stats_update(&stats);
}
- int status;
- waitpid(pid, &status, 0);
- //end parent
+
+ finish_stats(&stats, "check_privilege_by_sockfd");
}
}
#include <dpl/log/log.h>
#include <dpl/test/test_runner.h>
#include <dpl/test/test_runner_child.h>
+#include <dpl/test/test_runner_multiprocess.h>
#include "security_server_mockup.h"
#include <security-server.h>
* expected: Function call with access rights set to "r" should return SUCCESS,
* with "rw" should return ACCESS DENIED.
*/
-RUNNER_TEST_SMACK(tc06_check_privilege_by_sockfd)
+RUNNER_MULTIPROCESS_TEST_SMACK(tc06_check_privilege_by_sockfd)
{
const char *object_label = "tc06objectlabel";
const char *access_rights = "r";
if (0 == pid) {
// child
- if (0 != smack_set_label_for_self(subject_label)) {
- LogDebug("child, failed");
- exit(1);
- }
+ RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
- LogDebug("child, create_new_socket");
int sockfd = create_new_socket();
+ RUNNER_ASSERT_MSG(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(drop_root_privileges() == 0, "uid = " << getuid());
- LogDebug("child, listen");
- if (listen(sockfd, 5) < 0) {
- LogDebug("child, exit");
- exit(1);
- }
+ RUNNER_ASSERT_MSG(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 << "\"");
free(label);
-
- LogDebug("child, accept");
struct sockaddr_un client_addr;
socklen_t client_len = sizeof(client_addr);
int csockfd;
- while (0 <= (csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len))) {
- LogDebug("child, loop");
- close(csockfd);
- }
-
+ RUNNER_ASSERT_MSG((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
- 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 << "\"" );
- free(label);
+ usleep(500);
- LogDebug("Exit!");
- exit(1);
+ close(csockfd);
+ exit(0);
} else {
// parent
- LogDebug("Parent, sleep 2");
sleep(1);
int sockfd = connect_to_testserver();
+ RUNNER_ASSERT_MSG(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(strcmp(label,subject_label) == 0, "label is \"" << label << "\"" << ", subject_label is \"" << subject_label << "\"" );
free(label);
- LogDebug("Parent: sockfd: " << sockfd);
- if (sockfd >= 0) {
- result1 = security_server_check_privilege_by_sockfd(
- sockfd,
- object_label,
- access_rights);
- result2 = security_server_check_privilege_by_sockfd(
- sockfd,
- object_label,
- access_rights_ext);
- }
- LogDebug("Parent: Close desc");
- close(sockfd);
- LogDebug("Parent: killing child");
- kill(pid, SIGKILL);
+ result1 = security_server_check_privilege_by_sockfd(
+ sockfd,
+ object_label,
+ access_rights);
+ result2 = security_server_check_privilege_by_sockfd(
+ sockfd,
+ object_label,
+ access_rights_ext);
}
- int status;
- waitpid(pid, &status, 0);
-
RUNNER_ASSERT_MSG(SECURITY_SERVER_API_SUCCESS == result1, "result = " << result1);
RUNNER_ASSERT_MSG(SECURITY_SERVER_API_ERROR_ACCESS_DENIED == result2, "result = " << result2);
}
* expected: Function call with access rights set to "r" should return SUCCESS,
* with "rw" should return ACCESS DENIED.
*/
-RUNNER_TEST_SMACK(tc07_check_privilege_by_sockfd)
+RUNNER_MULTIPROCESS_TEST_SMACK(tc07_check_privilege_by_sockfd)
{
const char *object_label = "tc07objectlabel";
const char *access_rights = "r";
int result1 = -1;
int result2 = -1;
- int kill_result = -1;
smack_accesses *handle;
RUNNER_ASSERT(0 == smack_accesses_new(&handle));
if (0 == pid) {
// child
- LogDebug("child, create_new_socket");
int sockfd = create_new_socket();
+ RUNNER_ASSERT_MSG(sockfd >= 0, "create_new_socket() failed");
+
+ SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
- if (0 != smack_set_label_for_self(subject_label)) {
- LogDebug("child, failed");
- exit(1);
- }
+ RUNNER_ASSERT_MSG(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
- LogDebug("child, listen");
- if (listen(sockfd, 5) < 0) {
- LogDebug("child, exit");
- exit(1);
- }
- LogDebug("child, accept");
+ RUNNER_ASSERT_MSG(listen(sockfd, 5) >= 0, "child listen failed");
struct sockaddr_un client_addr;
socklen_t client_len = sizeof(client_addr);
int csockfd;
- while (0 <= (csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len))) {
- LogDebug("child, loop");
- close(csockfd);
- }
- LogDebug("Exit!");
- exit(1);
+ RUNNER_ASSERT_MSG((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) > 0, "child accept failed");
+
+ usleep(500);
+
+ close(csockfd);
+ exit(0);
} else {
// parent
RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
- LogDebug("Parent, sleep 2");
- sleep(2);
+ sleep(1);
int sockfd = connect_to_testserver();
- LogDebug("Parent: sockfd: " << sockfd);
- if (sockfd >= 0) {
- result1 = security_server_check_privilege_by_sockfd(
- sockfd,
- object_label,
- access_rights);
- result2 = security_server_check_privilege_by_sockfd(
- sockfd,
- object_label,
- access_rights_ext);
- }
- LogDebug("Parent: Close desc");
- close(sockfd);
- LogDebug("Parent: killing child");
- // we cannot kill child - because of dropping privileges
- kill_result = kill(pid, SIGKILL);
- }
+ RUNNER_ASSERT_MSG(sockfd >= 0, "connect_to_testserver() failed");
+
+ result1 = security_server_check_privilege_by_sockfd(
+ sockfd,
+ object_label,
+ access_rights);
+ result2 = security_server_check_privilege_by_sockfd(
+ sockfd,
+ object_label,
+ access_rights_ext);
- if (kill_result == 0) {
- int status;
- waitpid(pid, &status, 0);
+ close(sockfd);
}
- else
- sleep(2);
RUNNER_ASSERT_MSG(SECURITY_SERVER_API_SUCCESS == result1, "result1 = " << result1);
RUNNER_ASSERT_MSG(SECURITY_SERVER_API_ERROR_ACCESS_DENIED == result2, " result2 = " << result2);
* For client the only difference are expected results from check_privilege_by_sockfd - both should
* return SUCCESS.
*/
-RUNNER_TEST_NOSMACK(tc06_check_privilege_by_sockfd_nosmack)
+RUNNER_MULTIPROCESS_TEST_NOSMACK(tc06_check_privilege_by_sockfd_nosmack)
{
const char* object_label = "tc06objectlabel";
char* label;
RUNNER_ASSERT(pid >= 0);
+ int ret;
+
if (pid == 0) { //child process - server
- int ret;
//create new socket
int sockfd = create_new_socket();
- if(sockfd < 0)
- exit(1); //failed to create server; return 1
+ RUNNER_ASSERT_MSG(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);
- if(label == NULL)
- exit(2); //label is NULL, get_smacklabel_sockfd failed; return 2
-
+ RUNNER_ASSERT_MSG(label != NULL, "security_server_get_smacklabel_sockfd failed");
ret = strcmp(label, "");
free(label);
- if(ret != 0)
- exit(3); //label is not an empty string; return 3
+ RUNNER_ASSERT_MSG(ret == 0, "label is \"" << label << "\"");
- ret = drop_root_privileges();
- if(ret != 0)
- exit(4); //failed to drop root privileges; return 4
+ RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
- if (listen(sockfd, 5) < 0)
- exit(5); //listen failed; return 5
+ RUNNER_ASSERT_MSG(listen(sockfd, 5) >= 0, "child listen failed");
struct sockaddr_un client_addr;
socklen_t client_len = sizeof(client_addr);
int csockfd;
- if((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) <= 0)
- exit(6); //accept failed; return 6
+ RUNNER_ASSERT_MSG((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);
exit(0);
} else {
//parent
- int ret;
sleep(1);
int sockfd = connect_to_testserver();
RUNNER_ASSERT_MSG(sockfd >= 0, "Failed to connect to server.");
label = security_server_get_smacklabel_sockfd(sockfd);
RUNNER_ASSERT_MSG(label != NULL, "get_smacklabel_sockfd failed.");
-
ret = strcmp(label, "");
free(label);
- RUNNER_ASSERT_MSG(ret == 0, "label is \"" << label << "\", should be empty");
+ RUNNER_ASSERT_MSG(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");
-
- kill(pid, SIGKILL);
- }
-
- int status;
- waitpid(pid, &status, 0);
-
- //check how our child process returned
- switch(WEXITSTATUS(status))
- {
- case 1: RUNNER_ASSERT_MSG(false, "Child failed to create server.");
- case 2: RUNNER_ASSERT_MSG(false, "Child error - get_smacklabel_sockfd failed.");
- case 3: RUNNER_ASSERT_MSG(false, "Child error - label is not an empty string.");
- case 4: RUNNER_ASSERT_MSG(false, "Child failed to drop root privileges.");
- case 5: RUNNER_ASSERT_MSG(false, "Child error - listen failed.");
- case 6: RUNNER_ASSERT_MSG(false, "Child error - accept failed.");
- default: ;
}
RUNNER_ASSERT_MSG(result1 == SECURITY_SERVER_API_SUCCESS, "result = " << result1);
/**
* NOSMACK version of tc07 test.
*/
-RUNNER_TEST_NOSMACK(tc07_check_privilege_by_sockfd_nosmack)
+RUNNER_MULTIPROCESS_TEST_NOSMACK(tc07_check_privilege_by_sockfd_nosmack)
{
const char* object_label = "tc07objectlabel";
RUNNER_ASSERT(-1 != pid);
if (pid == 0) { //child process
- int ret;
//Create socket
int sockfd = create_new_socket();
- if(sockfd < 0)
- exit(1); //failed to create server, return 1
+ RUNNER_ASSERT_MSG(sockfd >= 0, "create_new_socket() failed");
SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
//Drop privileges
- ret = drop_root_privileges();
- if(ret != 0)
- exit(2); //failed to drop root privileges; return 2
+ RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
//Prepare for accepting
- if (listen(sockfd, 5) < 0)
- exit(3); //listen failed; return 3
+ RUNNER_ASSERT_MSG(listen(sockfd, 5) >= 0, "child listen failed");
struct sockaddr_un client_addr;
socklen_t client_len = sizeof(client_addr);
//Accept connections
int csockfd;
- if((csockfd = accept(sockfd,(struct sockaddr*)&client_addr, &client_len)) <= 0)
- exit(4); //accept failed; return 4
+ RUNNER_ASSERT_MSG((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);
exit(0);
} else { //parent process
//Drop root privileges
- int ret = drop_root_privileges();
- RUNNER_ASSERT_MSG(ret == 0,
- "Failed to drop root privileges. Result: " << ret << ", uid = " << getuid());
+ RUNNER_ASSERT_MSG(drop_root_privileges() == 0, "uid = " << getuid());
//Wait for server to set up
sleep(1);
result2 = security_server_check_privilege_by_sockfd(sockfd, object_label, "rw");
close(sockfd);
- kill(pid, SIGKILL);
- }
-
- int status;
- waitpid(pid, &status, 0);
-
- switch(WEXITSTATUS(status))
- {
- case 1: RUNNER_ASSERT_MSG(false, "Child failed to create server.");
- case 2: RUNNER_ASSERT_MSG(false, "Child failed to drop root privileges.");
- case 3: RUNNER_ASSERT_MSG(false, "Child failed to listen to sockfd.");
- case 4: RUNNER_ASSERT_MSG(false, "Child failed to accept connection from server.");
- default: ;
}
//Both results (just like in the previous test case) should return success.
#include <stdio.h>
#include <unistd.h>
-#include <wait.h>
#include <sys/smack.h>
#include <dpl/test/test_runner.h>
+#include <dpl/test/test_runner_multiprocess.h>
#include <dpl/log/log.h>
#include <dbus/dbus.h>
#include <dbus-glib.h>
RUNNER_TEST_GROUP_INIT(SECURITY_SERVER_TESTS_DBUS);
-RUNNER_TEST_SMACK(tc01_smack_context_from_DBus)
+RUNNER_MULTIPROCESS_TEST_SMACK(tc01_smack_context_from_DBus)
{
int ret = -1;
const char *subject_parent = "subject_parent";
DBusPendingCall *pending = NULL;
const char *dbus_server_name = DBUS_SERVER_NAME;
char *smack_context = NULL;
- int status;
pid_t pid = fork();
RUNNER_ASSERT_MSG(-1 != pid, "fork() failed");
"dbus_bus_request_name() failed, ret: " << ret);
}
- waitpid(pid, &status, 0);
-
// close the connection
dbus_connection_unref(conn);
}
* This is almost an exact copy of the original SMACK DBus test. As in previous security-server
* tests, parts where SMACK is used are skipped, because most important functions will return error.
*/
-RUNNER_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
+RUNNER_MULTIPROCESS_TEST_NOSMACK(tc01_smack_context_from_DBus_nosmack)
{
int ret = -1;
const char* subject_parent = "subject_parent";
DBusPendingCall *pending = NULL;
const char *dbus_server_name = DBUS_SERVER_NAME;
char *smack_context = NULL;
- int status;
pid_t pid = fork();
RUNNER_ASSERT_MSG(-1 != pid, "fork() failed");
ret = dbus_error_is_set(&err);
if (1 == ret) {
dbus_error_free(&err);
- exit(1);
+ RUNNER_ASSERT_MSG(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);
- exit(2);
+ RUNNER_ASSERT_MSG(false, "Failed to request name on the bus. Ret " << ret);
}
// crate a new method call for checking SMACK context from DBus interface
DBUS_SMACK_INTERFACE,
DBUS_SMACK_METHOD);
- if(msg == NULL)
- exit(3); //dbus_message_new_method_call failed; return 3
+ RUNNER_ASSERT_MSG(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);
- if(ret != 1)
- exit(4); //out of memory; return 4
+ RUNNER_ASSERT_MSG(ret == 1, "Out of memory. Ret " << ret);
// wait for parent to connect to DBus
sleep(3);
// send message and get a handle for a reply
// -1 is default timeout
ret = dbus_connection_send_with_reply (conn, msg, &pending, -1);
- if(ret != 1)
- exit(4); //out of memory; return 4
- if(pending == NULL)
- exit(5); //pending call is null; return 5
+ RUNNER_ASSERT_MSG(ret == 1, "Out of memory. Ret " << ret);
+ RUNNER_ASSERT_MSG(pending != NULL, "Pending call is NULL.");
dbus_connection_flush(conn);
// get the reply
msg = dbus_pending_call_steal_reply(pending);
- if(msg == NULL)
- exit(6); //reply is null; return 6
+ RUNNER_ASSERT_MSG(msg != NULL, "Failed to get the reply from bus.");
// free message handle
dbus_pending_call_unref(pending);
ret = dbus_message_iter_init(msg, &iter);
- if (ret == 0)
- exit(7); //DBus message has no arguments; return 7
+ RUNNER_ASSERT_MSG(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) {
dbus_connection_unref(conn);
ret = strcmp(smack_context, subject_parent);
- if(ret != 0)
- exit(8); //context mismatch; return 8
+ RUNNER_ASSERT_MSG(ret == 0, "Context mismatch. Context " << smack_context);
exit(0);
// close the connection
dbus_connection_unref(conn);
}
-
- waitpid(pid, &status, 0);
-
- switch(WEXITSTATUS(status))
- {
- case 1: RUNNER_ASSERT_MSG(false, "Child failed to connect to system bus.");
- case 2: RUNNER_ASSERT_MSG(false, "Child failed to request name on the bus.");
- case 3: RUNNER_ASSERT_MSG(false, "Child error - dbus_message_new_method_call() failed.");
- case 4: RUNNER_ASSERT_MSG(false, "Child error - out of memory.");
- case 5: RUNNER_ASSERT_MSG(false, "Child error - Pending call is NULL.");
- case 6: RUNNER_ASSERT_MSG(false, "Child failed to get the reply from bus.");
- case 7: RUNNER_ASSERT_MSG(false, "Child error - DBus message has no arguments.");
- case 8: RUNNER_ASSERT_MSG(false, "Child error - context mismatch.");
- default: ;
- }
}
int main(int argc, char *argv[])