Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rvKIy-00BGUY-93 for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Apr 2024 17:03:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rvKIv-00GJ8h-V3 for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Apr 2024 17:03:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rvKIv-00GJ8Z-Le for pgsql-hackers@lists.postgresql.org; Fri, 12 Apr 2024 17:03:09 +0000 Received: from lahtoruutu.iki.fi ([185.185.170.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rvKIt-002XQI-0F for pgsql-hackers@postgresql.org; Fri, 12 Apr 2024 17:03:08 +0000 Received: from [172.19.157.206] (unknown [212.174.35.38]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4VGNDS3xsMz49Pyl; Fri, 12 Apr 2024 20:03:04 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1712941384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yer4eBz8axKbXnLUDyQawOhyvH/63nVP7G/1xQA/R5k=; b=eOzVUfCobMOlRnfpQ6MZ3q2XIc1jAGy4hNGX/NKO5psRyCHC3PrTh8QPXBhR0QTa7mAwbP AysavZQInP74zwF//4Wt4Ez/otuCieHiqXegmX7Ja33yelSfYrNw14+3TDb7gL05cpO2u2 X0I0KALg4o4Oosmo8rgQcSmEvJygAYEBeFziGhtbgLaLW/D1jEcdP2fNMSzqOxO29yVrGe 85Ev6y9P9DDitfU8jrv1CgbN66AQ7P6SnhmNcus1q1YV0NPzbyfF6BR7wWncn85sXIVTH1 pyyrdM6vT6DINpv+2/YCMUsjBZsJ/NFdExt2kJIfXtTGHIsOZPv70Oye3ThUKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1712941384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yer4eBz8axKbXnLUDyQawOhyvH/63nVP7G/1xQA/R5k=; b=hoNY7WBMPC/fSmWFPwBEkGnc4fDCJQOh9XC7N4bGeINrPwzqWwGxmOCBg0kSiXlkv+BRQ5 bMZceqVHh9vBVr6ROWaPNJnAt8vo4QcfyrdaM5DY1Q0dtvDEk6MrZpD0XZMV1f4MP3I3Kf TItm2ic6H3gXxGRGgojBfPrMegxuAkOJkGdncQQq5Rqb3qRspHaKqjVf9wDvlX48Q7jIhs Ppqjnc//f5joyRZf60OkM364Z0gKWVyF6ZRh2awhtsYPSmztE5n7pXn7Db6Nb0kX40Dq2O sDD0tD3QiZ4dmJpFBiUrCuSqE3frIGUOgymAPYiP+8oy3Vx/xqDh1oXN55BYEA== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1712941384; a=rsa-sha256; cv=none; b=H0TJfuAQuyx0VJYivYOf37jqNWbG36HFDlzc3RRGZmRXXcO3dX7wsROFkzYXjr/5BlTuIw QLScS3DRjR2gGhB5nlDuNjrdYAUIpzV2Y9GjY9ZzVCpbs5dPMGetsQRPdN8l1Vy5aqEC4C W5KnndpY92KeDI9A4QIqFKXXttK3zp/fv7FfZBOZWRGQ3VbNqjhjLS9+5B3ufQ3jcK2uEs eb0OfJgK/kpSnFkQUwh/M+Rp3zsB58qqBCLxYZSYjIkZmmsMoCeec7O9Mf0gJBK4BQXH3q 1f0lxPALeOWaXH3Ha952aL6zEYsMMF0t4+I+yPcgYMVWHkkP0q95EIESf6wsGw== Message-ID: <2d7de342-2045-42b4-8dbe-86d18e7c9302@iki.fi> Date: Fri, 12 Apr 2024 20:03:03 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: PG_TEST_EXTRAs by theme rather than test name (Re: pgsql: Add tests for libpq gssencmode and sslmode options) From: Heikki Linnakangas To: Peter Eisentraut , pgsql-hackers References: <09d4bf5d-d0fa-4c66-a1d7-5ec757609646@eisentraut.org> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk (moved to pgsql-hackers, change subject) On 10/04/2024 18:54, Heikki Linnakangas wrote: > On 10/04/2024 17:48, Peter Eisentraut wrote: >> On 08.04.24 01:50, Heikki Linnakangas wrote: >>> Add tests for libpq gssencmode and sslmode options >> >> Why aren't these tests at >> src/interfaces/libpq/t/nnn_negotiate_encryption.pl ? > > To be honest, it never occurred to me. It started out as extra tests > under src/test/ssl/, and when I decided to move them out to its own > module, I didn't think of moving them to src/interfaces/libpq/t/. > > I will move it, barring any objections or better ideas. Moved. I also added an extra check for PG_TEST_EXTRA=kerberos, so that the tests that require a MIT Kerberos installation are only run if PG_TEST_EXTRA=kerberos is specified. That seems prudent; it seems unlikely that you would want to run libpq_encryption tests with Kerberos tests included, but not the main kerberos tests. If you specify PG_TEST_EXTRA=libpq_encryption, but not 'kerberos', it's probably because you don't have an MIT Kerberos installation on your system. I added documentation for the new PG_TEST_EXTRA=libpq_encryption option, I missed that earlier, with a note on the above interaction with 'kerberos'. As we accumulate more PG_TEST_EXTRA options, I think we should categorize the tests by the capabilities they need or the risk associated, rather than by test names. Currently we have: - kerberos: Requires MIT Kerberos installation and opens TCP/IP listen sockets - ldap: Requires OpenLDAP installation and opens TCP/IP listen sockets - ssl: Opens TCP/IP listen sockets. - load_balance: Requires editing the system 'hosts' file and opens TCP/IP listen sockets. - libpq_encryption: Opens TCP/IP listen sockets. For the GSSAPI tests, requires MIT Kerberos installation - wal_consistency_checking: is resource intensive - xid_wraparound: is resource intensive There are a few clear themes here: - tests that open TCP/IP listen sockets - tests that require OpenLDAP installation - tests that require MIT Kerberos installation - tests that require editing 'hosts' file - tests that are resource intensive We could have PG_TEST_EXTRA options that match those themes, and enable/disable the individual tests based on those requirements. For example, if you're on a single-user system and have no issue with opening TCP/IP listen sockets, you would specify "PG_TEST_EXTRA=tcp-listen", and all the tests that need to open TCP/IP listen sockets would run. Also it would be nice to have autoconf/meson tests for the presence of OpenLDAP / MIT Kerberos installations, instead of having to enable/disable them with PG_TEST_EXTRA. -- Heikki Linnakangas Neon (https://neon.tech)