--- /dev/null
+Return-Path: <amdragon@mit.edu>\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 2316E431E62\r
+ for <notmuch@notmuchmail.org>; Thu, 13 Jun 2013 13:19:50 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 N+n5hNPBxFlC for <notmuch@notmuchmail.org>;\r
+ Thu, 13 Jun 2013 13:19:42 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu\r
+ [18.7.68.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 94BC1431FC2\r
+ for <notmuch@notmuchmail.org>; Thu, 13 Jun 2013 13:19:42 -0700 (PDT)\r
+X-AuditID: 12074422-b7f746d000001b30-08-51ba295d08fc\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id CA.8D.06960.D592AB15; Thu, 13 Jun 2013 16:19:41 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r5DKJeSR014226; \r
+ Thu, 13 Jun 2013 16:19:41 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+ (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r5DKJcxv029959\r
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+ Thu, 13 Jun 2013 16:19:39 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1UnDzc-0008Jr-Ro; Thu, 13 Jun 2013 16:19:37 -0400\r
+Date: Thu, 13 Jun 2013 16:19:35 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>\r
+Subject: Re: [PATCH 1/1] test/basic: replaced find -perm +111 with portable\r
+ alternative\r
+Message-ID: <20130613201935.GI22196@mit.edu>\r
+References: <1370641049-17390-1-git-send-email-tomi.ollila@iki.fi>\r
+ <20130610155940.GE22196@mit.edu>\r
+ <m2r4g56be2.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <m2r4g56be2.fsf@guru.guru-group.fi>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprCKsWRmVeSWpSXmKPExsUixG6nrhunuSvQ4KaKxfWbM5kt3qycx+rA\r
+ 5HH460IWj2erbjEHMEVx2aSk5mSWpRbp2yVwZZz9/oGp4IVgxeQzvA2MTXxdjJwcEgImEjv3\r
+ PGaBsMUkLtxbz9bFyMUhJLCPUeL2gw2sEM5GRonnFz4yQjinmSQ6t75jh3CWMEr0333NDNLP\r
+ IqAqsX/pUzCbTUBDYtv+5YwgtoiAisSDtvWsIDazgLTEt9/NTCC2sECkRMOEB2C7eQV0JFoW\r
+ 3ITa3c0ocWH3O1aIhKDEyZlPWCCatSRu/HsJ1MwBNmj5Pw4Qk1PAQOLpXUmQClGgVVNObmOb\r
+ wCg0C0nzLCTNsxCaFzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI11cvNLNFLTSndxAgOahel\r
+ HYw/DyodYhTgYFTi4U24sDNQiDWxrLgy9xCjJAeTkihvusquQCG+pPyUyozE4oz4otKc1OJD\r
+ jBIczEoivOF/gcp5UxIrq1KL8mFS0hwsSuK8YreAUgLpiSWp2ampBalFMFkZDg4lCd4CDaCh\r
+ gkWp6akVaZk5JQhpJg5OkOE8QMNngtTwFhck5hZnpkPkTzEac0w+u+U9I8fN91vfMwqx5OXn\r
+ pUqJ8zaClAqAlGaU5sFNgyWmV4ziQM8J884CqeIBJjW4ea+AVjEBrSrK2A6yqiQRISXVwDiJ\r
+ 622RO9fCHfXdNy4c5nzl17HZepPK0gDFBVnrHQr5yh862Uz7+Emlk/WmJuv+6CU+J1q2BZyQ\r
+ W5TRsk7KZ6+I/N09MTe1fhR+vv/41kndvqLmhTN7haaqJrpOO7rAi+ePm+zvrpiSnjfMSv+f\r
+ K6bmNb8LTTjCIWWw8r/kBb+qKMlIw74uYSWW4oxEQy3mouJEAP5cjyAnAwAA\r
+Cc: notmuch@notmuchmail.org\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: Thu, 13 Jun 2013 20:19:50 -0000\r
+\r
+Quoth Tomi Ollila on Jun 13 at 10:47 pm:\r
+> On Mon, Jun 10 2013, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> \r
+> > LGTM. Though, I wonder, why not *just* -perm -100? That isn't quite\r
+> > a correct test of whether the user can execute it: e.g., if the file\r
+> > is owned by some other user and a group the current user isn't in,\r
+> > then -perm -1 is the correct test, though unless the file has some\r
+> > unusual permissions, -perm -100 is likely to pass anyway. But the\r
+> > test you have (and the test that was there before) isn't quite correct\r
+> > either: if the file is owned by the current user and has some crazy\r
+> > permission like 0611, the user won't be able to execute it, even\r
+> > though someone else could.\r
+> \r
+> While giving considerable amount of thought for such an insignificant\r
+> issue I came to realize this:\r
+> \r
+> The purpose of the '-perm ...' part in that expression is not to check\r
+> whether the file is executable by the user but just to reduce the set\r
+> of files the whole expression returns without need to "blacklist" more\r
+> files that are already blacklisted with '! -name ...' subexpressions\r
+> ("Makefile", ".gitignore" and so on).\r
+> \r
+> With +111, /ppp and their portable alternative\r
+> ( -perm -100 -or -perm -10 -or -perm 1 ) the implicit reduction this\r
+> part does is smaller than with -100.\r
+> \r
+> The returned list is then compared with ${TESTS} and if there is no\r
+> exact match then this particular test fails.\r
+> \r
+> Whatever this test result is, the execution of any file in ${TESTS}\r
+> will fail with "permission denied" if it is not executable by\r
+> the user running the tests.\r
+> \r
+> I think that as we're doing this "shortcut" instead of full file\r
+> blacklisting, this should reduce the output less rather than\r
+> more and therefore use the version provided in this patch\r
+> instead of changing +111 to -100.\r
+> \r
+> (In the future I'd like to see that we had some convention to name\r
+> the test scripts and either do comparison to that list or that\r
+> convention also dictates order and this test could be removed. There\r
+> are a few alternatives that we could think of...).\r
+\r
+Okay.\r
+\r
+(I completely agree that the right solution here is switching to a\r
+naming convention and eliminating the hand-made list of tests.)\r