summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2014-10-08 11:29:49 +0200
committerDaniel Mack <daniel@zonque.org>2014-10-08 16:40:40 +0200
commit1585f5129a5f53f909a0560d16901184483c9139 (patch)
treef8edfcdfed0708fd056b9d2fd7edc69cf059411b /test
parent76db77792371380fbe6698d042ee5054e72bc4af (diff)
downloadkdbus-bus-1585f5129a5f53f909a0560d16901184483c9139.tar.gz
kdbus-bus-1585f5129a5f53f909a0560d16901184483c9139.tar.bz2
kdbus-bus-1585f5129a5f53f909a0560d16901184483c9139.zip
kdbus.h: add features bitmask to cmd_make and cmd_hello (ABI BREAK)
Add a new field called 'features' to struct kdbus_cmd_make and kdbus_cmd_hello. In these bitmasks, userspace can request features from the kernel, and the kernel can itself request features from userspace. For now, we check that this field is set to 0, and bail with -EOPNOTSUPP otherwise. Signed-off-by: Daniel Mack <daniel@zonque.org>
Diffstat (limited to 'test')
-rw-r--r--test/test-connection.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test-connection.c b/test/test-connection.c
index bc397d9b6df..7d94e2fe754 100644
--- a/test/test-connection.c
+++ b/test/test-connection.c
@@ -120,7 +120,13 @@ int kdbus_test_hello(struct kdbus_test_env *env)
hello.size = sizeof(struct kdbus_cmd_hello);
- /* check faulty flags */
+ /* check faulty features */
+ hello.features = 1;
+ ret = ioctl(fd, KDBUS_CMD_HELLO, &hello);
+ ASSERT_RETURN(ret == -1 && errno == EOPNOTSUPP);
+ hello.features = 0;
+
+ /* check faulty features */
hello.conn_flags = 1ULL << 32;
ret = ioctl(fd, KDBUS_CMD_HELLO, &hello);
ASSERT_RETURN(ret == -1 && errno == EOPNOTSUPP);