From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 18614 invoked from network); 20 Mar 2020 18:29:11 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 20 Mar 2020 18:29:11 -0000 Received: (qmail 2295 invoked by alias); 20 Mar 2020 18:29:01 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45587 Received: (qmail 28341 invoked by uid 1010); 20 Mar 2020 18:29:01 -0000 X-Qmail-Scanner-Diagnostics: from out5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25751. spamassassin: 3.4.2. Clear:RC:0(66.111.4.29):SA:0(-2.6/5.0):. Processed in 4.181164 secs); 20 Mar 2020 18:29:01 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeguddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkjghfofggtgfgsehtqhdttdertdejnecuhfhrohhmpeffrghn ihgvlhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqe enucfkphepjeelrddukedvrddufedtrddufeehnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnh grmhgv X-ME-Proxy: Date: Fri, 20 Mar 2020 18:28:15 +0000 From: Daniel Shahaf To: Bart Schaefer Cc: Jun T , "zsh-workers@zsh.org" Subject: Re: [PATCH] find RLIM_NLIMITS correctly on Cygwin Message-ID: <20200320182815.47adbec3@tarpaulin.shahaf.local2> In-Reply-To: <20200320173908.3f017688@tarpaulin.shahaf.local2> References: <82F8CDE0-C95C-4D31-ABFC-EBB3C97799F3@kba.biglobe.ne.jp> <1B509B1C-A670-482F-9D88-2145E15D03A1@kba.biglobe.ne.jp> <20200109131553.hqetnd45sc43z6xb@tarpaulin.shahaf.local2> <087AE8B9-35B0-4258-9626-AACA85471A07@kba.biglobe.ne.jp> <20200111201549.GA1264@tarpaulin.shahaf.local2> <3340070A-53DD-40F0-8363-A8C7D84702D3@kba.biglobe.ne.jp> <374cecf6-45d5-4688-861f-cc52017dbcea@www.fastmail.com> <321F9465-ABF9-465D-9242-7EF9A0EDDBED@kba.biglobe.ne.jp> <20200227132229.3e290918@tarpaulin.shahaf.local2> <84E062E9-E44F-4123-AC41-12E12071924E@kba.biglobe.ne.jp> <20200228141935.0b2d9748@tarpaulin.shahaf.local2> <939538FA-A90B-44DA-AF85-C50D0F516BA0@kba.biglobe.ne.jp> <20200320170256.3f141384@tarpaulin.shahaf.local2> <20200320173908.3f017688@tarpaulin.shahaf.local2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Daniel Shahaf wrote on Fri, 20 Mar 2020 17:39 +0000: > Bart Schaefer wrote on Fri, 20 Mar 2020 10:20 -0700: > > On Fri, Mar 20, 2020 at 10:03 AM Daniel Shahaf = wrote: =20 > > > > > > The "limit" builtin is provided by a module. As such, it can be > > > unavailable if the module had been disabled in config.modules prior to > > > building. > > > > > > Proposed patch: > > > > > > + if grep '^name=3Dzsh/rlimits .* link=3Dno ' $ZTST_testdir/../confi= g.modules >/dev/null =20 > >=20 > > Wouldn't it be better to test this with "zmodload" rather than attempt > > to examine the build config? =20 >=20 > That was my first instinct too, but I just copied what V07pcre.ztst > did. If using zmodload is better, then that file should probably be > updated to that approach too. Ah, I see. I think the reason for checking config.modules is because we need to distinguish between "module had been disabled" and "module was enabled, but failed to load due to a bug". That is, we want the test suite to fail if the module failed to load even though it was enabled in config.modules. However, most Test/V*.ztst files use a simple =C2=ABif ! zmodload zsh/foo; = =E2=80=A6=C2=BB check. So, I think we should write a ZTST_* helper function that encapsulates the config.modules check, and then call it as =C2=ABZTST_load_or_skip zsh/f= oo || return $?=C2=BB to make sure that V${N}foo.ztst fails if =C2=ABzmodload zsh/foo=C2=BB unexp= ectedly failed. Makes sense? Cheers, Daniel