diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /src/test/test-data-fd-util.c | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test-data-fd-util.c')
-rw-r--r-- | src/test/test-data-fd-util.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/test-data-fd-util.c b/src/test/test-data-fd-util.c index aa68132..4abd7a6 100644 --- a/src/test/test-data-fd-util.c +++ b/src/test/test-data-fd-util.c @@ -17,27 +17,27 @@ static void test_acquire_data_fd_one(unsigned flags) { char rbuffer[sizeof(wbuffer)]; int fd; - fd = acquire_data_fd("foo", 3, flags); + fd = acquire_data_fd_full("foo", 3, flags); assert_se(fd >= 0); zero(rbuffer); assert_se(read(fd, rbuffer, sizeof(rbuffer)) == 3); - assert_se(streq(rbuffer, "foo")); + ASSERT_STREQ(rbuffer, "foo"); fd = safe_close(fd); - fd = acquire_data_fd("", 0, flags); + fd = acquire_data_fd_full("", SIZE_MAX, flags); assert_se(fd >= 0); zero(rbuffer); assert_se(read(fd, rbuffer, sizeof(rbuffer)) == 0); - assert_se(streq(rbuffer, "")); + ASSERT_STREQ(rbuffer, ""); fd = safe_close(fd); random_bytes(wbuffer, sizeof(wbuffer)); - fd = acquire_data_fd(wbuffer, sizeof(wbuffer), flags); + fd = acquire_data_fd_full(wbuffer, sizeof(wbuffer), flags); assert_se(fd >= 0); zero(rbuffer); @@ -98,14 +98,14 @@ TEST(copy_data_fd) { fd1 = safe_close(fd1); fd2 = safe_close(fd2); - fd1 = acquire_data_fd("hallo", 6, 0); + fd1 = acquire_data_fd("hallo"); assert_se(fd1 >= 0); fd2 = copy_data_fd(fd1); assert_se(fd2 >= 0); safe_close(fd1); - fd1 = acquire_data_fd("hallo", 6, 0); + fd1 = acquire_data_fd("hallo"); assert_se(fd1 >= 0); assert_equal_fd(fd1, fd2); |