chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Get rid of write_safe
[elogind.git]
/
src
/
test
/
test-util.c
diff --git
a/src/test/test-util.c
b/src/test/test-util.c
index 43bb0249a20e8833cca18d47ff24d9a1b8772d08..9d6f4be5023690386848683314238f219a818b59 100644
(file)
--- a/
src/test/test-util.c
+++ b/
src/test/test-util.c
@@
-580,8
+580,8
@@
static void test_in_set(void) {
assert_se(!IN_SET(0, 1, 2, 3, 4));
}
assert_se(!IN_SET(0, 1, 2, 3, 4));
}
-static void test_writ
ev_saf
e(void) {
- char name[] = "/tmp/test-
writev_saf
e.XXXXXX";
+static void test_writ
ing_tmpfil
e(void) {
+ char name[] = "/tmp/test-
systemd_writing_tmpfil
e.XXXXXX";
_cleanup_free_ char *contents;
size_t size;
int fd, r;
_cleanup_free_ char *contents;
size_t size;
int fd, r;
@@
-592,10
+592,10
@@
static void test_writev_safe(void) {
IOVEC_SET_STRING(iov[2], "");
fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
IOVEC_SET_STRING(iov[2], "");
fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
- printf("t
est_writev_saf
e: %s", name);
+ printf("t
mpfil
e: %s", name);
- r = writev
_safe
(fd, iov, 3);
- assert(r
=
= 0);
+ r = writev(fd, iov, 3);
+ assert(r
>
= 0);
r = read_full_file(name, &contents, &size);
assert(r == 0);
r = read_full_file(name, &contents, &size);
assert(r == 0);
@@
-640,7
+640,7
@@
int main(int argc, char *argv[]) {
test_fstab_node_to_udev_node();
test_get_files_in_directory();
test_in_set();
test_fstab_node_to_udev_node();
test_get_files_in_directory();
test_in_set();
- test_writ
ev_saf
e();
+ test_writ
ing_tmpfil
e();
return 0;
}
return 0;
}