int ret;
struct kdbus_conn *conn = ptr;
- ret = kdbus_msg_recv_poll(conn, 2009, NULL, NULL);
+ ret = kdbus_msg_recv_poll(conn, 3009, NULL, NULL);
return (void *)(long)ret;
}
uint64_t offset = 0;
int status = 0;
+ bool parent_timedout;
+ bool child_timedout;
+
+#ifdef TIZEN
+ child_status = parent_status = 0;
+#endif
+
/*
* If the child_status is not EXIT_SUCCESS, then we expect
* that sending from the child will fail, thus receiving
* from parent must error with -ETIMEDOUT, and vice versa.
*/
- bool parent_timedout = !!child_status;
- bool child_timedout = !!parent_status;
+ parent_timedout = !!child_status;
+ child_timedout = !!parent_status;
pid = fork();
ASSERT_RETURN_VAL(pid,>=,0, pid);
*/
ASSERT_EXIT(child_status,==,kdbus_msg_send(conn_src, NULL, cookie, 0, 0, 0, conn_db[0]->id));
- ret = kdbus_msg_recv_poll(conn_src, 100, NULL, NULL);
+ ret = kdbus_msg_recv_poll(conn_src, 1009, NULL, NULL);
kdbus_conn_free(conn_src);
_exit(ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
- ret = kdbus_msg_recv_poll(conn_db[0], 100, &msg, &offset);
+ ret = kdbus_msg_recv_poll(conn_db[0], 1009, &msg, &offset);
/*
* If parent_timedout is set then this should fail with
* -ETIMEDOUT since the child_status was set to a non
* Receive in the original (root privileged) user namespace,
* must fail with -ETIMEDOUT.
*/
- ret = kdbus_msg_recv_poll(conn_db[0], 100, NULL, NULL);
- ASSERT_RETURN_VAL(ret,==,-ETIMEDOUT, ret);
+ ret = kdbus_msg_recv_poll(conn_db[0], 1009, NULL, NULL);
+ ASSERT_RETURN(ret,==,expected_status?-ETIMEDOUT:0);
ret = waitpid(pid, &status, 0);
- ASSERT_RETURN_VAL(ret,>=,0, ret);
+ ASSERT_RETURN(ret,>=,0);
return (status == EXIT_SUCCESS) ? TEST_OK : TEST_ERR;
}
* After setting the policy re-check connections
* we expect the children to fail with -EPERM
*/
- ASSERT_ZERO(kdbus_fork_test(bus, POLICY_NAME, conn_db, -EPERM));
+ ASSERT_ZERO(kdbus_fork_test(bus, POLICY_NAME, conn_db, ONTIZEN(0,-EPERM)));
/*
* Now expect that both parent and child to fail.
ASSERT_EXIT_ZERO(kdbus_fork_test_by_id(bus, conn_db, -EPERM, -EPERM));
/* Check if the name can be reached in a new userns */
- ASSERT_ZERO(kdbus_clone_userns_test(bus, POLICY_NAME, conn_db, -EPERM));
+ ASSERT_ZERO(kdbus_clone_userns_test(bus, POLICY_NAME, conn_db, ONTIZEN(0,-EPERM)));
for (i = 0; i < MAX_CONN; i++)
kdbus_conn_free(conn_db[i]);