From: Djalal Harouni Date: Mon, 20 Oct 2014 16:57:40 +0000 (+0100) Subject: test-fd: fix the fd passing test and use KDBUS_MSG_MAX_FDS for normal fds X-Git-Tag: upstream/0.20141102.012929utc~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d2f63051dcc54682febe2ede496d3e82a4e5282;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git test-fd: fix the fd passing test and use KDBUS_MSG_MAX_FDS for normal fds Signed-off-by: Djalal Harouni --- diff --git a/test/test-fd.c b/test/test-fd.c index 89117db..84708e8 100644 --- a/test/test-fd.c +++ b/test/test-fd.c @@ -225,11 +225,18 @@ static int kdbus_send_multiple_fds(struct kdbus_conn *conn_src, kdbus_msg_free(msg); - /* Combine multiple 154 fds and 100 memfds */ + /* Combine multiple 254 fds and 100 memfds */ ret = send_fds_memfds(conn_src, conn_dst->id, - fds, 154, memfds, 100); + fds, KDBUS_MSG_MAX_FDS + 1, + memfds, 100); ASSERT_RETURN(ret == -EMFILE); + /* Combine multiple 253 fds and 100 memfds */ + ret = send_fds_memfds(conn_src, conn_dst->id, + fds, KDBUS_MSG_MAX_FDS, + memfds, KDBUS_MSG_MAX_ITEMS + 1); + ASSERT_RETURN(ret == -E2BIG); + ret = send_fds_memfds(conn_src, conn_dst->id, fds, 153, memfds, 100); ASSERT_RETURN(ret == 0);