From patchwork Tue Dec 5 14:14:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 24738 Received: (qmail 124563 invoked by alias); 5 Dec 2017 14:14:42 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 124492 invoked by uid 89); 5 Dec 2017 14:14:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Date: Tue, 05 Dec 2017 15:14:38 +0100 To: libc-alpha@sourceware.org Subject: [PATCH COMMITTED] support/tst-test_compare: Fix 32-bit/64-bit expected output mismatch User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20171205141438.6ADA64010EDED@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) The use of a long type resulted in test output differences between 32-bit and 64-bit architectures, causing the test to fail on 32-bit architectures. 2017-12-05 Florian Weimer * support/tst-test_compare.c (subprocess): Use long long instead of long argument for consistent type width across 32-bit and 64-bit architectures. (do_test): Adjust expected output. diff --git a/support/tst-test_compare.c b/support/tst-test_compare.c index e4dcfd462a..de138d4f8a 100644 --- a/support/tst-test_compare.c +++ b/support/tst-test_compare.c @@ -27,7 +27,7 @@ subprocess (void *closure) /* These tests should fail. */ TEST_COMPARE (ch, -1); /* Line 28. */ TEST_COMPARE (2LL, -2LL); /* Line 29. */ - TEST_COMPARE (3L, (short) -3); /* Line 30. */ + TEST_COMPARE (3LL, (short) -3); /* Line 30. */ } struct bitfield @@ -86,7 +86,7 @@ do_test (void) " right: -2 (0xfffffffffffffffe); from: -2LL\n" "tst-test_compare.c:30: numeric comparison failure" " (widths 64 and 32)\n" - " left: 3 (0x3); from: 3L\n" + " left: 3 (0x3); from: 3LL\n" " right: -3 (0xfffffffd); from: (short) -3\n") == 0); /* Check that there is no output on standard error. */