From patchwork Tue Apr 4 13:57:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Simmons-Talbott X-Patchwork-Id: 1764979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=mVUjc2UA; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrTr01dCCz1yZQ for ; Tue, 4 Apr 2023 23:58:24 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1944B385843A for ; Tue, 4 Apr 2023 13:58:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1944B385843A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680616702; bh=KnmbrQNAO6vogkcavugLBxSWNLzJVGcFrl2ceDOXedw=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=mVUjc2UAAfVZbtL5vxepvje7TTa/7ymkv3HuSwU6qVvu2geYPiHi+dLF1hrNtYhZI fEqDQQz1supynnBZm5P0ekPI1ogSoWONrlfJzRweqTlSP/fQBingjn2kIyBxSpVWJs iyjPOmwRSGf+La68T3ea1e2vAQjtq2LjebZPCdoc= 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 ESMTPS id 62AB53858C54 for ; Tue, 4 Apr 2023 13:58:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 62AB53858C54 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-331-amsPM0ntMqiEXlK7zHLLTQ-1; Tue, 04 Apr 2023 09:58:03 -0400 X-MC-Unique: amsPM0ntMqiEXlK7zHLLTQ-1 Received: by mail-qt1-f199.google.com with SMTP id v10-20020a05622a130a00b003e4ee70e001so16008863qtk.6 for ; Tue, 04 Apr 2023 06:58:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680616683; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KnmbrQNAO6vogkcavugLBxSWNLzJVGcFrl2ceDOXedw=; b=MVY5jbL7qvK7lcgz2oYkSxTfPdspZAWypynFbC9NtJ2EvqOioBN5KElS41by7EnVUE H7lJbSnT5Eb86J3kPcrWU81wz8B/27UrMqTkO9DyChKv5/ovZMmlRXEzP07r5u7gQjpr 4s4J0jfXQshWd8QL9s8NQu61Pvv1LsXWsfXqm+1hss09f7pfOoC/yo/qTsJ78DZSHmIa VboJbZ5PhUP1/mnS2/FAnUs6NZZ/E+jlEVWCA94a/PJcU8i3VZXECO+wLjc9uFoWZy4G AApHmScL9pecXCPGVtGrX3JtTHUDd8Ei0osp2ujukw/cOTpi0lEk+LmbLjkD6OhUKk+t rXWg== X-Gm-Message-State: AAQBX9eQ57QB4zrn1A/72Kf2Ni3/FRGRFw2gxFe3ubypiMfu5ATWomDZ 5X6JEwIoChFJWbxPWyl3n0jniCY9hex49rL/UOP1ME7qT/tlZgstWJ4XDpaYceivu3S5ArBVklV ZoIr547ZxPyE42jyHmB8V X-Received: by 2002:ac8:7c43:0:b0:3e3:89a5:192f with SMTP id o3-20020ac87c43000000b003e389a5192fmr3627777qtv.61.1680616683382; Tue, 04 Apr 2023 06:58:03 -0700 (PDT) X-Google-Smtp-Source: AKy350ZhWNemre0Ke3MopbOYN+HIS6fDVvynz2hIwpoMWwf0AGyHck+Sm/fanjfbBanHR63DwW7egg== X-Received: by 2002:ac8:7c43:0:b0:3e3:89a5:192f with SMTP id o3-20020ac87c43000000b003e389a5192fmr3627750qtv.61.1680616683138; Tue, 04 Apr 2023 06:58:03 -0700 (PDT) Received: from oak.redhat.com (c-71-206-142-238.hsd1.va.comcast.net. [71.206.142.238]) by smtp.gmail.com with ESMTPSA id i7-20020a37b807000000b0074a5ffbecd3sm167759qkf.49.2023.04.04.06.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 06:58:02 -0700 (PDT) To: Wilco Dijkstra , libc-alpha@sourceware.org Cc: Joe Simmons-Talbott Subject: [PATCH v2 0/3] Add tests for abs(), labs(), llabs() (BZ #30263) Date: Tue, 4 Apr 2023 09:57:44 -0400 Message-Id: <20230404135747.3576298-1-josimmon@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Joe Simmons-Talbott via Libc-alpha From: Joe Simmons-Talbott Reply-To: Joe Simmons-Talbott Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Add testcases for abs(), labs(), and llabs(). Test the bounds of the given type, zero, and part of the full range of values for labs() and llabs(). Test the full range for abs(). Changes in V2: Reduce number of iterations by using a prime interval. For llabs() test the 32bit crossover point. Joe Simmons-Talbott (3): stdlib: Add testcases for abs(). (BZ #30263) stdlib: Add testcases for labs(). (BZ #30263) stdlib: Add testcases for llabs(). (BZ #30263) stdlib/Makefile | 7 ++++++ stdlib/tst-abs.c | 45 +++++++++++++++++++++++++++++++++++++ stdlib/tst-labs.c | 51 ++++++++++++++++++++++++++++++++++++++++++ stdlib/tst-llabs.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 158 insertions(+) create mode 100644 stdlib/tst-abs.c create mode 100644 stdlib/tst-labs.c create mode 100644 stdlib/tst-llabs.c Reviewed-by: Wilco Dijkstra