From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id EFE576DE024A for ; Wed, 26 Oct 2016 13:38:44 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.532 X-Spam-Level: X-Spam-Status: No, score=0.532 tagged_above=-999 required=5 tests=[AWL=-0.120, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G6XXsPgV4xFi for ; Wed, 26 Oct 2016 13:38:44 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id BF8B46DE0243 for ; Wed, 26 Oct 2016 13:38:43 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 8113B100063; Wed, 26 Oct 2016 23:39:28 +0300 (EEST) From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] test/test-lib.sh: execute basename(1)s lazier in test_expect_equal_file () In-Reply-To: <87y41bvs2w.fsf@tethera.net> References: <1476045367-26825-1-git-send-email-tomi.ollila@iki.fi> <87y41bvs2w.fsf@tethera.net> User-Agent: Notmuch/0.23.1+30~g980ffa4 (https://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Oct 2016 20:38:45 -0000 On Wed, Oct 26 2016, David Bremner wrote: > Tomi Ollila writes: > >> Moved the 2 basename(1) executions to the test failure branch in >> test_expect_equal_file (). >> >> The output of basename(1) executions in function test_expect_equal_file () >> are only used when tests fails -- when all tests pass these 2 basename(1) >> executions are no longer done at all. > > I challenge you to measure the improvement; pushed to master anyway. ;) if 1 fork(2) takes 1 millisecond, then the full test suite runs 1 second faster (+ some gain from dropping 500 execve(basename) calls). So notmuch from execute time viewpoint. (I actually happen to have suitable LD_PRELOAD library which could ne used to measure execution times so I might accept the challenge ;D) but this also reduces noise a bit when debugging test suite problems with `set -x` -- for human reader that is an improvement... there would be somuch more to be improved there but oh well... ;/ Tomi > > d