unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: "Štěpán Němec" <stepnem@smrk.net>
Cc: meta@public-inbox.org
Subject: Re: [PATCH 2/4] msgmap: mid_insert: reraise on unexpected errors, [PATCH 3/4] t/v2writable: test ENOSPC from fast-import
Date: Thu, 25 Jul 2024 00:38:24 +0000	[thread overview]
Message-ID: <20240725003824.M657642@dcvr> (raw)
In-Reply-To: <20240724092229+0200.264800-stepnem@smrk.net>

Štěpán Němec <stepnem@smrk.net> wrote:
> Just a few nits in the new test messages, if I may:
> 
> [2/4]:
> > +	like $@, qr/ disk is full/, 'set $@ for ENOSPC';
>                                      ^^^^^^^^^^^^^^^^^
> 
> [3/4]:
> > +	$rd->poll_in(10) or die 'strace not ready';
> > +	ok !eval { $im->done }, 'done fails with ENOSPC';
> > +	ok $@, '$@ set on ENOSPC';
>                 ^^^^^^^^^^^^^^^^
> If I'm correct in assuming that no semantic nuance is
> intended between the 'set $@ for ENOSPC' and '$@ set on
> ENOSPC' variants, I suggest unifying on the latter (the
> unequivocal passive reads clearer than the
> imperative-looking 'set $@').

The former ensures $@ matches qr/ disk is full/,
while the latter merely ensures $@ is set to a true value.

Arguably, the former could be '$@ reports ENOSPC'  *shrug*

> > +	$im->add($eml) or xbail '->add fail after fixing ENOSPC';
> 
> s/fail/fails/ ?
> 
> > +	$im->done;
> > +	ok !$im->add($eml), '->add detects existing message';
> > +	$im->done;
> > +	is -s $fh, 0, 'nothing new fast-import stderr';
> 
> s/new/new on/ ?

Will fix for v2.  Thanks.

  reply	other threads:[~2024-07-25  0:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 21:28 [PATCH 0/4] fix ENOSPC on writes Eric Wong
2024-07-23 21:28 ` [PATCH 1/4] t/msgmap: updates for Perl 5.12+ and copyrights Eric Wong
2024-07-23 21:28 ` [PATCH 2/4] msgmap: mid_insert: reraise on unexpected errors Eric Wong
2024-07-24  7:22   ` [PATCH 2/4] msgmap: mid_insert: reraise on unexpected errors, [PATCH 3/4] t/v2writable: test ENOSPC from fast-import Štěpán Němec
2024-07-25  0:38     ` Eric Wong [this message]
2024-07-25  6:42       ` Štěpán Němec
2024-07-23 21:28 ` Eric Wong
2024-07-23 21:28 ` [PATCH 4/4] t/v2writable: use 5.10.1 and autodie more Eric Wong
2024-07-26 21:31 ` [PATCH v2 0/4] fix ENOSPC on writes Eric Wong
2024-07-26 21:31   ` [PATCH v2 1/4] t/msgmap: updates for Perl 5.12+ and copyrights Eric Wong
2024-07-26 21:31   ` [PATCH v2 2/4] msgmap: mid_insert: reraise on unexpected errors Eric Wong
2024-07-26 21:31   ` [PATCH v2 3/4] t/v2writable: test ENOSPC from fast-import Eric Wong
2024-07-26 21:31   ` [PATCH v2 4/4] t/v2writable: use 5.10.1 and autodie more Eric Wong

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240725003824.M657642@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    --cc=stepnem@smrk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).