From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=LOTS_OF_MONEY, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 62e3ea63 for ; Sun, 12 Jan 2020 04:26:12 +0000 (UTC) Received: (qmail 25091 invoked by alias); 12 Jan 2020 04:26:06 -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: 45285 Received: (qmail 12029 invoked by uid 1010); 12 Jan 2020 04:26:06 -0000 X-Qmail-Scanner-Diagnostics: from mail-yw1-f66.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25684. spamassassin: 3.4.2. Clear:RC:0(209.85.161.66):SA:0(-1.9/5.0):. Processed in 1.917797 secs); 12 Jan 2020 04:26:06 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.161.66 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LK5wKx5oQTY04cNc9sLUPHw3LbUGZO9s2qxPjzjzrrA=; b=NZaV0Zt+3OuUMWxBhr/QtL3qADXr57XEluZYckPO3h9cIkGFlNcR7U6nwR3cnchaAF wMpTprWlszz9MvCLdxXPEtxtukdlmOY+GC5sq+lSS0bW2Bn9StntPlpMKycrgyDb6PMQ Kmqkh/ofVXNhTdYBHMnDSV014wW3IPuoqMq3NOfh9op28whc+7/CopeAfoVXrKkQwvB+ UZLuIH40LdIByjnuWu2+sddTXkt8h+vdOES3EEjHZXSPtZ+GvptIdQ/GYu5wYCK70cIV WB3PQDJTITg2tNTdR0sMEq+Naeepk/fwXxphcQDQsvnvRrx3up0qDQYNJ2WsdOVLRXgG oeLg== X-Gm-Message-State: APjAAAXWbljDqpqk7M4aJd4VKSd8VXw2N5SccDXMT0Q8Q85UlvkAJsrh oENBztNvdQXL9kzIiEIKOJJ9X1KtTDj6Gg== X-Google-Smtp-Source: APXvYqystHnl87gxqOnoLXlETIF+PTZbpwpNqJzEzFh0VevCI7zqCpasdzRc/yLOUsJ7kEw1wFAscA== X-Received: by 2002:a0d:df83:: with SMTP id i125mr8960813ywe.125.1578803131511; Sat, 11 Jan 2020 20:25:31 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH] Enable sub-second timeout in zsystem flock From: dana In-Reply-To: Date: Sat, 11 Jan 2020 22:25:29 -0600 Cc: "zsh-workers@zsh.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190729203521.upp5ku3bsr3hsnxq@phare.normalesup.org> <20200104184734.ienw42rwq2xu6aap@phare.normalesup.org> <43775C64-0254-45AB-81AB-B04AE80C4416@dana.is> <20200106173030.eb2pg4rhhgysh35r@phare.normalesup.org> <20200111154143.fjtwgfnztqfmkyda@phare.normalesup.org> To: Cedric Ware X-Mailer: Apple Mail (2.3445.104.11) On 11 Jan 2020, at 13:36, dana wrote: > I should have time this week end actually, will get back to you Here's a basic, almost-does-nothing test script for it. Obv need to = change the expected error messages in the second test to whatever you decide on. = You can run it with `make check TESTNUM=3DV13` dana diff --git a/Test/V13system.ztst b/Test/V13system.ztst new file mode 100644 index 000000000..e3faca37d --- /dev/null +++ b/Test/V13system.ztst @@ -0,0 +1,30 @@ +# Test zsh/system module + +%prep + + if zmodload -s zsh/system; then + tst_dir=3DV13.tmp + mkdir -p -- $tst_dir + else + ZTST_unimplemented=3D'the zsh/system module is not available' + fi + +%test + + ( + : > $tst_dir/file + zsystem flock -t 0.1 -i 0.1 $tst_dir/file + ) +0:zsystem flock valid time arguments + + ( + zsystem flock -t -1 $tst_dir/file || + zsystem flock -t 9999999999999999999 $tst_dir/file || + zsystem flock -i -1 $tst_dir/file || + zsystem flock -i 9999999999999999999 $tst_dir/file + ) +1:zsystem flock invalid time arguments +?(eval):zsystem:2: flock: invalid timeout +?(eval):zsystem:3: flock: invalid timeout +?(eval):zsystem:4: flock: invalid interval +?(eval):zsystem:5: flock: invalid interval