Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6MYH-0007Rl-Kq for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jun 2023 02:36:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q6MYG-0006mI-8E for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jun 2023 02:36:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6MYF-0006gc-UP for pgsql-hackers@lists.postgresql.org; Tue, 06 Jun 2023 02:36:03 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q6MYD-000S0s-Fy for pgsql-hackers@lists.postgresql.org; Tue, 06 Jun 2023 02:36:02 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-541f4ee6f89so3760392eaf.2 for ; Mon, 05 Jun 2023 19:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686018960; x=1688610960; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gwKUgnGf6S8y0PKBDyyZu4sIDLCbp1Sj74FquEGjicA=; b=f9cyQgkEScSAXSa43i4a9adX9lTwsw9fyH4/WfyMi3S5AEc0KluaPFTuGUI3/YSehw VQO+3OXINnECFD4MZ6lSdNGamOq/WtrjYrx04ponMiDVvtVxJCFRWdDIx7b0VbKL7c6i fxrt/LWbHn+jPCYP5EEpB3kgae1nR+Z4vBmBaS2pRlkZevbCHsstcI8WE6sAVIR58VJB Wp716nIgCg/HdFa5tRL/hR2zbg3ugWmsFeN5HMP4zlhOxIlnKIs4xjxkj5IOrItmS5O0 VpqQHOn7rNJtJ5Z7CPHfbwiEhW2R9eBcekkWVBJBVEEBU0oY1iCct5JQFUDrtR0515cZ Z1Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686018960; x=1688610960; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gwKUgnGf6S8y0PKBDyyZu4sIDLCbp1Sj74FquEGjicA=; b=EnoYQT9WaxM46qW2v7ONjqJXHNXzAtTFVfcahdqT3b5jmOKNFAoOtyEYoMIuuz+IIx IIf+n5yjWCQqBZwYudA7KlyCAk93UCDUxauRMeXLNXHeDLg16VT9h9oP8mAqneJgaAc0 +1M5Udfvn6GiMfCQStr7RVlceXIOID1ule0hhPLPtAhn2z9E5v3lfCRuP+r4QZ1u38KO ACzJ5R/umsMfOsY5gjrVezxhuGw1IZ6T1AF/AyqxCvWSU/ohR/eEC6pc6oaRBV7Vi13T V15MBpEBFM48KIXU69U+npWXn9+fT0s1ZnRXkD0p/83x2GrJAdF4ILemTwfQeZjDgMuD /ZGg== X-Gm-Message-State: AC+VfDyW3ud8j5Q1KKrhNdF6ghCfMKGGKCWnKQLjS3KRuS0nLHg5FOE5 MCRv08I/ONI6Ec4UiXilxjH9W25wZ0ThLlOQ8jQ= X-Google-Smtp-Source: ACHHUZ78h9/7+h4D7gMOoRBeCiIw2fmT+GdezuBpoWHMw7fDKUyiD2S3t2rNTnhgOD/CCBpya10CgeBjPxahgUrY4u4= X-Received: by 2002:a05:6820:1053:b0:558:a804:20d3 with SMTP id x19-20020a056820105300b00558a80420d3mr634869oot.6.1686018960534; Mon, 05 Jun 2023 19:36:00 -0700 (PDT) MIME-Version: 1.0 References: <87cz2otiw3.fsf@wibble.ilmari.org> In-Reply-To: From: Amit Kapila Date: Tue, 6 Jun 2023 08:05:49 +0530 Message-ID: Subject: Re: Implement generalized sub routine find_in_log for tap test To: Michael Paquier Cc: vignesh C , Andrew Dunstan , =?UTF-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Jun 4, 2023 at 3:51=E2=80=AFAM Michael Paquier wrote: > > On Mon, May 29, 2023 at 07:49:52AM +0530, vignesh C wrote: > > Thanks for the comment, the attached v3 version patch has the changes > > for the same. > > -if (find_in_log( > - $node, $log_offset, > - qr/peer authentication is not supported on this platform/= )) > +if ($node->log_contains( > + qr/peer authentication is not supported on this platform/= ), > + $log_offset,) > > This looks like a typo to me, the log offset is eaten. > > Except of that, I am on board with log_contains(). > > There are two things that bugged me with the refactoring related to > connect_ok and connect_fails: > - check_connect_log_contents() is a name too complicated. While > looking at that I have settled to a simpler log_check(), as we could > perfectly use that for something else than connections as long as we > want to check multiple patterns at once. > - The refactoring of the documentation for the routines of Cluster.pm > became incorrect. For example, the patch does not list anymore > log_like and log_unlike for connect_ok. > > With all that in mind I have hacked a few adjustments in a 0003, > though I agree with the separation between 0001 and 0002. > > 033_replay_tsp_drops and 019_replslot_limit are not new to v16, but > 003_peer.pl and 035_standby_logical_decoding.pl, making the number of > places where find_in_log() exists twice as much. So I would be > tempted to refactor these tests in v16. Perhaps anybody from the RMT > could comment? We've usually been quite flexible with the tests even > in beta. > Personally, I don't see any problem to do this refactoring for v16. However, sometimes, we do decide to backpatch refactoring in tests to avoid backpatch effort. I am not completely sure if that is the case here. --=20 With Regards, Amit Kapila.