Skip to content

Commit

Permalink
CI: user newer OS versions in CI workflow
Browse files Browse the repository at this point in the history
also bump default development container to Ubuntu 24.04

This commit also contains some nitfixes that were detected
by the newer CI components. If it is just nitfixes, we do not
create separate commits for them.
  • Loading branch information
rgerhards committed Nov 19, 2024
1 parent 91f1dd7 commit 3512757
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 24 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci_compile.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 Rainer Gerhards and Others
# Copyright 2024 Rainer Gerhards and Others
#
# https://github.com/rsyslog/rsyslog-pkg-ubuntu
#
Expand Down Expand Up @@ -30,15 +30,15 @@ on:
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 50
timeout-minutes: 30
strategy:
# When set to true, cancel all in-progress jobs if any matrix job fails.
fail-fast: false
matrix:
# note: we compile only with oldest and newest support compiler to
# save ressources. Other important ones are used during the rest of
# the check runs (most importantly the distro-default ones).
config: [clang9, clang-14-ndebug, gcc-11-ndebug, gcc8-ndebug, gcc8-debug]
config: [clang9, clang-18-ndebug, gcc-11-ndebug, gcc8-ndebug, gcc8-debug]

steps:
- name: git checkout project
Expand All @@ -54,10 +54,10 @@ jobs:
export RSYSLOG_DEV_CONTAINER='rsyslog/rsyslog_dev_base_ubuntu:20.04'
export CC='clang-9'
;;
'clang14-ndebug')
'clang18-ndebug')
export RSYSLOG_CONFIGURE_OPTIONS_EXTRA='--enable-debug=no'
export RSYSLOG_DEV_CONTAINER='rsyslog/rsyslog_dev_base_ubuntu:22.04'
export CC='clang-14'
export RSYSLOG_DEV_CONTAINER='rsyslog/rsyslog_dev_base_ubuntu:24.04'
export CC='clang-181'
;;
'gcc8-ndebug')
export RSYSLOG_CONFIGURE_OPTIONS_EXTRA='--enable-debug=no'
Expand All @@ -75,5 +75,7 @@ jobs:
export CC='gcc-11'
;;
esac
echo CC $CC
echo CFLAGS $CFLAGS
devtools/devcontainer.sh --rm devtools/run-configure.sh
devtools/devcontainer.sh --rm make -j20
36 changes: 35 additions & 1 deletion .github/workflows/run_checks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Rainer Gerhards and Others
# Copyright 2024 Rainer Gerhards and Others
#
# https://github.com/rsyslog/rsyslog-pkg-ubuntu
#
Expand Down Expand Up @@ -38,6 +38,7 @@ jobs:
config: [centos_7, centos_8, debian_10, debian_11,
fedora_35, fedora_36,
ubuntu_18, ubuntu_20, ubuntu_22,
ubuntu_24_san, ubuntu_24_tsan,
ubuntu_22_san, ubuntu_22_tsan, ubuntu_22_distcheck, ubuntu_22_codecov,
kafka_codecov, elasticsearch]

