Merge pull request #16632 from keszybz/test-path-yet-again

Tighten handling of spawned services in tests that may fail
This commit is contained in:
Lennart Poettering
2020-10-22 14:56:46 +02:00
committed by GitHub
23 changed files with 161 additions and 74 deletions
+5
View File
@@ -161,3 +161,8 @@
_IDN_FEATURE_ " " \
_PCRE2_FEATURE_ " " \
_CGROUP_HIERARCHY_
enum {
BUILD_MODE_DEVELOPER,
BUILD_MODE_RELEASE,
};
+1 -1
View File
@@ -27,7 +27,7 @@
#ifdef CAP_LAST_CAP
# if CAP_LAST_CAP > SYSTEMD_CAP_LAST_CAP
# if DEVELOPER_MODE && defined(TEST_CAPABILITY_C)
# if BUILD_MODE == BUILD_MODE_DEVELOPER && defined(TEST_CAPABILITY_C)
# warning "The capability list here is outdated"
# endif
# else
+6
View File
@@ -33,6 +33,12 @@ static inline bool streq_ptr(const char *a, const char *b) {
return strcmp_ptr(a, b) == 0;
}
static inline char* strstr_ptr(const char *haystack, const char *needle) {
if (!haystack || !needle)
return NULL;
return strstr(haystack, needle);
}
static inline const char* strempty(const char *s) {
return s ?: "";
}