chiark / gitweb /
bus: update test-bus-memfd
authorKay Sievers <kay@vrfy.org>
Mon, 13 May 2013 03:56:31 +0000 (05:56 +0200)
committerKay Sievers <kay@vrfy.org>
Mon, 13 May 2013 03:56:31 +0000 (05:56 +0200)
src/libsystemd-bus/kdbus.h
src/libsystemd-bus/test-bus-memfd.c

index 9dd28a7..20b8045 100644 (file)
@@ -138,6 +138,7 @@ struct kdbus_item {
                struct kdbus_timestamp timestamp;
 
                /* specific fields */
+               struct kdbus_memfd memfd;
                int fds[0];
                struct kdbus_manager_msg_name_change name_change;
                struct kdbus_manager_msg_id_change id_change;
index 3300470..db199d4 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, char *argv[]) {
         strcpy(s, "----- world");
 
         r = sd_memfd_set_sealed(m, 1);
-        assert_se(r == -EPERM);
+        assert_se(r == -ETXTBSY);
 
         assert_se(write(sd_memfd_get_fd(m), "he", 2) == 2);
         assert_se(write(sd_memfd_get_fd(m), "XXX", 3) == 3);
@@ -116,7 +116,7 @@ int main(int argc, char *argv[]) {
 
         /* we cannot break the seal, it is mapped */
         r = sd_memfd_set_sealed(m, 0);
-        assert_se(r == -EPERM);
+        assert_se(r == -ETXTBSY);
 
         /* unmap it; become the single owner */
         assert_se(munmap(s, 12) == 0);