summaryrefslogtreecommitdiffstats
path: root/src/test/test-data-fd-util.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/test-data-fd-util.c14
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);