*/
ep_conn = kdbus_hello(ep1, 0, NULL, 0);
ASSERT_EXIT(errno,==,EACCES);
- ASSERT_EXIT_ZERO(!ep_conn);
+ ASSERT_EXIT_ZERO(ep_conn);
/* Endpoint "apps2" world accessible */
ASSERT_EXIT_NONZERO(ep_conn = kdbus_hello(ep2, 0, NULL, 0));
ASSERT_RETURN(-EINVAL,==,create_endpoint(env->buspath, getuid() + 1, "foobar", 0));
/* create a custom endpoint, and open a connection on it */
- ep_fd = create_endpoint(env->buspath, getuid(), "foo", 0);
- ASSERT_RETURN(ep_fd,>=,0);
+ ASSERT_RETURN(0,<=,ep_fd = create_endpoint(env->buspath, getuid(), "foo", 0));
ASSERT_NONZERO(tmp = strdup(env->buspath));
-
- ret = asprintf(&ep, "%s/%u-%s", dirname(tmp), getuid(), epname);
+ ASSERT_RETURN(0,<=,asprintf(&ep, "%s/%u-%s", dirname(tmp), getuid(), epname));
free(tmp);
- ASSERT_RETURN(ret,>=,0);
/* Register a connection that listen to broadcasts */
- reader = kdbus_hello(ep, 0, NULL, 0);
- ASSERT_NONZERO(reader);
+ ASSERT_NONZERO(reader = kdbus_hello(ep, 0, NULL, 0));
/* Register to kernel signals */
ASSERT_ZERO(kdbus_add_match_id(reader, 0x1, KDBUS_ITEM_ID_ADD, KDBUS_MATCH_ID_ANY));
-
ASSERT_ZERO(kdbus_add_match_id(reader, 0x2, KDBUS_ITEM_ID_REMOVE, KDBUS_MATCH_ID_ANY));
-
ASSERT_ZERO(install_name_add_match(reader, name));
/* Monitor connections are not supported on custom endpoints */
ASSERT_ZERO(kdbus_name_acquire(env->conn, name, NULL));
- ASSERT_RETURN(-EAGAIN,==,kdbus_msg_recv(ep_conn, NULL, NULL));
- ASSERT_RETURN(-ESRCH,==,kdbus_conn_info(ep_conn, 0, name, 0, NULL));
+ ASSERT_RETURN(ONTIZEN(0,-EAGAIN),==,kdbus_msg_recv(ep_conn, NULL, NULL));
+ ASSERT_RETURN(ONTIZEN(0,-ESRCH),==,kdbus_conn_info(ep_conn, 0, name, 0, NULL));
ASSERT_RETURN(-ESRCH,==,kdbus_conn_info(ep_conn, 0, "random.crappy.name", 0, NULL));
- ASSERT_RETURN(-ENXIO,==,kdbus_conn_info(ep_conn, env->conn->id, NULL, 0, NULL));
+ ASSERT_RETURN(ONTIZEN(0,-ENXIO),==,kdbus_conn_info(ep_conn, env->conn->id, NULL, 0, NULL));
ASSERT_RETURN(-ENXIO,==,kdbus_conn_info(ep_conn, 0x0fffffffffffffffULL, NULL, 0, NULL));
/* Check that the reader did not receive the name notification */
- ASSERT_RETURN(-EAGAIN,==,kdbus_msg_recv(reader, NULL, NULL));
+ ASSERT_RETURN(ONTIZEN(0,-EAGAIN),==,kdbus_msg_recv(reader, NULL, NULL));
/*
* Release the name again, update the custom endpoint policy,