Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RHEL-30372) Fix TEST-17-UDEV under ASan (and a couple of gcc warnings) #260

Merged
merged 4 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/journal-remote/microhttpd-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0);

int mhd_respondf(struct MHD_Connection *connection,
int error,
unsigned code,
enum MHD_RequestTerminationCode code,
const char *format, ...) _printf_(4,5);

int mhd_respond(struct MHD_Connection *connection,
unsigned code,
enum MHD_RequestTerminationCode code,
const char *message);

int mhd_respond_oom(struct MHD_Connection *connection);
Expand Down
4 changes: 2 additions & 2 deletions src/resolve/resolved-dns-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ typedef enum DnsServerFeatureLevel {
#define DNS_SERVER_FEATURE_LEVEL_IS_DNSSEC(x) ((x) >= DNS_SERVER_FEATURE_LEVEL_DO)
#define DNS_SERVER_FEATURE_LEVEL_IS_UDP(x) IN_SET(x, DNS_SERVER_FEATURE_LEVEL_UDP, DNS_SERVER_FEATURE_LEVEL_EDNS0, DNS_SERVER_FEATURE_LEVEL_DO)

const char* dns_server_feature_level_to_string(int i) _const_;
int dns_server_feature_level_from_string(const char *s) _pure_;
const char* dns_server_feature_level_to_string(DnsServerFeatureLevel i) _const_;
DnsServerFeatureLevel dns_server_feature_level_from_string(const char *s) _pure_;

struct DnsServer {
Manager *manager;
Expand Down
4 changes: 2 additions & 2 deletions src/shared/install.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ int unit_file_exists(LookupScope scope, const LookupPaths *paths, const char *na
int unit_file_get_list(LookupScope scope, const char *root_dir, Hashmap *h, char **states, char **patterns);
Hashmap* unit_file_list_free(Hashmap *h);

InstallChangeType install_changes_add(InstallChange **changes, size_t *n_changes, int type, const char *path, const char *source);
InstallChangeType install_changes_add(InstallChange **changes, size_t *n_changes, InstallChangeType type, const char *path, const char *source);
void install_changes_free(InstallChange *changes, size_t n_changes);
void install_changes_dump(int r, const char *verb, const InstallChange *changes, size_t n_changes, bool quiet);

Expand All @@ -224,7 +224,7 @@ UnitFileState unit_file_state_from_string(const char *s) _pure_;
/* from_string conversion is unreliable because of the overlap between -EPERM and -1 for error. */

const char *install_change_type_to_string(InstallChangeType t) _const_;
int install_change_type_from_string(const char *s) _pure_;
InstallChangeType install_change_type_from_string(const char *s) _pure_;

const char *unit_file_preset_mode_to_string(UnitFilePresetMode m) _const_;
UnitFilePresetMode unit_file_preset_mode_from_string(const char *s) _pure_;
10 changes: 9 additions & 1 deletion test/units/testsuite-17.03.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,28 @@ event_timeout=10
timeout_signal=SIGABRT
EOF

mkdir -p /run/systemd/system/systemd-udevd.service.d/
cat >/run/systemd/system/systemd-udevd.service.d/99-disable-coredumps.conf <<EOF
[Service]
LimitCORE=0
EOF
systemctl daemon-reload
systemctl restart systemd-udevd.service
}

# shellcheck disable=SC2317
teardown() {
set +e

if [[ -n "$KILL_PID" ]]; then
kill "$KILL_PID"
fi

rm -rf "$TMPDIR"
rm -rf "$TMPDIR" /run/systemd/system/systemd-udevd.service.d

mv -f /etc/udev/udev.conf.bckp /etc/udev/udev.conf
rm -f "$test_rule"
systemctl daemon-reload
systemctl restart systemd-udevd.service
}

Expand Down
Loading