pgsql: oauth: Add unit tests for multiplexer handling

From: Jacob Champion <jchampion(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: oauth: Add unit tests for multiplexer handling
Date: 2025-08-25 16:42:54
Message-ID: E1uqaHV-001ci3-1q@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

oauth: Add unit tests for multiplexer handling

To better record the internal behaviors of oauth-curl.c, add a unit test
suite for the socket and timer handling code. This is all based on TAP
and driven by our existing Test::More infrastructure.

This commit is a replay of 1443b6c0e, which was reverted due to
buildfarm failures. Compared with that, this version protects the build
targets in the Makefile with a with_libcurl conditional, and it tweaks
the code style in 001_oauth.pl.

Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Reviewed-by: Andrew Dunstan <andrew(at)dunslane(dot)net>
Discussion: https://postgr.es/m/CAOYmi+nDZxJHaWj9_jRSyf8uMToCADAmOfJEggsKW-kY7aUwHA@mail.gmail.com
Discussion: https://postgr.es/m/CAOYmi+m=xY0P_uAzAP_884uF-GhQ3wrineGwc9AEnb6fYxVqVQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4e1e417330d42cb19c7d439cd50eea20f25c7518

Modified Files
--------------
src/interfaces/libpq-oauth/Makefile | 36 +-
src/interfaces/libpq-oauth/meson.build | 35 ++
src/interfaces/libpq-oauth/t/001_oauth.pl | 24 ++
src/interfaces/libpq-oauth/test-oauth-curl.c | 527 +++++++++++++++++++++++++++
4 files changed, 618 insertions(+), 4 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-08-25 19:11:26 pgsql: Use PqMsg_* macros in applyparallelworker.c.
Previous Message Nathan Bossart 2025-08-25 16:08:41 pgsql: Use PqMsg_* macros in fe-protocol3.c.

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-08-25 16:46:35 Re: GetNamedLWLockTranche crashes on Windows in normal backend
Previous Message Robert Treat 2025-08-25 16:36:10 Re: Adding REPACK [concurrently]