--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 066896DE13AF\r
+ for <notmuch@notmuchmail.org>; Tue, 5 Jan 2016 12:58:30 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.669\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.669 tagged_above=-999 required=5 tests=[AWL=0.017, \r
+ SPF_NEUTRAL=0.652] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id oKf1xbKqNWtc for <notmuch@notmuchmail.org>;\r
+ Tue, 5 Jan 2016 12:58:27 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id CA5166DE138F\r
+ for <notmuch@notmuchmail.org>; Tue, 5 Jan 2016 12:58:26 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 282CE1000CD;\r
+ Tue, 5 Jan 2016 22:58:44 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: J Farkas <jf.hyqohaczlksw4tx6ae@l2015aftruuq.dns007.net>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: T070 tests portability\r
+In-Reply-To: <1451991305.14.acc64b88@201601.l2015aftruuq.dns007.net>\r
+References: <1451991305.14.acc64b88@201601.l2015aftruuq.dns007.net>\r
+User-Agent: Notmuch/0.21+32~g73439f8 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Tue, 05 Jan 2016 22:58:43 +0200\r
+Message-ID: <m2io37agl8.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 05 Jan 2016 20:58:30 -0000\r
+\r
+On Tue, Jan 05 2016, J Farkas <jf.hyqohaczlksw4tx6ae@l2015aftruuq.dns007.net> wrote:\r
+\r
+> I'm in the process of writing insert tests, but it looks like my\r
+> environment is somewhat older than what the current tests are running\r
+> on. The following two trivial changes for the original tests make those\r
+> pass cleanly:\r
+>\r
+> The wc I have from GNU textutils 2.0.22 seems to produce extra\r
+> whitespace that needs to be cleaned:\r
+>\r
+> diff --git a/test/T070-insert.sh b/test/T070-insert.sh\r
+> index e7ec6a6..5864b9b 100755\r
+> --- a/test/T070-insert.sh\r
+> +++ b/test/T070-insert.sh\r
+> @@ -62,3 +62,3 @@ test_begin_subtest "Insert duplicate message"\r
+> notmuch insert +duptag -unread < "$gen_msg_filename"\r
+> -output=$(notmuch search --output=files "subject:insert-subject" | wc -l)\r
+> +output=$(notmuch search --output=files "subject:insert-subject" | echo $(wc -l))\r
+\r
+For this we have found solution earlier, unfortunately this did not get it:\r
+\r
+ output=$((`notmuch search --output=files "subject:insert-subject" | wc -l`))\r
+\r
+$ fgrep '$((`' test/*.sh\r
+test/T060-count.sh: "$((`notmuch search --output=messages '*' | wc -l`))" \\r
+test/T060-count.sh: "$((`notmuch search --output=messages '*' | wc-l`))" \\r
+test/T060-count.sh: "$((`notmuch search --output=threads '*' | wc -l`))" \\r
+test/T060-count.sh: "$((`notmuch search '*' | wc -l`))" \\r
+test/T060-count.sh: "$((`notmuch search --output=files '*' | wc -l`))" \\r
+\r
+i.e. arithmetic evaluation with just the number removes surrounding whitespace.\r
+\r
+> test_expect_equal "$output" 2\r
+>\r
+> And without the following cast, gdb 7.4 complains about the return type.\r
+>\r
+> index-file-XAPIAN_EXCEPTION.gdb:7: Error in sourced command file:\r
+> Return value type not available for selected stack frame.\r
+> Please use an explicit cast of the value to return.\r
+>\r
+> diff --git a/test/T070-insert.sh b/test/T070-insert.sh\r
+> index e7ec6a6..5864b9b 100755\r
+> --- a/test/T070-insert.sh\r
+> +++ b/test/T070-insert.sh\r
+> @@ -196,3 +196,3 @@ break notmuch_database_add_message\r
+> commands\r
+> -return NOTMUCH_STATUS_$code\r
+> +return (int)NOTMUCH_STATUS_$code\r
+> continue\r
+\r
+The page https://sourceware.org/gdb/onlinedocs/gdb/Returning.html\r
+talks something about gdb not knowing the return type if function\r
+was compiled without debug info... well, is this is the reason,\r
+perhaps we should allow testing w/o debug info compiled in.\r
+\r
+> Does any of the above look reasonable to reduce the false positives?\r
+> With the above, the T070 tests all pass on my system.\r
+\r
+1st is to be changed to be consistent w/ other code, second may be good.\r
+\r
+\r
+> Janos\r
+\r
+\r
+Tomi\r