Return-Path: Delivered-To: apmail-lucene-lucy-dev-archive@minotaur.apache.org Received: (qmail 41319 invoked from network); 18 Jan 2010 23:43:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jan 2010 23:43:18 -0000 Received: (qmail 84627 invoked by uid 500); 18 Jan 2010 23:43:18 -0000 Delivered-To: apmail-lucene-lucy-dev-archive@lucene.apache.org Received: (qmail 84572 invoked by uid 500); 18 Jan 2010 23:43:18 -0000 Mailing-List: contact lucy-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-dev@lucene.apache.org Delivered-To: mailing list lucy-dev@lucene.apache.org Received: (qmail 84562 invoked by uid 99); 18 Jan 2010 23:43:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jan 2010 23:43:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [68.116.39.62] (HELO rectangular.com) (68.116.39.62) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jan 2010 23:43:10 +0000 Received: from marvin by rectangular.com with local (Exim 4.63) (envelope-from ) id 1NX1F8-0002eH-92; Mon, 18 Jan 2010 15:42:46 -0800 Date: Mon, 18 Jan 2010 15:42:46 -0800 To: lucy-dev@lucene.apache.org Cc: "KinoSearch discussion list." Subject: Re: 64-bit linux errors with t/core/032-string_helper.t Message-ID: <20100118234246.GA10083@rectangular.com> References: <4B54BA4F.9010803@peknet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B54BA4F.9010803@peknet.com> User-Agent: Mutt/1.5.13 (2006-08-11) From: Marvin Humphrey X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Jan 18, 2010 at 01:45:19PM -0600, Peter Karman wrote: > On 64-bit Centos 5 Linux with Perl 5.8.9 I get several failures for > t/core/032-string_helper.t. > > The issue seems to be related to the u8_t size of the i and max vars. It's > as if they are being evaluated as signed rather than unsigned. However, > even if I hardcode 'unsigned char' instead of the Charmonized 'u8_t' I > still get the same error (below). > > Changing to an int fixes it. But it doesn't make any sense to me why an > unsigned char wouldn't work. I'll bet that what's actually going wrong is the promotion of the arguments from "unsigned char" to "long" as they are being passed to ASSERT_INT_EQ. To verify, try changing one of the tests from... ASSERT_INT_EQ(batch, StrHelp_UTF8_SKIP[i], 1, "UTF8_SKIP ascii %d", (int)i); ...to: ASSERT_TRUE(batch, StrHelp_UTF8_SKIP[i] == 1, "UTF8_SKIP ascii %d", (int)i); If that's indeed the problem, I'd prefer not to fix it that way, as it will cut down on the usefulness of verbose test output and make smoke test reports harder to analyze. Instead, we should add the following: TEST_I8_EQUALS TEST_U8_EQUALS TEST_I16_EQUALS TEST_U16_EQUALS TEST_I32_EQUALS TEST_U32_EQUALS TEST_I64_EQUALS TEST_U64_EQUALS That's easier now that we're no longer using Charmonizer's test suite. The choice of "TEST_*" rather than "ASSERT_*" is driven by the fact that unlike typical xUnit tests, these return false on failure rather than throw exceptions. Marvin Humphrey