pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Small TAP tests cleanup for Windows and unused modules
Date: Fri, 25 Mar 2022 12:42:18 +0000
Message-ID: <87lewyqk45.fsf@wibble.ilmari.org> (raw)
In-Reply-To: <1C5E6782-5A0B-4F6D-9F2B-5AF177BDB333@yesql.se>
References: <A5A074CD-3198-492B-BE5E-7961EFC3733F@yesql.se>
	<2e523a9e-d82f-0bb0-f4c1-bd5525e0c7a7@dunslane.net>
	<aab196d4-2f94-5557-f91c-b007cc7dbaa4@dunslane.net>
	<EF73EF1E-5469-495E-B48C-8C6F90B873AB@yesql.se>
	<1C5E6782-5A0B-4F6D-9F2B-5AF177BDB333@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:

>> On 18 Feb 2022, at 22:02, Daniel Gustafsson <daniel@yesql.se> wrote:
>
>> .. let's drop the 0001 from this thread and just go ahead with 0002.
>
> I applied the 0002 patch today, cleaning up the unused module imports.

A quick git grep¹ revealed a few more extraneous `use Config;`
statements (and manual inspection a few more unused modules in one
file). Here's a patch that removes those. It passes tests using

    ./configure --enable-tap-tests --with-ldap
    make check-world PG_TEST_EXTRA=ldap

- ilmari

[1] git grep -L '[%@$]Config\b' $(git grep -l 'use Config')

Attachments:

0001-Remove-more-unused-module-imports-in-test.patch (text/x-diff, 1.6K) download From 681897c17c125a0ef380aa3ef0cba786dba24d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org> Date: Fri, 25 Mar 2022 12:36:34 +0000 Subject: [PATCH] Remove more unused module imports in test Commit 7dac61402e34c6d41d5d11cdc4c6a55f91e24026 removed a bunch of superflous `use Config;` and `use Cwd;` statements, but some were left behind. --- src/bin/pg_ctl/t/001_start_stop.pl | 3 --- src/bin/pg_rewind/t/RewindTest.pm | 1 - src/test/ldap/t/001_auth.pl | 1 - 3 files changed, 5 deletions(-) diff --git a/src/bin/pg_ctl/t/001_start_stop.pl b/src/bin/pg_ctl/t/001_start_stop.pl index 3b45390ced..fdffd76d99 100644 --- a/src/bin/pg_ctl/t/001_start_stop.pl +++ b/src/bin/pg_ctl/t/001_start_stop.pl @@ -4,9 +4,6 @@ use strict; use warnings; -use Config; -use Fcntl ':mode'; -use File::stat qw{lstat}; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm index 5651602858..1e34768e27 100644 --- a/src/bin/pg_rewind/t/RewindTest.pm +++ b/src/bin/pg_rewind/t/RewindTest.pm @@ -35,7 +35,6 @@ package RewindTest; use warnings; use Carp; -use Config; use Exporter 'import'; use File::Copy; use File::Path qw(rmtree); diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl index 9f15248935..b342146e55 100644 --- a/src/test/ldap/t/001_auth.pl +++ b/src/test/ldap/t/001_auth.pl @@ -6,7 +6,6 @@ use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; use Test::More; -use Config; my ($slapd, $ldap_bin_dir, $ldap_schema_dir); -- 2.30.2

view thread (11+ messages)  latest in thread

Message-ID: <87lewyqk45.fsf@wibble.ilmari.org>
Permalink:  ../87lewyqk45.fsf@wibble.ilmari.org/
Also on:    postgresql.org/message-id/87lewyqk45.fsf@wibble.ilmari.org

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ilmari@ilmari.org, daniel@yesql.se, andrew@dunslane.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: Small TAP tests cleanup for Windows and unused modules
  In-Reply-To: <87lewyqk45.fsf@wibble.ilmari.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox