redhat-developer / dotnet-regular-tests

.NET Core tests for .NET Bunny (RHEL & Fedora RPM tests)
MIT License
8 stars 13 forks source link

system-data-odbc fails if socket path is too long. #336

Closed nicrowe00 closed 10 months ago

nicrowe00 commented 10 months ago

On certain testing environments, system-data-odbc is failing because the path to the created socket is too long. The path length for sockets on a Linux based system is 108 bytes, and on these environments the socket path length is usually 135-140 bytes.

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
+ pg_ctl start -o '-k /var/tmp/tmt/run-026/plans/rhel-8/dotnet8-0/discover/default-0/tests/tests/dotnet-regular-tests/system-data-odbc/socket'
waiting for server to start....2024-01-22 10:17:35.747 EST [50168] LOG:  listening on IPv6 address "::1", port 24922
2024-01-22 10:17:35.747 EST [50168] LOG:  listening on IPv4 address "127.0.0.1", port 24922
2024-01-22 10:17:35.750 EST [50168] LOG:  Unix-domain socket path "/var/tmp/tmt/run-026/plans/rhel-8/dotnet8-0/discover/default-0/tests/tests/dotnet-regular-tests/system-data-odbc/socket/.s.PGSQL.24922" is too long (maximum 107 bytes)
2024-01-22 10:17:35.750 EST [50168] WARNING:  could not create Unix-domain socket in directory "/var/tmp/tmt/run-026/plans/rhel-8/dotnet8-0/discover/default-0/tests/tests/dotnet-regular-tests/system-data-odbc/socket"
2024-01-22 10:17:35.750 EST [50168] FATAL:  could not create any Unix-domain sockets
2024-01-22 10:17:35.750 EST [50168] LOG:  database system is shut down
 stopped waiting
pg_ctl: could not start server

cc @tmds @omajid

tmds commented 10 months ago

The socket path gets chosen by the test here:

https://github.com/redhat-developer/dotnet-regular-tests/blob/661732625c1acb3cdc99e4c0760cc2b0b44eab04/system-data-odbc/test.sh#L32

Can you update the test so it uses a shorter path, like "$(mktemp -d)/socket"?