mirror of
https://github.com/systemd/systemd
synced 2026-03-14 09:04:47 +01:00
Compare commits
No commits in common. "f8eb41003df1a4eab59ff9bec67b2787c9368dbd" and "8fc1efa88fb935ab4357fa39ed71ccb70df55d7e" have entirely different histories.
f8eb41003d
...
8fc1efa88f
@ -344,14 +344,6 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svnEVE*:pnEveV:*
|
|||||||
sensor:modalias:acpi:KIOX010A*:dmi:*:svnGEO*:pnGeoFlex*:*
|
sensor:modalias:acpi:KIOX010A*:dmi:*:svnGEO*:pnGeoFlex*:*
|
||||||
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, 1
|
||||||
|
|
||||||
#########################################
|
|
||||||
# Glavey
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
# Glavey TM800A550L
|
|
||||||
sensor:modalias:acpi:KXCJ9000*:dmi:*:bvrZY-8-BI-PX4S70VTR400-X423B-005-D:*:rvnAMICorporation:rnAptioCRB:*
|
|
||||||
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
|
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
# Google Chromebooks
|
# Google Chromebooks
|
||||||
#########################################
|
#########################################
|
||||||
@ -786,10 +778,6 @@ sensor:modalias:acpi:BMA250E*:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd04/15/201
|
|||||||
# Toshiba
|
# Toshiba
|
||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
# Toshiba Encore WT8-B tablet
|
|
||||||
sensor:modalias:acpi:INVN6500*:dmi:*:svnTOSHIBA:pnTOSHIBAENCORE2WT8-B:*
|
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
|
||||||
|
|
||||||
# Toshiba Encore WT10A tablet
|
# Toshiba Encore WT10A tablet
|
||||||
sensor:modalias:acpi:INVN6500*:dmi:*:svnTOSHIBA:pnTOSHIBAWT10-A-103:*
|
sensor:modalias:acpi:INVN6500*:dmi:*:svnTOSHIBA:pnTOSHIBAWT10-A-103:*
|
||||||
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
|
||||||
|
|||||||
@ -96,8 +96,6 @@ KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
|
|||||||
# The static_node is required on s390x and ppc (they are using MODULE_ALIAS)
|
# The static_node is required on s390x and ppc (they are using MODULE_ALIAS)
|
||||||
KERNEL=="kvm", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=kvm"
|
KERNEL=="kvm", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=kvm"
|
||||||
|
|
||||||
KERNEL=="vfio", MODE="0666", OPTIONS+="static_node=vfio/vfio"
|
|
||||||
|
|
||||||
KERNEL=="vsock", MODE="0666"
|
KERNEL=="vsock", MODE="0666"
|
||||||
KERNEL=="vhost-vsock", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=vhost-vsock"
|
KERNEL=="vhost-vsock", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=vhost-vsock"
|
||||||
|
|
||||||
|
|||||||
@ -25,25 +25,22 @@ int fd_wait_for_event(int fd, int event, usec_t timeout);
|
|||||||
ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length);
|
ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length);
|
||||||
|
|
||||||
static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, size_t n) {
|
static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, size_t n) {
|
||||||
size_t r = 0;
|
size_t j, r = 0;
|
||||||
|
|
||||||
for (size_t j = 0; j < n; j++)
|
for (j = 0; j < n; j++)
|
||||||
r += i[j].iov_len;
|
r += i[j].iov_len;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool IOVEC_INCREMENT(struct iovec *i, size_t n, size_t k) {
|
static inline size_t IOVEC_INCREMENT(struct iovec *i, size_t n, size_t k) {
|
||||||
/* Returns true if there is nothing else to send (bytes written cover all of the iovec),
|
size_t j;
|
||||||
* false if there's still work to do. */
|
|
||||||
|
|
||||||
for (size_t j = 0; j < n; j++) {
|
for (j = 0; j < n; j++) {
|
||||||
size_t sub;
|
size_t sub;
|
||||||
|
|
||||||
if (i[j].iov_len == 0)
|
if (_unlikely_(k <= 0))
|
||||||
continue;
|
break;
|
||||||
if (k == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
sub = MIN(i[j].iov_len, k);
|
sub = MIN(i[j].iov_len, k);
|
||||||
i[j].iov_len -= sub;
|
i[j].iov_len -= sub;
|
||||||
@ -51,9 +48,7 @@ static inline bool IOVEC_INCREMENT(struct iovec *i, size_t n, size_t k) {
|
|||||||
k -= sub;
|
k -= sub;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(k == 0); /* Anything else would mean that we wrote more bytes than available,
|
return k;
|
||||||
* or the kernel reported writing more bytes than sent. */
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool FILE_SIZE_VALID(uint64_t l) {
|
static inline bool FILE_SIZE_VALID(uint64_t l) {
|
||||||
|
|||||||
@ -452,6 +452,11 @@ static int write_to_syslog(
|
|||||||
char header_priority[2 + DECIMAL_STR_MAX(int) + 1],
|
char header_priority[2 + DECIMAL_STR_MAX(int) + 1],
|
||||||
header_time[64],
|
header_time[64],
|
||||||
header_pid[4 + DECIMAL_STR_MAX(pid_t) + 1];
|
header_pid[4 + DECIMAL_STR_MAX(pid_t) + 1];
|
||||||
|
struct iovec iovec[5] = {};
|
||||||
|
struct msghdr msghdr = {
|
||||||
|
.msg_iov = iovec,
|
||||||
|
.msg_iovlen = ELEMENTSOF(iovec),
|
||||||
|
};
|
||||||
time_t t;
|
time_t t;
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
|
|
||||||
@ -469,21 +474,15 @@ static int write_to_syslog(
|
|||||||
|
|
||||||
xsprintf(header_pid, "["PID_FMT"]: ", getpid_cached());
|
xsprintf(header_pid, "["PID_FMT"]: ", getpid_cached());
|
||||||
|
|
||||||
struct iovec iovec[] = {
|
iovec[0] = IOVEC_MAKE_STRING(header_priority);
|
||||||
IOVEC_MAKE_STRING(header_priority),
|
iovec[1] = IOVEC_MAKE_STRING(header_time);
|
||||||
IOVEC_MAKE_STRING(header_time),
|
iovec[2] = IOVEC_MAKE_STRING(program_invocation_short_name);
|
||||||
IOVEC_MAKE_STRING(program_invocation_short_name),
|
iovec[3] = IOVEC_MAKE_STRING(header_pid);
|
||||||
IOVEC_MAKE_STRING(header_pid),
|
iovec[4] = IOVEC_MAKE_STRING(buffer);
|
||||||
IOVEC_MAKE_STRING(buffer),
|
|
||||||
};
|
|
||||||
struct msghdr msghdr = {
|
|
||||||
.msg_iov = iovec,
|
|
||||||
.msg_iovlen = ELEMENTSOF(iovec),
|
|
||||||
};
|
|
||||||
|
|
||||||
/* When using syslog via SOCK_STREAM separate the messages by NUL chars */
|
/* When using syslog via SOCK_STREAM separate the messages by NUL chars */
|
||||||
if (syslog_is_stream)
|
if (syslog_is_stream)
|
||||||
iovec[ELEMENTSOF(iovec) - 1].iov_len++;
|
iovec[4].iov_len++;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
ssize_t n;
|
ssize_t n;
|
||||||
@ -492,11 +491,11 @@ static int write_to_syslog(
|
|||||||
if (n < 0)
|
if (n < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
if (!syslog_is_stream)
|
if (!syslog_is_stream ||
|
||||||
|
(size_t) n >= IOVEC_TOTAL_SIZE(iovec, ELEMENTSOF(iovec)))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (IOVEC_INCREMENT(iovec, ELEMENTSOF(iovec), n))
|
IOVEC_INCREMENT(iovec, ELEMENTSOF(iovec), n);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -521,6 +520,7 @@ static int write_to_kmsg(
|
|||||||
|
|
||||||
char header_priority[2 + DECIMAL_STR_MAX(int) + 1],
|
char header_priority[2 + DECIMAL_STR_MAX(int) + 1],
|
||||||
header_pid[4 + DECIMAL_STR_MAX(pid_t) + 1];
|
header_pid[4 + DECIMAL_STR_MAX(pid_t) + 1];
|
||||||
|
struct iovec iovec[5] = {};
|
||||||
|
|
||||||
if (kmsg_fd < 0)
|
if (kmsg_fd < 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -531,13 +531,11 @@ static int write_to_kmsg(
|
|||||||
xsprintf(header_priority, "<%i>", level);
|
xsprintf(header_priority, "<%i>", level);
|
||||||
xsprintf(header_pid, "["PID_FMT"]: ", getpid_cached());
|
xsprintf(header_pid, "["PID_FMT"]: ", getpid_cached());
|
||||||
|
|
||||||
const struct iovec iovec[] = {
|
iovec[0] = IOVEC_MAKE_STRING(header_priority);
|
||||||
IOVEC_MAKE_STRING(header_priority),
|
iovec[1] = IOVEC_MAKE_STRING(program_invocation_short_name);
|
||||||
IOVEC_MAKE_STRING(program_invocation_short_name),
|
iovec[2] = IOVEC_MAKE_STRING(header_pid);
|
||||||
IOVEC_MAKE_STRING(header_pid),
|
iovec[3] = IOVEC_MAKE_STRING(buffer);
|
||||||
IOVEC_MAKE_STRING(buffer),
|
iovec[4] = IOVEC_MAKE_STRING("\n");
|
||||||
IOVEC_MAKE_STRING("\n"),
|
|
||||||
};
|
|
||||||
|
|
||||||
if (writev(kmsg_fd, iovec, ELEMENTSOF(iovec)) < 0)
|
if (writev(kmsg_fd, iovec, ELEMENTSOF(iovec)) < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
@ -961,7 +959,7 @@ int log_struct_internal(
|
|||||||
if (journal_fd >= 0) {
|
if (journal_fd >= 0) {
|
||||||
char header[LINE_MAX];
|
char header[LINE_MAX];
|
||||||
struct iovec iovec[17] = {};
|
struct iovec iovec[17] = {};
|
||||||
size_t n = 0;
|
size_t n = 0, i;
|
||||||
int r;
|
int r;
|
||||||
struct msghdr mh = {
|
struct msghdr mh = {
|
||||||
.msg_iov = iovec,
|
.msg_iov = iovec,
|
||||||
@ -983,7 +981,7 @@ int log_struct_internal(
|
|||||||
}
|
}
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
for (size_t i = 1; i < n; i += 2)
|
for (i = 1; i < n; i += 2)
|
||||||
free(iovec[i].iov_base);
|
free(iovec[i].iov_base);
|
||||||
|
|
||||||
if (!fallback) {
|
if (!fallback) {
|
||||||
|
|||||||
@ -284,7 +284,7 @@ int unit_file_build_name_map(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
FOREACH_DIRENT(de, d, log_warning_errno(errno, "Failed to read \"%s\", ignoring: %m", *dir)) {
|
FOREACH_DIRENT_ALL(de, d, log_warning_errno(errno, "Failed to read \"%s\", ignoring: %m", *dir)) {
|
||||||
char *filename;
|
char *filename;
|
||||||
_cleanup_free_ char *_filename_free = NULL, *simplified = NULL;
|
_cleanup_free_ char *_filename_free = NULL, *simplified = NULL;
|
||||||
const char *suffix, *dst = NULL;
|
const char *suffix, *dst = NULL;
|
||||||
@ -403,7 +403,6 @@ int unit_file_build_name_map(
|
|||||||
/* Let's also put the names in the reverse db. */
|
/* Let's also put the names in the reverse db. */
|
||||||
const char *dummy, *src;
|
const char *dummy, *src;
|
||||||
HASHMAP_FOREACH_KEY(dummy, src, ids) {
|
HASHMAP_FOREACH_KEY(dummy, src, ids) {
|
||||||
_cleanup_free_ char *inst = NULL, *dst_inst = NULL;
|
|
||||||
const char *dst;
|
const char *dst;
|
||||||
|
|
||||||
r = unit_ids_map_get(ids, src, &dst);
|
r = unit_ids_map_get(ids, src, &dst);
|
||||||
@ -413,31 +412,15 @@ int unit_file_build_name_map(
|
|||||||
if (null_or_empty_path(dst) != 0)
|
if (null_or_empty_path(dst) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dst = basename(dst);
|
/* Do not treat instance symlinks that point to the template as aliases */
|
||||||
|
if (unit_name_is_valid(basename(dst), UNIT_NAME_TEMPLATE) &&
|
||||||
/* If we have an symlink from an instance name to a template name, it is an alias just for
|
unit_name_is_valid(src, UNIT_NAME_INSTANCE))
|
||||||
* this specific instance, foo@id.service ↔ template@id.service. */
|
|
||||||
if (unit_name_is_valid(dst, UNIT_NAME_TEMPLATE)) {
|
|
||||||
UnitNameFlags t = unit_name_to_instance(src, &inst);
|
|
||||||
if (t < 0)
|
|
||||||
return log_error_errno(t, "Failed to extract instance part from %s: %m", src);
|
|
||||||
if (t == UNIT_NAME_INSTANCE) {
|
|
||||||
r = unit_name_replace_instance(dst, inst, &dst_inst);
|
|
||||||
if (r < 0) {
|
|
||||||
/* This might happen e.g. if the combined length is too large.
|
|
||||||
* Let's not make too much of a fuss. */
|
|
||||||
log_debug_errno(r, "Failed to build alias name (%s + %s), ignoring: %m",
|
|
||||||
dst, inst);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
dst = dst_inst;
|
r = string_strv_hashmap_put(&names, basename(dst), src);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
r = string_strv_hashmap_put(&names, dst, src);
|
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_warning_errno(r, "Failed to add entry to hashmap (%s→%s): %m", dst, src);
|
return log_warning_errno(r, "Failed to add entry to hashmap (%s→%s): %m",
|
||||||
|
basename(dst), src);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cache_timestamp_hash)
|
if (cache_timestamp_hash)
|
||||||
@ -451,88 +434,6 @@ int unit_file_build_name_map(
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int add_name(
|
|
||||||
const char *unit_name,
|
|
||||||
Set **names,
|
|
||||||
const char *name) {
|
|
||||||
int r;
|
|
||||||
|
|
||||||
assert(names);
|
|
||||||
assert(name);
|
|
||||||
|
|
||||||
r = set_put_strdup(names, name);
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
if (r > 0 && !streq(unit_name, name))
|
|
||||||
log_debug("Unit %s has alias %s.", unit_name, name);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int add_names(
|
|
||||||
Hashmap *unit_ids_map,
|
|
||||||
Hashmap *unit_name_map,
|
|
||||||
const char *unit_name,
|
|
||||||
const char *fragment_basename, /* Only set when adding additional names based on fragment path */
|
|
||||||
UnitNameFlags name_type,
|
|
||||||
const char *instance,
|
|
||||||
Set **names,
|
|
||||||
const char *name) {
|
|
||||||
|
|
||||||
char **aliases, **alias;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
assert(name_type == UNIT_NAME_PLAIN || instance);
|
|
||||||
|
|
||||||
/* The unit has its own name if it's not a template. If we're looking at a fragment, the fragment
|
|
||||||
* name (possibly with instance inserted), is also always one of the unit names. */
|
|
||||||
if (name_type != UNIT_NAME_TEMPLATE) {
|
|
||||||
r = add_name(unit_name, names, name);
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add any aliases of the name to the set of names.
|
|
||||||
*
|
|
||||||
* We don't even need to know which fragment we will use. The unit_name_map should return the same
|
|
||||||
* set of names for any of the aliases. */
|
|
||||||
aliases = hashmap_get(unit_name_map, name);
|
|
||||||
STRV_FOREACH(alias, aliases) {
|
|
||||||
if (name_type == UNIT_NAME_INSTANCE && unit_name_is_valid(*alias, UNIT_NAME_TEMPLATE)) {
|
|
||||||
_cleanup_free_ char *inst = NULL;
|
|
||||||
const char *inst_fragment = NULL;
|
|
||||||
|
|
||||||
r = unit_name_replace_instance(*alias, instance, &inst);
|
|
||||||
if (r < 0)
|
|
||||||
return log_debug_errno(r, "Cannot build instance name %s + %s: %m",
|
|
||||||
*alias, instance);
|
|
||||||
|
|
||||||
/* Exclude any aliases that point in some other direction.
|
|
||||||
*
|
|
||||||
* See https://github.com/systemd/systemd/pull/13119#discussion_r308145418. */
|
|
||||||
r = unit_ids_map_get(unit_ids_map, inst, &inst_fragment);
|
|
||||||
if (r < 0 && !IN_SET(r, -ENOENT, -ENXIO))
|
|
||||||
return log_debug_errno(r, "Cannot find instance fragment %s: %m", inst);
|
|
||||||
|
|
||||||
if (inst_fragment &&
|
|
||||||
!streq(basename(inst_fragment), fragment_basename)) {
|
|
||||||
log_debug("Instance %s has fragment %s and is not an alias of %s.",
|
|
||||||
inst, inst_fragment, unit_name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
r = set_consume(*names, TAKE_PTR(inst));
|
|
||||||
if (r > 0)
|
|
||||||
log_debug("Unit %s has alias %s.", unit_name, inst);
|
|
||||||
} else
|
|
||||||
r = add_name(unit_name, names, *alias);
|
|
||||||
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int unit_file_find_fragment(
|
int unit_file_find_fragment(
|
||||||
Hashmap *unit_ids_map,
|
Hashmap *unit_ids_map,
|
||||||
Hashmap *unit_name_map,
|
Hashmap *unit_name_map,
|
||||||
@ -542,8 +443,9 @@ int unit_file_find_fragment(
|
|||||||
|
|
||||||
const char *fragment = NULL;
|
const char *fragment = NULL;
|
||||||
_cleanup_free_ char *template = NULL, *instance = NULL;
|
_cleanup_free_ char *template = NULL, *instance = NULL;
|
||||||
_cleanup_set_free_ Set *names = NULL;
|
_cleanup_set_free_free_ Set *names = NULL;
|
||||||
int r;
|
char **t, **nnn;
|
||||||
|
int r, name_type;
|
||||||
|
|
||||||
/* Finds a fragment path, and returns the set of names:
|
/* Finds a fragment path, and returns the set of names:
|
||||||
* if we have …/foo.service and …/foo-alias.service→foo.service,
|
* if we have …/foo.service and …/foo-alias.service→foo.service,
|
||||||
@ -559,19 +461,53 @@ int unit_file_find_fragment(
|
|||||||
* foo-alias@inst.service → …/foo@inst.service, {foo@inst.service, foo-alias@inst.service}.
|
* foo-alias@inst.service → …/foo@inst.service, {foo@inst.service, foo-alias@inst.service}.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
UnitNameFlags name_type = unit_name_to_instance(unit_name, &instance);
|
name_type = unit_name_to_instance(unit_name, &instance);
|
||||||
if (name_type < 0)
|
if (name_type < 0)
|
||||||
return name_type;
|
return name_type;
|
||||||
|
|
||||||
r = add_names(unit_ids_map, unit_name_map, unit_name, NULL, name_type, instance, &names, unit_name);
|
names = set_new(&string_hash_ops);
|
||||||
|
if (!names)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
/* The unit always has its own name if it's not a template. */
|
||||||
|
if (IN_SET(name_type, UNIT_NAME_PLAIN, UNIT_NAME_INSTANCE)) {
|
||||||
|
r = set_put_strdup(&names, unit_name);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
/* First try to load fragment under the original name */
|
/* First try to load fragment under the original name */
|
||||||
r = unit_ids_map_get(unit_ids_map, unit_name, &fragment);
|
r = unit_ids_map_get(unit_ids_map, unit_name, &fragment);
|
||||||
if (r < 0 && !IN_SET(r, -ENOENT, -ENXIO))
|
if (r < 0 && !IN_SET(r, -ENOENT, -ENXIO))
|
||||||
return log_debug_errno(r, "Cannot load unit %s: %m", unit_name);
|
return log_debug_errno(r, "Cannot load unit %s: %m", unit_name);
|
||||||
|
|
||||||
|
if (fragment) {
|
||||||
|
/* Add any aliases of the original name to the set of names */
|
||||||
|
nnn = hashmap_get(unit_name_map, basename(fragment));
|
||||||
|
STRV_FOREACH(t, nnn) {
|
||||||
|
if (name_type == UNIT_NAME_INSTANCE && unit_name_is_valid(*t, UNIT_NAME_TEMPLATE)) {
|
||||||
|
char *inst;
|
||||||
|
|
||||||
|
r = unit_name_replace_instance(*t, instance, &inst);
|
||||||
|
if (r < 0)
|
||||||
|
return log_debug_errno(r, "Cannot build instance name %s+%s: %m", *t, instance);
|
||||||
|
|
||||||
|
if (!streq(unit_name, inst))
|
||||||
|
log_debug("%s: %s has alias %s", __func__, unit_name, inst);
|
||||||
|
|
||||||
|
log_info("%s: %s+%s → %s", __func__, *t, instance, inst);
|
||||||
|
r = set_consume(names, inst);
|
||||||
|
} else {
|
||||||
|
if (!streq(unit_name, *t))
|
||||||
|
log_debug("%s: %s has alias %s", __func__, unit_name, *t);
|
||||||
|
|
||||||
|
r = set_put_strdup(&names, *t);
|
||||||
|
}
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!fragment && name_type == UNIT_NAME_INSTANCE) {
|
if (!fragment && name_type == UNIT_NAME_INSTANCE) {
|
||||||
/* Look for a fragment under the template name */
|
/* Look for a fragment under the template name */
|
||||||
|
|
||||||
@ -582,22 +518,43 @@ int unit_file_find_fragment(
|
|||||||
r = unit_ids_map_get(unit_ids_map, template, &fragment);
|
r = unit_ids_map_get(unit_ids_map, template, &fragment);
|
||||||
if (r < 0 && !IN_SET(r, -ENOENT, -ENXIO))
|
if (r < 0 && !IN_SET(r, -ENOENT, -ENXIO))
|
||||||
return log_debug_errno(r, "Cannot load template %s: %m", template);
|
return log_debug_errno(r, "Cannot load template %s: %m", template);
|
||||||
}
|
|
||||||
|
|
||||||
if (fragment) {
|
if (fragment) {
|
||||||
const char *fragment_basename = basename(fragment);
|
/* Add any aliases of the original name to the set of names */
|
||||||
|
nnn = hashmap_get(unit_name_map, basename(fragment));
|
||||||
|
STRV_FOREACH(t, nnn) {
|
||||||
|
_cleanup_free_ char *inst = NULL;
|
||||||
|
const char *inst_fragment = NULL;
|
||||||
|
|
||||||
if (!streq(fragment_basename, unit_name)) {
|
r = unit_name_replace_instance(*t, instance, &inst);
|
||||||
/* Add names based on the fragment name to the set of names */
|
if (r < 0)
|
||||||
r = add_names(unit_ids_map, unit_name_map, unit_name, fragment_basename, name_type, instance, &names, fragment_basename);
|
return log_debug_errno(r, "Cannot build instance name %s+%s: %m", template, instance);
|
||||||
|
|
||||||
|
/* Exclude any aliases that point in some other direction. */
|
||||||
|
r = unit_ids_map_get(unit_ids_map, inst, &inst_fragment);
|
||||||
|
if (r < 0 && !IN_SET(r, -ENOENT, -ENXIO))
|
||||||
|
return log_debug_errno(r, "Cannot find instance fragment %s: %m", inst);
|
||||||
|
|
||||||
|
if (inst_fragment &&
|
||||||
|
!streq(basename(inst_fragment), basename(fragment))) {
|
||||||
|
log_debug("Instance %s has fragment %s and is not an alias of %s.",
|
||||||
|
inst, inst_fragment, unit_name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!streq(unit_name, inst))
|
||||||
|
log_debug("%s: %s has alias %s", __func__, unit_name, inst);
|
||||||
|
r = set_consume(names, TAKE_PTR(inst));
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*ret_fragment_path = fragment;
|
*ret_fragment_path = fragment;
|
||||||
*ret_names = TAKE_PTR(names);
|
*ret_names = TAKE_PTR(names);
|
||||||
|
|
||||||
|
// FIXME: if instance, consider any unit names with different template name
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -190,7 +190,7 @@ if have_gnu_efi
|
|||||||
'-znocombreloc',
|
'-znocombreloc',
|
||||||
'-L', efi_libdir,
|
'-L', efi_libdir,
|
||||||
efi_crt0]
|
efi_crt0]
|
||||||
if ['aarch64', 'arm', 'riscv64'].contains(efi_arch)
|
if efi_arch == 'aarch64' or efi_arch == 'arm' or efi_arch == 'riscv64'
|
||||||
# Aarch64, ARM32 and 64bit RISC-V don't have an EFI capable objcopy.
|
# Aarch64, ARM32 and 64bit RISC-V don't have an EFI capable objcopy.
|
||||||
# Use 'binary' instead, and add required symbols manually.
|
# Use 'binary' instead, and add required symbols manually.
|
||||||
efi_ldflags += ['--defsym=EFI_SUBSYSTEM=0xa']
|
efi_ldflags += ['--defsym=EFI_SUBSYSTEM=0xa']
|
||||||
|
|||||||
@ -651,7 +651,7 @@ fail:
|
|||||||
|
|
||||||
static void *expire_thread(void *p) {
|
static void *expire_thread(void *p) {
|
||||||
struct autofs_dev_ioctl param;
|
struct autofs_dev_ioctl param;
|
||||||
_cleanup_(expire_data_freep) struct expire_data *data = p;
|
_cleanup_(expire_data_freep) struct expire_data *data = (struct expire_data*)p;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert(data->dev_autofs_fd >= 0);
|
assert(data->dev_autofs_fd >= 0);
|
||||||
|
|||||||
@ -305,7 +305,8 @@ static int unit_compare_memory_limit(Unit *u, const char *property_name, uint64_
|
|||||||
if (!FLAGS_SET(m, CGROUP_MASK_MEMORY))
|
if (!FLAGS_SET(m, CGROUP_MASK_MEMORY))
|
||||||
return -ENODATA;
|
return -ENODATA;
|
||||||
|
|
||||||
assert_se(c = unit_get_cgroup_context(u));
|
c = unit_get_cgroup_context(u);
|
||||||
|
assert(c);
|
||||||
|
|
||||||
if (streq(property_name, "MemoryLow")) {
|
if (streq(property_name, "MemoryLow")) {
|
||||||
unit_value = unit_get_ancestor_memory_low(u);
|
unit_value = unit_get_ancestor_memory_low(u);
|
||||||
@ -406,7 +407,8 @@ void cgroup_context_dump(Unit *u, FILE* f, const char *prefix) {
|
|||||||
assert(u);
|
assert(u);
|
||||||
assert(f);
|
assert(f);
|
||||||
|
|
||||||
assert_se(c = unit_get_cgroup_context(u));
|
c = unit_get_cgroup_context(u);
|
||||||
|
assert(c);
|
||||||
|
|
||||||
prefix = strempty(prefix);
|
prefix = strempty(prefix);
|
||||||
|
|
||||||
@ -449,7 +451,7 @@ void cgroup_context_dump(Unit *u, FILE* f, const char *prefix) {
|
|||||||
"%sManagedOOMSwap: %s\n"
|
"%sManagedOOMSwap: %s\n"
|
||||||
"%sManagedOOMMemoryPressure: %s\n"
|
"%sManagedOOMMemoryPressure: %s\n"
|
||||||
"%sManagedOOMMemoryPressureLimit: " PERMYRIAD_AS_PERCENT_FORMAT_STR "\n"
|
"%sManagedOOMMemoryPressureLimit: " PERMYRIAD_AS_PERCENT_FORMAT_STR "\n"
|
||||||
"%sManagedOOMPreference: %s\n",
|
"%sManagedOOMPreference: %s%%\n",
|
||||||
prefix, yes_no(c->cpu_accounting),
|
prefix, yes_no(c->cpu_accounting),
|
||||||
prefix, yes_no(c->io_accounting),
|
prefix, yes_no(c->io_accounting),
|
||||||
prefix, yes_no(c->blockio_accounting),
|
prefix, yes_no(c->blockio_accounting),
|
||||||
@ -1026,14 +1028,17 @@ static void cgroup_apply_io_device_latency(Unit *u, const char *dev_path, usec_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void cgroup_apply_io_device_limit(Unit *u, const char *dev_path, uint64_t *limits) {
|
static void cgroup_apply_io_device_limit(Unit *u, const char *dev_path, uint64_t *limits) {
|
||||||
char limit_bufs[_CGROUP_IO_LIMIT_TYPE_MAX][DECIMAL_STR_MAX(uint64_t)],
|
char limit_bufs[_CGROUP_IO_LIMIT_TYPE_MAX][DECIMAL_STR_MAX(uint64_t)];
|
||||||
buf[DECIMAL_STR_MAX(dev_t)*2+2+(6+DECIMAL_STR_MAX(uint64_t)+1)*4];
|
char buf[DECIMAL_STR_MAX(dev_t)*2+2+(6+DECIMAL_STR_MAX(uint64_t)+1)*4];
|
||||||
|
CGroupIOLimitType type;
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
|
int r;
|
||||||
|
|
||||||
if (lookup_block_device(dev_path, &dev) < 0)
|
r = lookup_block_device(dev_path, &dev);
|
||||||
|
if (r < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (CGroupIOLimitType type = 0; type < _CGROUP_IO_LIMIT_TYPE_MAX; type++)
|
for (type = 0; type < _CGROUP_IO_LIMIT_TYPE_MAX; type++)
|
||||||
if (limits[type] != cgroup_io_limit_defaults[type])
|
if (limits[type] != cgroup_io_limit_defaults[type])
|
||||||
xsprintf(limit_bufs[type], "%" PRIu64, limits[type]);
|
xsprintf(limit_bufs[type], "%" PRIu64, limits[type]);
|
||||||
else
|
else
|
||||||
@ -1048,8 +1053,10 @@ static void cgroup_apply_io_device_limit(Unit *u, const char *dev_path, uint64_t
|
|||||||
static void cgroup_apply_blkio_device_limit(Unit *u, const char *dev_path, uint64_t rbps, uint64_t wbps) {
|
static void cgroup_apply_blkio_device_limit(Unit *u, const char *dev_path, uint64_t rbps, uint64_t wbps) {
|
||||||
char buf[DECIMAL_STR_MAX(dev_t)*2+2+DECIMAL_STR_MAX(uint64_t)+1];
|
char buf[DECIMAL_STR_MAX(dev_t)*2+2+DECIMAL_STR_MAX(uint64_t)+1];
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
|
int r;
|
||||||
|
|
||||||
if (lookup_block_device(dev_path, &dev) < 0)
|
r = lookup_block_device(dev_path, &dev);
|
||||||
|
if (r < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sprintf(buf, "%u:%u %" PRIu64 "\n", major(dev), minor(dev), rbps);
|
sprintf(buf, "%u:%u %" PRIu64 "\n", major(dev), minor(dev), rbps);
|
||||||
@ -1064,7 +1071,8 @@ static bool unit_has_unified_memory_config(Unit *u) {
|
|||||||
|
|
||||||
assert(u);
|
assert(u);
|
||||||
|
|
||||||
assert_se(c = unit_get_cgroup_context(u));
|
c = unit_get_cgroup_context(u);
|
||||||
|
assert(c);
|
||||||
|
|
||||||
return unit_get_ancestor_memory_min(u) > 0 || unit_get_ancestor_memory_low(u) > 0 ||
|
return unit_get_ancestor_memory_min(u) > 0 || unit_get_ancestor_memory_low(u) > 0 ||
|
||||||
c->memory_high != CGROUP_LIMIT_MAX || c->memory_max != CGROUP_LIMIT_MAX ||
|
c->memory_high != CGROUP_LIMIT_MAX || c->memory_max != CGROUP_LIMIT_MAX ||
|
||||||
@ -1589,7 +1597,9 @@ static CGroupMask unit_get_cgroup_mask(Unit *u) {
|
|||||||
|
|
||||||
assert(u);
|
assert(u);
|
||||||
|
|
||||||
assert_se(c = unit_get_cgroup_context(u));
|
c = unit_get_cgroup_context(u);
|
||||||
|
|
||||||
|
assert(c);
|
||||||
|
|
||||||
/* Figure out which controllers we need, based on the cgroup context object */
|
/* Figure out which controllers we need, based on the cgroup context object */
|
||||||
|
|
||||||
|
|||||||
@ -2549,16 +2549,18 @@ static void setup_console_terminal(bool skip_setup) {
|
|||||||
|
|
||||||
static bool early_skip_setup_check(int argc, char *argv[]) {
|
static bool early_skip_setup_check(int argc, char *argv[]) {
|
||||||
bool found_deserialize = false;
|
bool found_deserialize = false;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* Determine if this is a reexecution or normal bootup. We do the full command line parsing much later, so
|
/* Determine if this is a reexecution or normal bootup. We do the full command line parsing much later, so
|
||||||
* let's just have a quick peek here. Note that if we have switched root, do all the special setup things
|
* let's just have a quick peek here. Note that if we have switched root, do all the special setup things
|
||||||
* anyway, even if in that case we also do deserialization. */
|
* anyway, even if in that case we also do deserialization. */
|
||||||
|
|
||||||
for (int i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++) {
|
||||||
if (streq(argv[i], "--switched-root"))
|
if (streq(argv[i], "--switched-root"))
|
||||||
return false; /* If we switched root, don't skip the setup. */
|
return false; /* If we switched root, don't skip the setup. */
|
||||||
else if (streq(argv[i], "--deserialize"))
|
else if (streq(argv[i], "--deserialize"))
|
||||||
found_deserialize = true;
|
found_deserialize = true;
|
||||||
|
}
|
||||||
|
|
||||||
return found_deserialize; /* When we are deserializing, then we are reexecuting, hence avoid the extensive setup */
|
return found_deserialize; /* When we are deserializing, then we are reexecuting, hence avoid the extensive setup */
|
||||||
}
|
}
|
||||||
|
|||||||
@ -688,8 +688,7 @@ static int manager_setup_prefix(Manager *m) {
|
|||||||
for (ExecDirectoryType i = 0; i < _EXEC_DIRECTORY_TYPE_MAX; i++) {
|
for (ExecDirectoryType i = 0; i < _EXEC_DIRECTORY_TYPE_MAX; i++) {
|
||||||
r = sd_path_lookup(p[i].type, p[i].suffix, &m->prefix[i]);
|
r = sd_path_lookup(p[i].type, p[i].suffix, &m->prefix[i]);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_warning_errno(r, "Failed to lookup %s path: %m",
|
return r;
|
||||||
exec_directory_type_to_string(i));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -315,14 +315,15 @@ static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *use
|
|||||||
s->write_packet &&
|
s->write_packet &&
|
||||||
s->n_written < sizeof(s->write_size) + s->write_packet->size) {
|
s->n_written < sizeof(s->write_size) + s->write_packet->size) {
|
||||||
|
|
||||||
struct iovec iov[] = {
|
struct iovec iov[2];
|
||||||
IOVEC_MAKE(&s->write_size, sizeof(s->write_size)),
|
ssize_t ss;
|
||||||
IOVEC_MAKE(DNS_PACKET_DATA(s->write_packet), s->write_packet->size),
|
|
||||||
};
|
|
||||||
|
|
||||||
IOVEC_INCREMENT(iov, ELEMENTSOF(iov), s->n_written);
|
iov[0] = IOVEC_MAKE(&s->write_size, sizeof(s->write_size));
|
||||||
|
iov[1] = IOVEC_MAKE(DNS_PACKET_DATA(s->write_packet), s->write_packet->size);
|
||||||
|
|
||||||
ssize_t ss = dns_stream_writev(s, iov, ELEMENTSOF(iov), 0);
|
IOVEC_INCREMENT(iov, 2, s->n_written);
|
||||||
|
|
||||||
|
ss = dns_stream_writev(s, iov, 2, 0);
|
||||||
if (ss < 0) {
|
if (ss < 0) {
|
||||||
if (!IN_SET(-ss, EINTR, EAGAIN))
|
if (!IN_SET(-ss, EINTR, EAGAIN))
|
||||||
return dns_stream_complete(s, -ss);
|
return dns_stream_complete(s, -ss);
|
||||||
|
|||||||
@ -92,7 +92,6 @@ static void test_runlevel_to_target(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
log_show_color(true);
|
|
||||||
test_setup_logging(LOG_DEBUG);
|
test_setup_logging(LOG_DEBUG);
|
||||||
|
|
||||||
test_unit_validate_alias_symlink_and_warn();
|
test_unit_validate_alias_symlink_and_warn();
|
||||||
|
|||||||
@ -1134,7 +1134,8 @@ check_result_common() {
|
|||||||
local ret
|
local ret
|
||||||
|
|
||||||
if [ -s "$workspace/failed" ]; then
|
if [ -s "$workspace/failed" ]; then
|
||||||
# Non-empty …/failed has highest priority
|
# …/failed only counts if non-empty
|
||||||
|
ls -l "$workspace/failed"
|
||||||
cp -a "$workspace/failed" "${TESTDIR:?}/"
|
cp -a "$workspace/failed" "${TESTDIR:?}/"
|
||||||
ret=1
|
ret=1
|
||||||
elif [ -e "$workspace/testok" ]; then
|
elif [ -e "$workspace/testok" ]; then
|
||||||
@ -1146,28 +1147,24 @@ check_result_common() {
|
|||||||
cat "$workspace/skipped"
|
cat "$workspace/skipped"
|
||||||
ret=0
|
ret=0
|
||||||
elif [ -n "$TIMED_OUT" ]; then
|
elif [ -n "$TIMED_OUT" ]; then
|
||||||
echo "(timeout)" >"${TESTDIR:?}/failed"
|
echo "${TESTNAME:?} timed out!"
|
||||||
ret=2
|
ret=2
|
||||||
else
|
else
|
||||||
echo "(failed; see logs)" >"${TESTDIR:?}/failed"
|
echo "${TESTNAME:?} did not report a result!"
|
||||||
ret=3
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
save_journal "$workspace/var/log/journal"
|
save_journal "$workspace/var/log/journal"
|
||||||
|
|
||||||
check_asan_reports "$workspace" || ret=4
|
check_asan_reports "$workspace" || ret=3
|
||||||
|
|
||||||
if [ -d "${ARTIFACT_DIRECTORY}" ] && [ -f "$workspace/strace.out" ]; then
|
if [ -d "${ARTIFACT_DIRECTORY}" ] && [ -f "$workspace/strace.out" ]; then
|
||||||
cp "$workspace/strace.out" "${ARTIFACT_DIRECTORY}/"
|
cp "$workspace/strace.out" "${ARTIFACT_DIRECTORY}/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${ret:?} != 0 ] && [ -f "$TESTDIR/failed" ]; then
|
[ -f "$TESTDIR/failed" ] && cat "$TESTDIR/failed"
|
||||||
echo -n "${TESTNAME:?}: "
|
|
||||||
cat "$TESTDIR/failed"
|
|
||||||
fi
|
|
||||||
echo "${JOURNAL_LIST:-"No journals were saved"}"
|
echo "${JOURNAL_LIST:-"No journals were saved"}"
|
||||||
|
|
||||||
return ${ret:?}
|
return $ret
|
||||||
}
|
}
|
||||||
|
|
||||||
check_result_nspawn() {
|
check_result_nspawn() {
|
||||||
@ -1312,7 +1309,7 @@ install_config_files() {
|
|||||||
: >"$initdir/etc/resolv.conf"
|
: >"$initdir/etc/resolv.conf"
|
||||||
|
|
||||||
# set the hostname
|
# set the hostname
|
||||||
echo 'H' >"$initdir/etc/hostname"
|
echo systemd-testsuite >"$initdir/etc/hostname"
|
||||||
|
|
||||||
# let's set up just one image with the traditional verbose output
|
# let's set up just one image with the traditional verbose output
|
||||||
if [ "${IMAGE_NAME:?}" != "basic" ]; then
|
if [ "${IMAGE_NAME:?}" != "basic" ]; then
|
||||||
|
|||||||
@ -32,9 +32,12 @@ create_service () {
|
|||||||
Description=$SERVICE_NAME unit
|
Description=$SERVICE_NAME unit
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=sleep 100000
|
ExecStart=/bin/sleep 100000
|
||||||
EOF
|
EOF
|
||||||
mkdir -p /{etc,run,usr/lib}/systemd/system/"$SERVICE_NAME".service.{d,wants,requires}
|
mkdir -p /{etc,run,usr/lib}/systemd/system/"$SERVICE_NAME".service.d
|
||||||
|
mkdir -p /etc/systemd/system/"$SERVICE_NAME".service.{wants,requires}
|
||||||
|
mkdir -p /run/systemd/system/"$SERVICE_NAME".service.{wants,requires}
|
||||||
|
mkdir -p /usr/lib/systemd/system/"$SERVICE_NAME".service.{wants,requires}
|
||||||
}
|
}
|
||||||
|
|
||||||
create_services () {
|
create_services () {
|
||||||
@ -44,9 +47,11 @@ create_services () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_ok () {
|
check_ok () {
|
||||||
x="$(systemctl show --value -p "${2:?}" "${1:?}")"
|
[ $# -eq 3 ] || return
|
||||||
|
|
||||||
|
x="$(systemctl show --value -p "$2" "$1")"
|
||||||
case "$x" in
|
case "$x" in
|
||||||
*${3:?}*) return 0 ;;
|
*$3*) return 0 ;;
|
||||||
*) return 1 ;;
|
*) return 1 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -118,7 +123,7 @@ EOF
|
|||||||
check_ok test15-b ExecCondition "/bin/echo test15-b"
|
check_ok test15-b ExecCondition "/bin/echo test15-b"
|
||||||
rm -rf /usr/lib/systemd/system/service.d
|
rm -rf /usr/lib/systemd/system/service.d
|
||||||
|
|
||||||
clear_services test15-a test15-b test15-c test15-c1
|
clear_services test15-a test15-b test15-c
|
||||||
}
|
}
|
||||||
|
|
||||||
test_linked_units () {
|
test_linked_units () {
|
||||||
@ -148,32 +153,6 @@ test_linked_units () {
|
|||||||
clear_services test15-a test15-b
|
clear_services test15-a test15-b
|
||||||
}
|
}
|
||||||
|
|
||||||
test_template_alias() {
|
|
||||||
echo "Testing instance alias..."
|
|
||||||
echo "*** forward"
|
|
||||||
|
|
||||||
create_service test15-a@
|
|
||||||
ln -s test15-a@inst.service /etc/systemd/system/test15-b@inst.service # alias
|
|
||||||
|
|
||||||
check_ok test15-a@inst Names test15-a@inst.service
|
|
||||||
check_ok test15-a@inst Names test15-b@inst.service
|
|
||||||
|
|
||||||
check_ok test15-a@other Names test15-a@other.service
|
|
||||||
check_ko test15-a@other Names test15-b@other.service
|
|
||||||
|
|
||||||
echo "*** reverse"
|
|
||||||
|
|
||||||
systemctl daemon-reload
|
|
||||||
|
|
||||||
check_ok test15-b@inst Names test15-a@inst.service
|
|
||||||
check_ok test15-b@inst Names test15-b@inst.service
|
|
||||||
|
|
||||||
check_ko test15-b@other Names test15-a@other.service
|
|
||||||
check_ok test15-b@other Names test15-b@other.service
|
|
||||||
|
|
||||||
clear_services test15-a@ test15-b@
|
|
||||||
}
|
|
||||||
|
|
||||||
test_hierarchical_dropins () {
|
test_hierarchical_dropins () {
|
||||||
echo "Testing hierarchical dropins..."
|
echo "Testing hierarchical dropins..."
|
||||||
echo "*** test service.d/ top level drop-in"
|
echo "*** test service.d/ top level drop-in"
|
||||||
@ -516,7 +495,6 @@ test_invalid_dropins () {
|
|||||||
|
|
||||||
test_basic_dropins
|
test_basic_dropins
|
||||||
test_linked_units
|
test_linked_units
|
||||||
test_template_alias
|
|
||||||
test_hierarchical_dropins
|
test_hierarchical_dropins
|
||||||
test_template_dropins
|
test_template_dropins
|
||||||
test_alias_dropins
|
test_alias_dropins
|
||||||
|
|||||||
@ -16,11 +16,11 @@ systemctl start testservice-48.target
|
|||||||
# granularity of one second, which means the manager's unit cache won't be
|
# granularity of one second, which means the manager's unit cache won't be
|
||||||
# marked as dirty when writing the unit file, unless we wait at least a full
|
# marked as dirty when writing the unit file, unless we wait at least a full
|
||||||
# second after the previous daemon-reload.
|
# second after the previous daemon-reload.
|
||||||
# May 07 23:12:20 H testsuite-48.sh[30]: + cat
|
# May 07 23:12:20 systemd-testsuite testsuite-48.sh[30]: + cat
|
||||||
# May 07 23:12:20 H testsuite-48.sh[30]: + ls -l --full-time /etc/systemd/system/testservice-48.service
|
# May 07 23:12:20 systemd-testsuite testsuite-48.sh[30]: + ls -l --full-time /etc/systemd/system/testservice-48.service
|
||||||
# May 07 23:12:20 H testsuite-48.sh[52]: -rw-r--r-- 1 root root 50 2020-05-07 23:12:20.000000000 +0100 /
|
# May 07 23:12:20 systemd-testsuite testsuite-48.sh[52]: -rw-r--r-- 1 root root 50 2020-05-07 23:12:20.000000000 +0100 /
|
||||||
# May 07 23:12:20 H testsuite-48.sh[30]: + stat -f --format=%t /etc/systemd/system/testservice-48.servic
|
# May 07 23:12:20 systemd-testsuite testsuite-48.sh[30]: + stat -f --format=%t /etc/systemd/system/testservice-48.servic
|
||||||
# May 07 23:12:20 H testsuite-48.sh[53]: ef53
|
# May 07 23:12:20 systemd-testsuite testsuite-48.sh[53]: ef53
|
||||||
sleep 3.1
|
sleep 3.1
|
||||||
|
|
||||||
cat >/run/systemd/system/testservice-48.service <<EOF
|
cat >/run/systemd/system/testservice-48.service <<EOF
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user