From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D5AB01F572; Thu, 25 Jul 2024 00:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1721867904; bh=jUpqsNhMtO+aqnnVkZGofT2C/7UL2fXkAbDv/+C72m0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iHab66s/aLdn6bMlwPwbfKhHsOzibT8Skzfyo4kdIBUg7wmtZSWxDUR0wn7+WCrMM jl1dAnl86YULs2fd5HC8WcR47SNXdvmBNZa3bZrI6KT2e07/sWhqE9LO0W/lHGaKv0 UgNHXwMy/qgTX6rFBNbJ68W791v94CHWpEA+IAFA= Date: Thu, 25 Jul 2024 00:38:24 +0000 From: Eric Wong To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= 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 Message-ID: <20240725003824.M657642@dcvr> References: <20240723212837.3931413-1-e@80x24.org> <20240723212837.3931413-1-e@80x24.org> <20240723212837.3931413-3-e@80x24.org> <20240724092229+0200.264800-stepnem@smrk.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240724092229+0200.264800-stepnem@smrk.net> List-Id: Štěpán Němec 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.