Message ID | 20230404190040.2507343-1-josimmon@redhat.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> 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 D0DEC38582BE for <patchwork@sourceware.org>; Tue, 4 Apr 2023 19:01:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0DEC38582BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680634876; bh=MzC8x3J9hNZ0JYds2fGZHjr7r0OZdFV5+Zw+07eanFY=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=C0s+nDOISILTzWY2hfILnXfmKOgM14ts4F/Ly7UzRI06z+Bni6SL02CMU1wFpjToS GU/SuReum6sf77Y58+LDcuWYvwwci3oW8ajNacDtDAHUDhDqkQJfRI7tLgX+ghXkTA 20YQkvqP4vbZWO8kVGffkzp4N0+VO+f44BcdZPko= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 7955B3858C52 for <libc-alpha@sourceware.org>; Tue, 4 Apr 2023 19:00:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7955B3858C52 Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-44-oiHy8sBIPAqCRhJgpuKHDw-1; Tue, 04 Apr 2023 15:00:50 -0400 X-MC-Unique: oiHy8sBIPAqCRhJgpuKHDw-1 Received: by mail-qk1-f200.google.com with SMTP id 72-20020a37044b000000b0074694114c09so15072758qke.4 for <libc-alpha@sourceware.org>; Tue, 04 Apr 2023 12:00:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680634850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MzC8x3J9hNZ0JYds2fGZHjr7r0OZdFV5+Zw+07eanFY=; b=pz50NQ3PYo/mhTgmqy/yOxgCyS3Rt8EOLL5RYPVMwJe9TFw8ZxjQ9cnCh68NPGzaie Hty6L7Ge5hbfUKBtqC5QgxSAE40py2th/f9+aZCRBVCkaD1TEffnuUt9iPPa7b/sBaHi ed65r37AVkFjBXLjZi0toVzMzu5MLtE9hXj1LY50/i913tUNWMU6bz/jxfmFXwZT2lBB qsmW5OZDbsyxL5tTqJZi6E4g8/ZNR2XmVjGAK0fRQsZvmXlHJ8XWkCwtwiC0gsP9SAXN 5n3gWeXVN6ZmWZUkKkfzdR3rbFT11r+NoqYFCohAJQqWWJpHarabAuqA12a2u6lC+Rfm C6MA== X-Gm-Message-State: AAQBX9dHEtSctfX00y9HZXwxlThyzXbTc8Wg+6S3+pokK4nOTLemAiLA pK1N6rnRckmsm2chLfcHwHVgdgUeqwlQGMTBMebcSe7YjylzSYg3z5yhUyNoHJv0O9zzBnlSlUM sy0ghtSiwGWEij226/M1T95iWnlhsjvd9IncZp+XNjcAVAQzCLa2Pfh97lobnWWVYkyRbesJknd lseGSW X-Received: by 2002:ac8:7fd5:0:b0:3e0:d161:29ad with SMTP id b21-20020ac87fd5000000b003e0d16129admr92019qtk.28.1680634849872; Tue, 04 Apr 2023 12:00:49 -0700 (PDT) X-Google-Smtp-Source: AKy350bgYELpuvzOAnd0eW1+ywjKXpt7pfYycTaAvb5rPRXex8ZZ3qXERJf25Csu/kgUmFkYpQjJwQ== X-Received: by 2002:ac8:7fd5:0:b0:3e0:d161:29ad with SMTP id b21-20020ac87fd5000000b003e0d16129admr91939qtk.28.1680634849379; Tue, 04 Apr 2023 12:00:49 -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 b8-20020ac844c8000000b003e4d9c91106sm3434502qto.57.2023.04.04.12.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 12:00:48 -0700 (PDT) To: libc-alpha@sourceware.org Cc: Joe Simmons-Talbott <josimmon@redhat.com> Subject: [PATCH v3 0/3] string: Add tests for strdup and strndup (BZ #30266) Date: Tue, 4 Apr 2023 15:00:37 -0400 Message-Id: <20230404190040.2507343-1-josimmon@redhat.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230329150500.2886135-1-josimmon@redhat.com> References: <20230329150500.2886135-1-josimmon@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-5.7 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Joe Simmons-Talbott via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Joe Simmons-Talbott <josimmon@redhat.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
string: Add tests for strdup and strndup (BZ #30266)
|
|
Message
Joe Simmons-Talbott
April 4, 2023, 7 p.m. UTC
Copy strcpy and strncpy tests to strdup and strndup repectively. Remove tests that checked the surrounding bytes of the result as they are not needed. Changes to v2: Remove the rest of the ifunc bits. Mark two variables as unused so that we can use string/test-string.h for functions that aren't ifuncs. Changes to v1: Since strdup and strndup are not ifuncs and likely won't be, call them directly. Use TEST_COMPARE_BLOB() rather than memcmp(). Clear up wording in a comment. Joe Simmons-Talbott (3): string: Allow use of test-string.h for non-ifunc implementations. string: Add tests for strdup (BZ #30266) Add tests for strndup (BZ #30266) string/Makefile | 2 + string/test-strdup.c | 201 +++++++++++++++++++++++++++++++++ string/test-string.h | 4 +- string/test-strndup.c | 250 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 455 insertions(+), 2 deletions(-) create mode 100644 string/test-strdup.c create mode 100644 string/test-strndup.c