Commit Graph
10 Commits
Author SHA1 Message Date
Ivan Kruglov c79e88b37d ASSERT_STREQ for simple cases 2024-04-15 08:13:50 +02:00
Lennart Poettering 27e18c23bc tmpfile-util: turn last parameter of link_tmpfile() into a proper flags
This changes a boolean param into a proper bitflag field.

Given this only defines a single flag for now this doesn't look like
much of an improvement. But we'll add another flag shortly, where it
starts to make more sense.
2023-06-13 09:40:53 +02:00
Zbigniew Jędrzejewski-Szmek b2d3e2a0dc tests: merge test-tmpfiles.c into test-tmpfile-util.c
The former was added in 65b3903ff5,
but the name is confusing: the test has nothing to do with systemd-tmpfiles.
It had one function that mostly tested functions from tmpfile-util.c, so
just move it into the latter.
2023-03-09 21:35:53 +09:00
Zbigniew Jędrzejewski-Szmek a6e016af01 tree-wide: use STRERROR() 2022-10-11 16:39:09 +02:00
Yu Watanabe 8ba24727c5 tmpfile-util: truncate original filename if the result filename is too long
This also verify that the extra string does not contain '/'.
2022-09-03 09:47:31 +09:00
Jan Janssen 4f7452a8eb test: Use TEST macro
This converts to TEST macro where it is trivial.

Some additional notable changes:
 - simplify HAVE_LIBIDN #ifdef in test-dns-domain.c
 - use saved_argc/saved_argv in test-copy.c, test-path-util.c,
   test-tmpfiles.c and test-unit-file.c
2021-11-25 15:03:06 +01:00
Yu Watanabe f21b863eeb test: use assert_se() instead of assert() 2021-10-12 15:20:28 +09:00
Yu Watanabe 4ff361cc86 tree-wide: always drop unnecessary dot in path 2021-05-28 13:44:38 +09:00
Yu Watanabe 0195046449 path-util: make path_extract_filename/directory() handle "." gracefully
This makes the functions handle "xx/" and "xx/." as equivalent.
Moreover, now path_extract_directory() returns normalized path, that is
no redundant "/" or "/./" are contained.
2021-05-28 13:44:38 +09:00
Lennart Poettering 62a88d7a3e tmpfile: port tempfn_*() to path_extract_*() 2021-03-02 15:07:52 +01:00