summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-27 03:01:06 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 13:45:53 +0100
commitb5efdb8af40ea759a1ea584c1bc44ecc81dd00ce (patch)
tree8b8b3411e13a6c92d59e1b071b910aa6c44c7495 /src/test
parent7d50b32a129e781401cf897475f388f682de1368 (diff)
util-lib: split out allocation calls into alloc-util.[ch]
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-calendarspec.c1
-rw-r--r--src/test/test-cap-list.c1
-rw-r--r--src/test/test-cgroup-util.c1
-rw-r--r--src/test/test-condition.c1
-rw-r--r--src/test/test-conf-files.c1
-rw-r--r--src/test/test-copy.c1
-rw-r--r--src/test/test-date.c3
-rw-r--r--src/test/test-device-nodes.c1
-rw-r--r--src/test/test-dns-domain.c1
-rw-r--r--src/test/test-ellipsize.c1
-rw-r--r--src/test/test-fileio.c1
-rw-r--r--src/test/test-fstab-util.c1
-rw-r--r--src/test/test-hashmap-plain.c1
-rw-r--r--src/test/test-hostname-util.c3
-rw-r--r--src/test/test-id128.c1
-rw-r--r--src/test/test-json.c1
-rw-r--r--src/test/test-namespace.c1
-rw-r--r--src/test/test-path-util.c1
-rw-r--r--src/test/test-path.c1
-rw-r--r--src/test/test-prioq.c5
-rw-r--r--src/test/test-process-util.c1
-rw-r--r--src/test/test-socket-util.c1
-rw-r--r--src/test/test-strv.c1
-rw-r--r--src/test/test-tmpfiles.c1
-rw-r--r--src/test/test-uid-range.c1
-rw-r--r--src/test/test-unit-file.c1
-rw-r--r--src/test/test-unit-name.c1
-rw-r--r--src/test/test-user-util.c1
-rw-r--r--src/test/test-utf8.c1
-rw-r--r--src/test/test-util.c1
-rw-r--r--src/test/test-xml.c1
31 files changed, 35 insertions, 4 deletions
diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c
index 12f366a34c..70819b0371 100644
--- a/src/test/test-calendarspec.c
+++ b/src/test/test-calendarspec.c
@@ -21,6 +21,7 @@
#include <string.h>
+#include "alloc-util.h"
#include "calendarspec.h"
#include "string-util.h"
#include "util.h"
diff --git a/src/test/test-cap-list.c b/src/test/test-cap-list.c
index f43f737951..4418bafda6 100644
--- a/src/test/test-cap-list.c
+++ b/src/test/test-cap-list.c
@@ -21,6 +21,7 @@
#include <sys/prctl.h>
+#include "alloc-util.h"
#include "cap-list.h"
#include "capability-util.h"
#include "fileio.h"
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c
index e4f6d5168d..a48b324e26 100644
--- a/src/test/test-cgroup-util.c
+++ b/src/test/test-cgroup-util.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "cgroup-util.h"
#include "dirent-util.h"
#include "fd-util.h"
diff --git a/src/test/test-condition.c b/src/test/test-condition.c
index 365f5794d4..f224c6cdd8 100644
--- a/src/test/test-condition.c
+++ b/src/test/test-condition.c
@@ -19,6 +19,7 @@
#include "sd-id128.h"
+#include "alloc-util.h"
#include "apparmor-util.h"
#include "architecture.h"
#include "audit-util.h"
diff --git a/src/test/test-conf-files.c b/src/test/test-conf-files.c
index f4b23355fc..a69698d4ea 100644
--- a/src/test/test-conf-files.c
+++ b/src/test/test-conf-files.c
@@ -22,6 +22,7 @@
#include <stdarg.h>
#include <stdio.h>
+#include "alloc-util.h"
#include "conf-files.h"
#include "fs-util.h"
#include "macro.h"
diff --git a/src/test/test-copy.c b/src/test/test-copy.c
index 4ccf729e80..ad57cb0202 100644
--- a/src/test/test-copy.c
+++ b/src/test/test-copy.c
@@ -19,6 +19,7 @@
#include <unistd.h>
+#include "alloc-util.h"
#include "copy.h"
#include "fd-util.h"
#include "fileio.h"
diff --git a/src/test/test-date.c b/src/test/test-date.c
index e1c6ecb2ef..c6d8bf82ea 100644
--- a/src/test/test-date.c
+++ b/src/test/test-date.c
@@ -21,8 +21,9 @@
#include <string.h>
-#include "util.h"
+#include "alloc-util.h"
#include "string-util.h"
+#include "util.h"
static void test_should_pass(const char *p) {
usec_t t, q;
diff --git a/src/test/test-device-nodes.c b/src/test/test-device-nodes.c
index 1c745d6e5b..646b168cc0 100644
--- a/src/test/test-device-nodes.c
+++ b/src/test/test-device-nodes.c
@@ -21,6 +21,7 @@
#include <sys/types.h>
+#include "alloc-util.h"
#include "device-nodes.h"
#include "string-util.h"
#include "util.h"
diff --git a/src/test/test-dns-domain.c b/src/test/test-dns-domain.c
index 1a8541e1cc..d5778748a0 100644
--- a/src/test/test-dns-domain.c
+++ b/src/test/test-dns-domain.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "dns-domain.h"
#include "macro.h"
#include "string-util.h"
diff --git a/src/test/test-ellipsize.c b/src/test/test-ellipsize.c
index 033d5af719..c597d5aecd 100644
--- a/src/test/test-ellipsize.c
+++ b/src/test/test-ellipsize.c
@@ -21,6 +21,7 @@
#include <stdio.h>
+#include "alloc-util.h"
#include "def.h"
#include "string-util.h"
#include "terminal-util.h"
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index 1c1fed4660..e588681b86 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -23,6 +23,7 @@
#include <fcntl.h>
#include <unistd.h>
+#include "alloc-util.h"
#include "ctype.h"
#include "def.h"
#include "env-util.h"
diff --git a/src/test/test-fstab-util.c b/src/test/test-fstab-util.c
index b02f3a6e7c..27816ac779 100644
--- a/src/test/test-fstab-util.c
+++ b/src/test/test-fstab-util.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "fstab-util.h"
#include "log.h"
#include "string-util.h"
diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c
index 2da6446961..6bf33306a9 100644
--- a/src/test/test-hashmap-plain.c
+++ b/src/test/test-hashmap-plain.c
@@ -17,6 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "hashmap.h"
#include "string-util.h"
#include "strv.h"
diff --git a/src/test/test-hostname-util.c b/src/test/test-hostname-util.c
index ac8f4ecc68..590175433c 100644
--- a/src/test/test-hostname-util.c
+++ b/src/test/test-hostname-util.c
@@ -21,10 +21,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "util.h"
+#include "alloc-util.h"
#include "fileio.h"
#include "hostname-util.h"
#include "string-util.h"
+#include "util.h"
static void test_hostname_is_valid(void) {
assert_se(hostname_is_valid("foobar", false));
diff --git a/src/test/test-id128.c b/src/test/test-id128.c
index 2c8ba70ffb..32cf3f80ca 100644
--- a/src/test/test-id128.c
+++ b/src/test/test-id128.c
@@ -24,6 +24,7 @@
#include "sd-daemon.h"
#include "sd-id128.h"
+#include "alloc-util.h"
#include "macro.h"
#include "string-util.h"
#include "util.h"
diff --git a/src/test/test-json.c b/src/test/test-json.c
index ba4d75c0c8..3995224eea 100644
--- a/src/test/test-json.c
+++ b/src/test/test-json.c
@@ -21,6 +21,7 @@
#include <math.h>
+#include "alloc-util.h"
#include "json.h"
#include "string-util.h"
#include "util.h"
diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c
index a060a7ba6f..5a12e959d4 100644
--- a/src/test/test-namespace.c
+++ b/src/test/test-namespace.c
@@ -21,6 +21,7 @@
#include <sys/socket.h>
+#include "alloc-util.h"
#include "fd-util.h"
#include "namespace.h"
#include "process-util.h"
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index e2979a8710..3f0f0264ab 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -23,6 +23,7 @@
#include <sys/mount.h>
#include <unistd.h>
+#include "alloc-util.h"
#include "fd-util.h"
#include "macro.h"
#include "mount-util.h"
diff --git a/src/test/test-path.c b/src/test/test-path.c
index 405434c1ff..ff0f044958 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -20,6 +20,7 @@
#include <stdbool.h>
#include <stdio.h>
+#include "alloc-util.h"
#include "fd-util.h"
#include "fs-util.h"
#include "macro.h"
diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c
index 1e2e42cbca..07273ffe79 100644
--- a/src/test/test-prioq.c
+++ b/src/test/test-prioq.c
@@ -21,10 +21,11 @@
#include <stdlib.h>
-#include "util.h"
-#include "set.h"
+#include "alloc-util.h"
#include "prioq.h"
+#include "set.h"
#include "siphash24.h"
+#include "util.h"
#define SET_SIZE 1024*4
diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c
index 16a7148b19..fa448348da 100644
--- a/src/test/test-process-util.c
+++ b/src/test/test-process-util.c
@@ -23,6 +23,7 @@
#include <sys/wait.h>
#include <unistd.h>
+#include "alloc-util.h"
#include "log.h"
#include "macro.h"
#include "process-util.h"
diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c
index 4a2d952c86..b9699b2028 100644
--- a/src/test/test-socket-util.c
+++ b/src/test/test-socket-util.c
@@ -17,6 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "async.h"
#include "fd-util.h"
#include "in-addr-util.h"
diff --git a/src/test/test-strv.c b/src/test/test-strv.c
index c676893719..c27f15283e 100644
--- a/src/test/test-strv.c
+++ b/src/test/test-strv.c
@@ -22,6 +22,7 @@
#include <string.h>
+#include "alloc-util.h"
#include "specifier.h"
#include "string-util.h"
#include "strv.h"
diff --git a/src/test/test-tmpfiles.c b/src/test/test-tmpfiles.c
index 683fbe217c..a8bd722e44 100644
--- a/src/test/test-tmpfiles.c
+++ b/src/test/test-tmpfiles.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <unistd.h>
+#include "alloc-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "formats-util.h"
diff --git a/src/test/test-uid-range.c b/src/test/test-uid-range.c
index 9f69d71203..4dcf10e26d 100644
--- a/src/test/test-uid-range.c
+++ b/src/test/test-uid-range.c
@@ -21,6 +21,7 @@
#include <stddef.h>
+#include "alloc-util.h"
#include "uid-range.h"
#include "user-util.h"
#include "util.h"
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index 226453d06e..c58c48af3c 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <unistd.h>
+#include "alloc-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "hashmap.h"
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c
index 5aff771af5..9db7853dd4 100644
--- a/src/test/test-unit-name.c
+++ b/src/test/test-unit-name.c
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
+#include "alloc-util.h"
#include "hostname-util.h"
#include "macro.h"
#include "manager.h"
diff --git a/src/test/test-user-util.c b/src/test/test-user-util.c
index dfd2031998..09d37087e5 100644
--- a/src/test/test-user-util.c
+++ b/src/test/test-user-util.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "macro.h"
#include "string-util.h"
#include "user-util.h"
diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c
index a8e15b7cf1..0af8349732 100644
--- a/src/test/test-utf8.c
+++ b/src/test/test-utf8.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "utf8.h"
#include "util.h"
#include "string-util.h"
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 647eff0496..ffde10c7e1 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -31,6 +31,7 @@
#include <sys/xattr.h>
#include <unistd.h>
+#include "alloc-util.h"
#include "conf-parser.h"
#include "cpu-set-util.h"
#include "def.h"
diff --git a/src/test/test-xml.c b/src/test/test-xml.c
index 93b0e7c3fb..548d75a3c3 100644
--- a/src/test/test-xml.c
+++ b/src/test/test-xml.c
@@ -21,6 +21,7 @@
#include <stdarg.h>
+#include "alloc-util.h"
#include "string-util.h"
#include "util.h"
#include "xml.h"