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 19777 invoked from network); 25 Mar 2020 23:43:28 -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; 25 Mar 2020 23:43:28 -0000 Received: (qmail 13898 invoked by alias); 25 Mar 2020 23:43:22 -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: 45620 Received: (qmail 13689 invoked by uid 1010); 25 Mar 2020 23:43:22 -0000 X-Qmail-Scanner-Diagnostics: from wout4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25758. spamassassin: 3.4.2. Clear:RC:0(64.147.123.20):SA:0(-2.6/5.0):. Processed in 0.772249 secs); 25 Mar 2020 23:43:22 -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: gggruggvucftvghtrhhoucdtuddrgedugedrudehhedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkjghfofggtgfgsehtqh dttdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfkphepjeelrddujeeirdduvdehrddvfedvne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshes uggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Wed, 25 Mar 2020 23:42:44 +0000 From: Daniel Shahaf To: Jun T Cc: zsh-workers@zsh.org Subject: Re: [PATCH] find RLIM_NLIMITS correctly on CygwinjL Message-ID: <20200325234244.63b0ba92@tarpaulin.shahaf.local2> In-Reply-To: <20200325220455.18501146@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> <20200320191846.3a4f5682@tarpaulin.shahaf.local2> <20200324024320.12bae9e9@tarpaulin.shahaf.local2> <452D3122-F904-4A39-9E2E-31F3285C8019@kba.biglobe.ne.jp> <20200325220455.18501146@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 Wed, 25 Mar 2020 22:04 +0000: > Jun T wrote on Wed, 25 Mar 2020 09:16 +0900: > > > 2020/03/24 11:43, Daniel Shahaf wrote: > > > 2020/03/21 2:02, Daniel Shahaf wrote: > > > =20 > > >> + limit | grep UNKNOWN || print OK =20 > > >=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. =20 > >=20 > > So what the fix for this? Is it enough to skip the tests if loading > > rlimits module fails (because we are testing module features, not > > module loading)? =20 >=20 > Yes, I think so. The patch in 45591 will take care of testing that > zmodload succeeds. With that patch, B12limit.ztst can just do > =C2=ABif ! zmodload =E2=80=A6; ZTST_unimplemented=3D=E2=80=A6=C2=BB like = all other V*ztst files: > zmodload errors will be caught by 45591. So, to be concrete, how about the following? =E2=80=94 workers/45591 (with conflicts fixed): [[[ diff --git a/Test/V01zmodload.ztst b/Test/V01zmodload.ztst index 0a7fbb651..daf49cd72 100644 --- a/Test/V01zmodload.ztst +++ b/Test/V01zmodload.ztst @@ -64,7 +64,7 @@ =20 for m in $mods do - zmodload $m || mods[(r)$m]=3D() + zmodload $m || return $? done 0d:Test loading of all compiled modules =20 diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst index ab67f3d80..15a0982c8 100644 --- a/Test/V07pcre.ztst +++ b/Test/V07pcre.ztst @@ -1,11 +1,10 @@ %prep =20 - if grep '^name=3Dzsh/pcre .* link=3Dno ' $ZTST_testdir/../config.modules= >/dev/null + if ! zmodload zsh/pcre 2>/dev/null; then then ZTST_unimplemented=3D"the zsh/pcre module was disabled by configure (s= ee config.modules)" return 0 fi - zmodload zsh/pcre setopt rematch_pcre # Find a UTF-8 locale. setopt multibyte ]]] Followed by 45584, adjusted for the above: [[[ diff --git a/Test/B12limit.ztst b/Test/B12limit.ztst index 922751369..48d33e6e3 100644 --- a/Test/B12limit.ztst +++ b/Test/B12limit.ztst @@ -1,4 +1,12 @@ -# check if there is unknown resouce(s) + +%prep + + if ! zmodload zsh/rlimits 2>/dev/null + then + ZTST_unimplemented=3D"the zsh/rlimits module was disabled by configure= (see config.modules)" + return 0 + fi + zmodload zsh/rlimits =20 %test ]]] Cheers, Daniel