From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id D3C353858030 for ; Wed, 3 Nov 2021 20:30:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3C353858030 Received: by mail-pl1-x632.google.com with SMTP id b13so3528786plg.2 for ; Wed, 03 Nov 2021 13:30:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PtaZ98f6ll/9B1cVkfD3uuHkKic/S1kXI/uLl9Vy//k=; b=eSzUdpdkav0swMIqP9lEeY1cTkz9Kk4p4b/8n/uiImAK0V0C68yag83fhTE2OfrjXU 9tK8iJ6fH36Y0fehhqy5R4yT3z/x0VeOVvmhqakAcZ/2CslLvmU9CNr72qTST05rAv4b O6FEzsS757Pr12KBTzcV6rqGtqMlTgP477JyxI23ltFF3F8fQZewOnAZwL+cCnANIEOz I0CYsz9mxanYcKjJ0U1pcvZJYwj77BCqgbIghYCeGi53g5Pjszp4+fkOm1ZAgI7aIHsR tl0vlUYkWfPdFXyHWLiE8C1TpCAQZ7UwW/t+oB/yt2Yw6TU/SFUAT2VvpY5tjp+vH7pc FUMg== X-Gm-Message-State: AOAM530cLy01RJ7h9hZQpUuKsS8qOMHQxjPy9248/8gYNHDRHyhooUgO mp79kSyMQoZxYoY+hN+X55S8BIjAI38= X-Google-Smtp-Source: ABdhPJyvQglUsWIAe+A0T+J06rR/BdJcfMN6Ntw71Ci2cEjy83CtkwJT1VnqYHBeNFg9p0shvGA3ng== X-Received: by 2002:a17:902:e885:b0:142:1500:d2ba with SMTP id w5-20020a170902e88500b001421500d2bamr9714250plg.19.1635971429874; Wed, 03 Nov 2021 13:30:29 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id j8sm3469305pfu.27.2021.11.03.13.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 13:30:29 -0700 (PDT) Date: Thu, 4 Nov 2021 05:30:27 +0900 From: Stafford Horne To: Paul Eggert Cc: GLIBC patches Subject: Re: [PATCH v2] tst-tzset: output reason when creating 4GiB file fails Message-ID: References: <20211102233159.4094554-1-shorne@gmail.com> <61531402-fbc9-fcc9-93b9-f453901bf399@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61531402-fbc9-fcc9-93b9-f453901bf399@cs.ucla.edu> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2021 20:30:32 -0000 On Wed, Nov 03, 2021 at 12:14:52PM -0700, Paul Eggert wrote: > On 11/2/21 16:31, Stafford Horne via Libc-alpha wrote: > > + { > > + printf ("creating timezone file of size: %" PRId64 "MiB failed.\n", > > + size / (1024 * 1024)); > > Why not simply print the size in bytes? Converting to MiB outputs less > information due to rounding, and is hardly worth the trouble here. Other > than that, looks fine. Hi Paul, The reason for the divide by (1024 * 1024) it to make it easier to see where the failure is at a glance. The call to test_tz_file is done two times: test_tz_file (64 * 1024 * 1024); test_tz_file (4LL * 1024 * 1024 * 1024 - 6); For me, it's a lot easier to tell the different between 2 and 4 digits (64MiB and 4096MiB) than the bigger numbers. The information lost is not too important considering the test, in my opinion. -Stafford