From patchwork Fri Apr 4 10:45:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 109842 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 96A523839C5F for ; Fri, 4 Apr 2025 10:46:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96A523839C5F Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Hx1IrLth X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id E5A733839C5F for ; Fri, 4 Apr 2025 10:45:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E5A733839C5F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E5A733839C5F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743763527; cv=none; b=GEIjtXxZxyt/z1emjfhxqZYWuRQiKjoNzKdqVTUMG5egFIUwppYn2YJvLD3E5iYTF6ey70zHIdEj1ISkcRGRhumi7rI6KfGtqf4+hEPfUUOpNd52EWiRtjTV5iScis17Ag1L1StkLhwOOrmoqFITAbJutR0WaxSiJrT1TpKOCOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743763527; c=relaxed/simple; bh=mxFSRffIilcoSriZAHUq1wkdUgzOgJ1azJcO2U544Qs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=vvR8s3+HLQTq0U+5nl+uCV1L3zA6IfHDMxjyUj1y6HnIALR11ZWXjGiG9TCu+D/uF6ZLoeP5ztKUFgIMIFVsbBRidOfIXiBQ4CTQeLGGcZhNV5PkeDkpO0nKpmO5VYkcD3Orh9LIx3+qLvSbhIaECweezCcYXlLQzXL3EmBSvzc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E5A733839C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743763526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=Le6ZZRrpo17PIk5imuv4QHbL/0g0WcxtMa2GX7ZtyF8=; b=Hx1IrLthkoLfQU2LA/PsNg3qFLbPdgYU1P+BQvANOpA0FrjIt9WkTKrxzEISw/RhvY1Gwx BcX/CcJjl22GUoaJxO+OKPJeiv3SEfGl0XA3VuzQE/qsg12nMYKCRjFL5i1ozVz6hYn/ao P43e54GIhKGqNVmD3B5SteM3lEcB52E= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-639-RoRiI8FqOL6TnzliUoK1uQ-1; Fri, 04 Apr 2025 06:45:25 -0400 X-MC-Unique: RoRiI8FqOL6TnzliUoK1uQ-1 X-Mimecast-MFC-AGG-ID: RoRiI8FqOL6TnzliUoK1uQ_1743763524 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BE3F2180AF71 for ; Fri, 4 Apr 2025 10:45:24 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.44.32.157]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C073F1955BC2 for ; Fri, 4 Apr 2025 10:45:23 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH v2] timezone: Enhance tst-bz28707 diagnostics Date: Fri, 04 Apr 2025 12:45:20 +0200 Message-ID: <87tt74dx33.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: GdpnU_wIPtbYHhiuK57_0EBZwSAN9qdLL2hphDZgI2Q_1743763524 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org This hopefully provides additional information about why the test failed, in case the fix in commit 62db87ab24f9ca483f97f ("timezone: Fix tst-bz28707 Makefile rule") turns out to be insufficient. Reviewed-by: Adhemerval Zanella --- v2: Fix subject/commit message (sorry). timezone/tst-bz28707.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) base-commit: 95b780c1d0549678c0a244c6e2112ec97edf0839 diff --git a/timezone/tst-bz28707.c b/timezone/tst-bz28707.c index a5723f4b8a..bb81ad1bd6 100644 --- a/timezone/tst-bz28707.c +++ b/timezone/tst-bz28707.c @@ -15,10 +15,11 @@ License along with the GNU C Library; if not, see . */ -#include +#include #include #include -#include +#include +#include /* Test that we can use a truncated timezone-file, where the time-type at index 0 is not indexed by the transition-types array (and the @@ -28,19 +29,21 @@ static int do_test (void) { - if (setenv ("TZ", "XT5", 1)) - { - puts ("setenv failed."); - return 1; - } + if (setenv ("TZ", "XT5", 1) != 0) + FAIL_EXIT1 ("setenv: %m"); + errno = 0; tzset (); + if (errno != 0) + printf ("warning: tzset set errno to %d (%m)", errno); - return - /* Sanity-check that we got the right abbreviation for DST. For - normal time, we're likely to get "-00" (the "unspecified" marker), - even though the POSIX timezone string says "-04". Let's not test - that. */ - !(strcmp (tzname[1], "-03") == 0); + /* Sanity-check that we got the right abbreviation for DST. For + normal time, we're likely to get "-00" (the "unspecified" marker), + even though the POSIX timezone string says "-04". Let's not test + that. */ + TEST_COMPARE_STRING (tzname[1], "-03"); + + return 0; } + #include