Expand Down Expand Up @@ -155,6 +156,39 @@ jobs:
--disable-omkafka --enable-debug --disable-elasticsearch \
--disable-elasticsearch-tests"
;;
'ubuntu_24_san')
export CI_SANITIZE_BLACKLIST='tests/asan.supp'
export RSYSLOG_DEV_CONTAINER='rsyslog/rsyslog_dev_base_ubuntu:24.04'
export CC='clang'
export RSYSLOG_CONFIGURE_OPTIONS_EXTRA="--disable-elasticsearch-tests \
--disable-libfaketime --without-valgrind-testbench --disable-valgrind \
--disable-kafka-tests --enable-imdtls --enable-omdtls"
export CFLAGS="-fstack-protector -D_FORTIFY_SOURCE=2 \
-fsanitize=address,undefined,nullability,unsigned-integer-overflow \
-fno-sanitize-recover=undefined,nullability,unsigned-integer-overflow \
-g -O3 -fno-omit-frame-pointer -fno-color-diagnostics"
export LSAN_OPTIONS='detect_leaks=0'
export UBSAN_OPTIONS='print_stacktrace=1'
export CI_MAKE_CHECK_OPT='-j2'
;;
'ubuntu_24_tsan')
export RSYSLOG_DEV_CONTAINER='rsyslog/rsyslog_dev_base_ubuntu:24.04'
export CI_VALGRIND_SUPPRESSIONS="ubuntu22.04.supp"
export CI_SANITIZE_BLACKLIST='tests/tsan.supp'
export CC='clang'
# impstats has known and OK races
# mmpstrucdata TEMPORARILY disabled because of a threading hang on shutdown
export RSYSLOG_CONFIGURE_OPTIONS_EXTRA="--disable-elasticsearch-tests --enable-imfile-tests \
--disable-impstats --disable-kafka-tests --disable-mmpstrucdata \
--disable-clickhouse --disable-clickhouse-tests --disable-kafka-tests \
--disable-libfaketime --without-valgrind-testbench --disable-valgrind"
export CFLAGS="-std=c11 -g -fstack-protector -D_FORTIFY_SOURCE=2 -fsanitize=thread \
-O0 -fno-omit-frame-pointer -fno-color-diagnostics"
# note: we need pathes in container, thus /rsyslog vs. $(pwd) in TSAN_OPTIONS
export TSAN_OPTIONS="halt_on_error=1 suppressions=/rsyslog/tests/tsan-rt.supp"
export ABORT_ALL_ON_TEST_FAIL='YES'
export CI_MAKE_CHECK_OPT='-j1'
;;
'kafka_codecov')
export RSYSLOG_DEV_CONTAINER='rsyslog/rsyslog_dev_base_ubuntu:22.04'
export CI_VALGRIND_SUPPRESSIONS="ubuntu22.04.supp"
Expand Down
4 changes: 2 additions & 2 deletions contrib/omhttpfs/omhttpfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static void httpfs_curl_set_put(CURL* curl)
curl_easy_setopt(curl, CURLOPT_HTTPGET, 0L);
curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
curl_easy_setopt(curl, CURLOPT_POST, 0L);
curl_easy_setopt(curl, CURLOPT_PUT, 0L);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 0L);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 0L);

curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
Expand All @@ -270,7 +270,7 @@ static void httpfs_curl_set_post(CURL* curl)
{
curl_easy_setopt(curl, CURLOPT_HTTPGET, 0L);
curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
curl_easy_setopt(curl, CURLOPT_PUT, 0L);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 0L);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 0L);
curl_easy_setopt(curl, CURLOPT_POST, 1L);

Expand Down
2 changes: 1 addition & 1 deletion devtools/default_dev_container
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rsyslog/rsyslog_dev_base_ubuntu:20.04
rsyslog/rsyslog_dev_base_ubuntu:24.04
2 changes: 1 addition & 1 deletion tests/mangle_qi.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ processQI(FILE *const __restrict__ qi)
int queuesize;
int i;
int c;
fgets(lnbuf, sizeof(lnbuf), qi);
(void) fgets(lnbuf, sizeof(lnbuf), qi);
fputs(lnbuf, stdout);
/* we now read the queue size line */
/* note: this is quick and dirty, no error checks
Expand Down
3 changes: 1 addition & 2 deletions tests/test_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ hash_from_string(void *k)
int main(int argc, char *argv[])
{
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz);
gettimeofday(&tv, NULL);
if(argc != 2) {
fprintf(stderr, "usage: test_id test-file-name\n");
exit(1);
Expand Down
20 changes: 9 additions & 11 deletions tools/logctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,18 @@
#include <getopt.h>
#include <unistd.h>

#include "rsyslog.h"
/* we need this to avoid issues with older versions of libbson */
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wunknown-attributes"
#pragma GCC diagnostic ignored "-Wexpansion-to-defined"
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#pragma GCC diagnostic ignored "-Wold-style-definition"
#endif
PRAGMA_DIAGNOSTIC_PUSH
PRAGMA_IGNORE_Wpragmas
PRAGMA_IGNORE_Wunknown_warning_option
PRAGMA_IGNORE_Wunknown_attribute
PRAGMA_IGNORE_Wexpansion_to_defined
PRAGMA_IGNORE_Wstrict_prototypes
PRAGMA_IGNORE_Wold_style_definition
#include <mongoc.h>
#include <bson.h>
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
PRAGMA_DIAGNOSTIC_POP

#define N 80

Expand Down

0 comments on commit 3512757

Please sign in to comment.