From a3c550f0592ec55b7706252eb1cef7ab3cdf7e49 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Thu, 14 Aug 2014 16:14:33 +0200 Subject: [PATCH] test: test-kdbus: fix monitor and byebye tests Since commit 7015a1e6 ("prevent special-purpose connections from owning names or exchanging messages"), ioctl() calls return -EOPNOTSUPP they are issued to a handle of a inapproprate type. Follow this change in the test as well. --- test/test-kdbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-kdbus.c b/test/test-kdbus.c index f0bf705..e4f5df5 100644 --- a/test/test-kdbus.c +++ b/test/test-kdbus.c @@ -476,7 +476,7 @@ static int check_byebye(struct kdbus_check_env *env) /* a 2nd try should result in -EALREADY */ ret = ioctl(conn->fd, KDBUS_CMD_BYEBYE, 0); - ASSERT_RETURN(ret == -1 && errno == EALREADY); + ASSERT_RETURN(ret == -1 && errno == EOPNOTSUPP); free_conn(conn); @@ -506,7 +506,7 @@ static int check_monitor(struct kdbus_check_env *env) /* check that we can acquire a name */ ret = ioctl(conn->fd, KDBUS_CMD_NAME_ACQUIRE, cmd_name); - ASSERT_RETURN(ret == -1 && errno == EPERM); + ASSERT_RETURN(ret == -1 && errno == EOPNOTSUPP); free_conn(conn); -- 2.34.1