From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 00E6B385781C for ; Mon, 7 Jun 2021 13:19:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 00E6B385781C Received: by mail-pj1-x1033.google.com with SMTP id k5so9839017pjj.1 for ; Mon, 07 Jun 2021 06:19:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/SXbAqtVl+958NqTx2Ldk5NIsqFog/gOL6dkNBQhzvs=; b=ZkWioW/VRGe1ImIU/rA7xmfROaUKPkUBxyJjQfwXVf/5EncDmhU/i5XraZE2DiFe5G S+jC7Vzp0rm5RLS0d5KybJdoyeekA7zvjhM58UH2Hs3g7a2U4HMdhl4LqYTHylPVWnFc mQn5bYRr6iPrzhtImghWgJ45gXEduEbzOSvlYZN9+fKL2bAz4Y8gpLl+JLoDAsJFJ7+u BHHf/1yVdn5JY7sTciIkYPYx3PKnAFG+HXMBPhIF0+shAer353GPwY7BtVt/BBwyz3FK QjYnkZbIn2bKzTQkT7Rri2AmiBQpRmX5lHt27xzL47msojo+jiX9EthVbpbBa2s34CpK Dbyg== X-Gm-Message-State: AOAM532pJtSKvTRkuThf02pu+6eNcBT9KbYvHGV9xxrYKsxFKZ4t2h1S T2OmgaT+up153lda/IqtB69JXsBLWrc= X-Google-Smtp-Source: ABdhPJz0jR6MbcwV9YwOI/Ordafmv2x2WjZVggrCP1iDyO2ziMBY7bvZnCWytzyUGYfCZfV4FTgQzw== X-Received: by 2002:a17:902:788f:b029:113:fb0:c9e3 with SMTP id q15-20020a170902788fb02901130fb0c9e3mr3115404pll.63.1623071942646; Mon, 07 Jun 2021 06:19:02 -0700 (PDT) Received: from localhost (g176.222-224-212.ppp.wakwak.ne.jp. [222.224.212.176]) by smtp.gmail.com with ESMTPSA id k6sm1808408pfa.215.2021.06.07.06.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 06:19:01 -0700 (PDT) From: Stafford Horne To: GLIBC patches Cc: Stafford Horne , Adhemerval Zanella , Alistair Francis Subject: [PATCH] time: Skip overflow itimer tests on 32-bit systems Date: Mon, 7 Jun 2021 22:18:51 +0900 Message-Id: <20210607131851.4015661-1-shorne@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 07 Jun 2021 13:19:14 -0000 On the port of OpenRISC I am working on and it appears the rv32 port we have sets __TIMESIZE == 64 && __WORDSIZE == 32. This causes the size of time_t to be 8 bytes, but the tv_sec in the kernel is still 32-bit causing truncation. The truncations are unavoidable on these systems so skip the testing/failures by guarding with __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64. --- I am open to other suggestions, this seemed the most correct to me. Cc: Adhemerval Zanella Cc: Alistair Francis time/tst-itimer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/time/tst-itimer.c b/time/tst-itimer.c index 929c2b74c7..0c99d46d7e 100644 --- a/time/tst-itimer.c +++ b/time/tst-itimer.c @@ -89,6 +89,7 @@ do_test (void) TEST_COMPARE (it.it_interval.tv_sec, it_old.it_interval.tv_sec); TEST_COMPARE (it.it_interval.tv_usec, it_old.it_interval.tv_usec); +#if __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 if (sizeof (time_t) == 4) continue; @@ -146,6 +147,7 @@ do_test (void) TEST_COMPARE (setitimer (timers[i], &it, NULL), -1); TEST_COMPARE (errno, EOVERFLOW); } +#endif } { -- 2.31.1