You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-06-20 01:17:49 +02:00
Run integration tests on Alpine 3.21 (musl libc).
Drop the c-only restriction for the a321 CI job so the full unit and integration suites run on musl libc, exercising the integration tests (including SFTP) against Alpine in addition to glibc. Apply the ssh-rsa HostKeyAlgorithms/PubkeyAcceptedAlgorithms workaround to a321 as well as u22, since Alpine 3.21 ships OpenSSH 9.x which no longer offers the SHA-1 ssh-rsa host-key algorithm by default and the libssh2 client requires it (otherwise the SFTP handshake fails key exchange with LIBSSH2_ERROR_KEX_FAILURE). Suppress the libssh2_session_init_ex and libssh2_session_handshake "possibly lost" leaks reported by valgrind during SFTP integration. These are persistent allocations tied to the session lifetime and are flagged only on the Linux CI runner where valgrind wraps the integration test binary. The suppressions go in valgrind.suppress.none because integration tests always run with vm none. Generalize hrnHostPgBinPath() to probe the Debian, RHEL, and Alpine PostgreSQL bin paths in turn rather than hardcoding two, and throw a clear assert if none match. Add a321 to the default VM list, install PostgreSQL 15/16/17 on Alpine, and point VMDEF_PGSQL_BIN at the Alpine layout. Rebuild the a321 base image accordingly.
This commit is contained in:
@@ -50,8 +50,8 @@ jobs:
|
||||
# All unit tests on the newest gcc available
|
||||
- param: test --vm=f44 --param=c-only --param=no-valgrind --param=no-coverage --param=no-performance
|
||||
|
||||
# All unit tests on musl libc
|
||||
- param: test --vm=a321 --param=c-only --param=no-coverage --param=no-performance
|
||||
# All unit and integration tests on musl libc
|
||||
- param: test --vm=a321 --param=no-coverage --param=no-performance
|
||||
|
||||
# RHEL documentation
|
||||
- param: doc --vm=rh8
|
||||
|
||||
+4
-1
@@ -12,6 +12,10 @@
|
||||
# - docker login -u pgbackrest
|
||||
# - DATE=YYYYMMDDX;VM=X;ARCH=X;BASE=pgbackrest/test:${VM?}-base-${ARCH?};docker tag ${BASE?} ${BASE?}-${DATE?} && docker push ${BASE?}-${DATE?}
|
||||
# **********************************************************************************************************************************
|
||||
20260613A:
|
||||
x86_64:
|
||||
a321: 81e4c3b40948ede95e1053eb26d5df27a4f84022
|
||||
|
||||
20260612A:
|
||||
i386:
|
||||
d12: 8fb978ab92ce2d69650af9d8bf999e1435276664
|
||||
@@ -30,6 +34,5 @@
|
||||
u22: 2ab1bb42a3815ee6102f0be6ea1b3c579d09e136
|
||||
|
||||
x86_64:
|
||||
a321: dab99d91eed1710c68dae28efa5cd0e27e0a7f60
|
||||
rh8: 0142e914cbf025f405a34d4c432e72c303476fe6
|
||||
u22: 003a17aace256ed45378c079c895acdff93129b5
|
||||
|
||||
@@ -604,7 +604,7 @@ sub containerBuild
|
||||
" echo '***********************************************' >> /etc/issue.net && \\\n" .
|
||||
" echo 'Banner /etc/issue.net' >> /etc/ssh/sshd_config";
|
||||
|
||||
if ($strOS eq VM_U22)
|
||||
if ($strOS eq VM_U22 || $strOS eq VM_A321)
|
||||
{
|
||||
$strScript .= sectionHeader() .
|
||||
" echo '# Add PubkeyAcceptedAlgorithms (required for SFTP)' >> /etc/ssh/sshd_config && \\\n" .
|
||||
|
||||
@@ -79,7 +79,7 @@ use constant VM_U22 => 'u22';
|
||||
push @EXPORT, qw(VM_U22);
|
||||
|
||||
# List of default test VMs
|
||||
use constant VM_LIST => (VM_D12, VM_RH8, VM_U22);
|
||||
use constant VM_LIST => (VM_D12, VM_RH8, VM_U22, VM_A321);
|
||||
push @EXPORT, qw(VM_LIST);
|
||||
|
||||
my $oyVm =
|
||||
@@ -108,16 +108,18 @@ my $oyVm =
|
||||
&VM_OS_BASE => VM_OS_BASE_ALPINE,
|
||||
&VM_IMAGE => 'alpine:3.21',
|
||||
&VMDEF_PG_REPO => false,
|
||||
&VMDEF_PGSQL_BIN => '/usr/lib/postgresql/{[version]}/bin',
|
||||
&VMDEF_PGSQL_BIN => '/usr/libexec/postgresql{[version]}',
|
||||
|
||||
&VM_DB =>
|
||||
[
|
||||
PG_VERSION_15,
|
||||
PG_VERSION_16,
|
||||
PG_VERSION_17,
|
||||
],
|
||||
|
||||
&VM_DB_TEST =>
|
||||
[
|
||||
PG_VERSION_17,
|
||||
PG_VERSION_16,
|
||||
],
|
||||
},
|
||||
|
||||
@@ -158,7 +160,6 @@ my $oyVm =
|
||||
&VM_DB_TEST =>
|
||||
[
|
||||
PG_VERSION_14,
|
||||
PG_VERSION_16,
|
||||
PG_VERSION_17,
|
||||
],
|
||||
},
|
||||
|
||||
@@ -937,17 +937,32 @@ hrnHostPgBinPath(HrnHost *const this)
|
||||
{
|
||||
MEM_CONTEXT_TEMP_BEGIN()
|
||||
{
|
||||
const String *pgPath = strNewFmt("/usr/lib/postgresql/%s/bin", strZ(pgVersionToStr(hrnHostPgVersion())));
|
||||
const String *pgPath = NULL;
|
||||
const char *const version = strZ(pgVersionToStr(hrnHostPgVersion()));
|
||||
|
||||
TRY_BEGIN()
|
||||
const String *const pgPathList[] =
|
||||
{
|
||||
hrnHostExecP(this, strNewFmt("ls %s/initdb", strZ(pgPath)));
|
||||
}
|
||||
CATCH_ANY()
|
||||
strNewFmt("/usr/lib/postgresql/%s/bin", version), // Debian
|
||||
strNewFmt("/usr/pgsql-%s/bin", version), // RHEL
|
||||
strNewFmt("/usr/libexec/postgresql%s", version), // Alpine
|
||||
};
|
||||
|
||||
for (unsigned int pgPathIdx = 0; pgPath == NULL && pgPathIdx < LENGTH_OF(pgPathList); pgPathIdx++)
|
||||
{
|
||||
pgPath = strNewFmt("/usr/pgsql-%s/bin", strZ(pgVersionToStr(hrnHostPgVersion())));
|
||||
TRY_BEGIN()
|
||||
{
|
||||
hrnHostExecP(this, strNewFmt("ls %s/initdb", strZ(pgPathList[pgPathIdx])));
|
||||
pgPath = pgPathList[pgPathIdx];
|
||||
}
|
||||
CATCH_ANY()
|
||||
{
|
||||
// Try the next path
|
||||
}
|
||||
TRY_END();
|
||||
}
|
||||
TRY_END();
|
||||
|
||||
if (pgPath == NULL)
|
||||
THROW_FMT(AssertError, "unable to find bin path for PostgreSQL %s", version);
|
||||
|
||||
MEM_CONTEXT_OBJ_BEGIN(this)
|
||||
{
|
||||
|
||||
@@ -12,3 +12,17 @@
|
||||
fun:_Unwind_Backtrace
|
||||
fun:backtrace_full
|
||||
}
|
||||
{
|
||||
libssh2_session_handshake
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: possible
|
||||
...
|
||||
fun:libssh2_session_handshake
|
||||
}
|
||||
{
|
||||
libssh2_session_init_ex
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: possible
|
||||
...
|
||||
fun:libssh2_session_init_ex
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user