Re: [PATCH] test: make test_expect_equal_file() arguments flexible
authorJameson Graef Rollins <jrollins@finestructure.net>
Wed, 1 Feb 2012 17:24:32 +0000 (09:24 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:54 +0000 (09:43 -0800)
bd/310ed43ee5116f296d0d9b1fb2565e7a321a85 [new file with mode: 0644]

diff --git a/bd/310ed43ee5116f296d0d9b1fb2565e7a321a85 b/bd/310ed43ee5116f296d0d9b1fb2565e7a321a85
new file mode 100644 (file)
index 0000000..cead4f7
--- /dev/null
@@ -0,0 +1,125 @@
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BCCE1421192\r
+       for <notmuch@notmuchmail.org>; Wed,  1 Feb 2012 09:24:46 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.29\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id o5OOtEwJL9Yf for <notmuch@notmuchmail.org>;\r
+       Wed,  1 Feb 2012 09:24:46 -0800 (PST)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id 09A6E429E5B\r
+       for <notmuch@notmuchmail.org>; Wed,  1 Feb 2012 09:24:46 -0800 (PST)\r
+Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by earth-doxen-postvirus (Postfix) with ESMTP id EAFD266E0030;\r
+       Wed,  1 Feb 2012 09:24:43 -0800 (PST)\r
+X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
+Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com\r
+       [76.174.137.84]) (Authenticated sender: jrollins)\r
+       by earth-doxen-submit (Postfix) with ESMTP id 1580B66E01A1;\r
+       Wed,  1 Feb 2012 09:24:37 -0800 (PST)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id DEFCC291; Wed,  1 Feb 2012 09:24:35 -0800 (PST)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>,\r
+       Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] test: make test_expect_equal_file() arguments flexible\r
+In-Reply-To: <87k446n8ji.fsf@gmail.com>\r
+References: <1328080794-24670-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <87r4yfszx9.fsf@servo.finestructure.net>\r
+       <87pqdync64.fsf@gmail.com> <m262fqc0wv.fsf@guru.guru-group.fi>\r
+       <87k446n8ji.fsf@gmail.com>\r
+User-Agent: Notmuch/0.11+128~g6f388fa (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 01 Feb 2012 09:24:32 -0800\r
+Message-ID: <87ehuetqjz.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha256; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 01 Feb 2012 17:24:46 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Wed, 01 Feb 2012 14:37:53 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=\r
+l.com> wrote:\r
+> On Wed, 01 Feb 2012 12:18:08 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrot=\r
+e:\r
+> >=20\r
+> > There are at least these options here\r
+> >=20\r
+> > 1) go through all ~100 places where test_expect_equal_file is used\r
+> >    and fix the call order: quick look tells that the offending uses\r
+> >    are in dump-restore, hooks, search-limiting and symbol-hiding.\r
+> >=20\r
+> > 2) enforce "expected" filename has some format *and* fix all current\r
+> >    uses of it. Add testbed_error () function which yells loudly ane exi=\r
+ts...\r
+> >=20\r
+> > 3) guess which is output and which is expected from args so that=20\r
+> >    machine helps tester here (for both diff output & copied files)a\r
+> >=20\r
+> > 4) just copy compared files to some directory, those are named as\r
+> >    basename of the original -- diff order still inconsistent.\r
+> >=20\r
+> >=20\r
+> > I'd just go with option 1 and fix new *violations* when stumble upon on=\r
+e.\r
+> >=20\r
+>=20\r
+> Option 1 does not solve the problem.  New violations would apper and\r
+> need to be fixed again.  I am for option 2.\r
+\r
+How is enforcing use of a particular filename better and more robust\r
+than enforcing argument order?  You'll still have to force an arbitrary\r
+heuristic.  And you'll still be vulnerable to people messing up the file\r
+names (which actually seems easier to get wrong than messing up the\r
+order).  And you'll have to have more code to parse the argument\r
+strings.  And you'll still get inconsistent diffs.\r
+\r
+If this is really a problem, I vote for 1.  In general, I am not in\r
+favor of making the test suite more complicated than it needs to be.\r
+\r
+jamie.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJPKXVQAAoJEO00zqvie6q8/L0P/3zAXYtLqisL3wl5Zk2urhcH\r
+6kQI2EFKcdPqRO1aKPvjT7dlnkXHeztxovwAYNAl2fj7TRbnnIzsGmm1H49fDi1b\r
+Sqa/aHwm9d8GFiHP981YV9cgLfyvHQdRjr7OXBangZTKzIoIs7s/uV9OAHXAGmN3\r
+SbX4f5el9MVYMQXxbVs4B6yGP4qMi1LsIyFxoI3crrYqJIykbedOMfglFPzbb3vD\r
+0ivtMphws9mutnDyXJNCF+HzRPDjnI7ac3/u2KqJ67++WOOJ76hfHRa0f4tcrGC8\r
+XNakXDDiUhirvBn7+0usG+iwoEd8SwC1IsbTPrNywAE/WjCi78sjmRHHpBHr+qAE\r
+T7tDudL3tctuI4c3MW95GbbVWSLGsOvWcXR64O12gEyhFs5P9wnNMbx6KhdG8WxM\r
+vbwIixdSCU1CJUAKOFs9MVbBRbtddrvSwWlL9JEwig+/41mH5HiuvIngddKyOYkP\r
+84NLTzY9cG9FJzrVs5ud++N3D5bjhPcZbeUQ/ZD0mjsq1AKtzY/fZqVytZywthCH\r
+gVobPgz50mCNnkKrod9oMmHrqkVXBpTrguvRuO4P4Cek6aILxk92O7uxtZd3wQB6\r
+BQFTOh8+331zIkoXuDkzSArMfrb8+IVKDdy1WB7zWiq9qFUOYXjzV/WNQqKGU8Rz\r
+QttiXiBdZIDBkfbQb6Vw\r
+=xYxA\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r