Merge pull request #27853 from keszybz/various-bits-and-pieces-included-to-reuse-the-ci-run

Various bits and pieces included to reuse the ci run
This commit is contained in:
Luca Boccassi
2023-05-31 11:08:36 +01:00
committed by GitHub
7 changed files with 20 additions and 13 deletions
+4 -4
View File
@@ -127,7 +127,7 @@ char* getlogname_malloc(void) {
return uid_to_name(uid);
}
char *getusername_malloc(void) {
char* getusername_malloc(void) {
const char *e;
e = secure_getenv("USER");
@@ -171,7 +171,7 @@ const char* default_root_shell_at(int rfd) {
return "/bin/sh";
}
const char *default_root_shell(const char *root) {
const char* default_root_shell(const char *root) {
_cleanup_close_ int rfd = -EBADF;
rfd = open(empty_to_root(root), O_CLOEXEC | O_DIRECTORY | O_PATH);
@@ -847,7 +847,7 @@ bool valid_gecos(const char *d) {
return true;
}
char *mangle_gecos(const char *d) {
char* mangle_gecos(const char *d) {
char *mangled;
/* Makes sure the provided string becomes valid as a GEGOS field, by dropping bad chars. glibc's
@@ -1059,7 +1059,7 @@ int is_this_me(const char *username) {
return uid == getuid();
}
const char *get_home_root(void) {
const char* get_home_root(void) {
const char *e;
/* For debug purposes allow overriding where we look for home dirs */
+2 -2
View File
@@ -103,7 +103,7 @@ typedef enum ValidUserFlags {
bool valid_user_group_name(const char *u, ValidUserFlags flags);
bool valid_gecos(const char *d);
char *mangle_gecos(const char *d);
char* mangle_gecos(const char *d);
bool valid_home(const char *p);
static inline bool valid_shell(const char *p) {
@@ -136,7 +136,7 @@ const char* default_root_shell(const char *root);
int is_this_me(const char *username);
const char *get_home_root(void);
const char* get_home_root(void);
static inline bool hashed_password_is_locked_or_invalid(const char *password) {
return password && password[0] != '$';
+2
View File
@@ -96,6 +96,8 @@ static int help(void) {
_cleanup_free_ char *link = NULL;
int r;
pager_open(arg_pager_flags);
r = terminal_urlify_man("systemd-dissect", "1", &link);
if (r < 0)
return log_oom();
+2 -1
View File
@@ -818,7 +818,8 @@ static LoopDevice* loop_device_free(LoopDevice *d) {
/* Now that the block device is released, let's also try to remove it */
if (control >= 0) {
useconds_t delay = 5 * USEC_PER_MSEC;
useconds_t delay = 5 * USEC_PER_MSEC; /* A total delay of 5090 ms between 39 attempts,
* (4*5 + 5*10 + 5*20 + … + 3*640) = 5090. */
for (unsigned attempt = 1;; attempt++) {
if (ioctl(control, LOOP_CTL_REMOVE, d->nr) >= 0)
+7 -3
View File
@@ -6,10 +6,14 @@
#include "macro.h"
int main(int argc, char **argv) {
void *handle;
void *handles[argc - 1];
int i;
assert_se(handle = dlopen(argv[1], RTLD_NOW));
assert_se(dlclose(handle) == 0);
for (i = 0; i < argc - 1; i++)
assert_se(handles[i] = dlopen(argv[i + 1], RTLD_NOW));
for (i--; i >= 0; i--)
assert_se(dlclose(handles[i]) == 0);
return EXIT_SUCCESS;
}
+2 -2
View File
@@ -102,11 +102,11 @@ testcase_suspend_on_lid() {
echo "suspend not supported on this testbed, skipping"
return
fi
if ! command -v evemu-device &>/dev/null; then
if ! command -v evemu-device >/dev/null; then
echo "command evemu-device not found, skipping"
return
fi
if ! command -v evemu-event &>/dev/null; then
if ! command -v evemu-event >/dev/null; then
echo "command evemu-event not found, skipping"
return
fi
+1 -1
View File
@@ -7,7 +7,7 @@ set -o pipefail
# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
if ! command -v systemd-repart &>/dev/null; then
if ! command -v systemd-repart >/dev/null; then
echo "no systemd-repart" >/skipped
exit 0
fi