Message ID | 20230421132425.2178020-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 049093856278 for <patchwork@sourceware.org>; Fri, 21 Apr 2023 13:24:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 049093856278 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682083495; bh=yJbLocLBX5lPBOP8gndbJ4mgj13RJvsubsPGgLuzO2Q=; 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=Grnhh8TcD9dV0juaseZ4MrDVKj/A5dbLMRcg198yKA4kQnbbh872jM6JTkGNVqk0Y JXwWiqlxMy3qeTeg+z9+mYaTA9mxfGulakvepUfNT+7SHFIHAOIjzsOoCm2/TXEQ4e BX9ETkTsA1EOfH82FvjhFh02stngrgaIwT3mYpNM= 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 620E0385773C for <libc-alpha@sourceware.org>; Fri, 21 Apr 2023 13:24:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 620E0385773C Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-252-Okyd3NdtOVicRY8yuW6z7g-1; Fri, 21 Apr 2023 09:24:29 -0400 X-MC-Unique: Okyd3NdtOVicRY8yuW6z7g-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-74e1cdf9cbeso764307785a.0 for <libc-alpha@sourceware.org>; Fri, 21 Apr 2023 06:24:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682083469; x=1684675469; 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=yJbLocLBX5lPBOP8gndbJ4mgj13RJvsubsPGgLuzO2Q=; b=Nf478rXDYA/qHgikWspenGvyg1+kEdqJHlWHD0Qluz0g9xBImIjo6xvVGY1J/oJptS nXl2BhinjT2LZL6CPCkZex5sUF8/wB8yqt8QtXsnIcnG2eSJ88FV3B+JX/x2RvzRoMfV 1sEou/uz1/om60Yrg6zJQGN/rx0zRFuSOsXus1kqAUVpoNLkCuLQm7fHHCwupWOuxXWm ZLykUFuY+OMclWAwyp7oz6jjGPbT/TewyKGUzTK+UhC+JdsezIC+nu5KV4rb28cy1Hin deeVNqoPAhqVR2gwJ+Sun/RUgn2i3VXKWMr4MQAPtaJjCIXB4h1ER0OzJtOW5sLur8a3 bXzQ== X-Gm-Message-State: AAQBX9eZ9WkLxWaGwArueqyyHNDEmbF1nTRkgcY0TAtH55JyOORdLDNo mV2FgDmZteWvNpM1v30wIVbjxqq2B3PTvw7Ewknis7BsLrgMkIbwU7FV5L41t7Ahzjn001hscOl FVVhsKCdEWlyRz7ChoRvwXSVTBPnYfVs1SR1kE2LUOkwcqhVHta0fJv7LkG6cBCxDL1GQDASHgm pNEoSZ X-Received: by 2002:a05:622a:1348:b0:3ef:3c45:b659 with SMTP id w8-20020a05622a134800b003ef3c45b659mr8142743qtk.17.1682083468899; Fri, 21 Apr 2023 06:24:28 -0700 (PDT) X-Google-Smtp-Source: AKy350Y3BB6rcnh1aTmdzxPAjtbdCQwAbBUnrGwpr4WRndr/8CvH1gH+Mbb7qvKYHqlpG8/5xn2AHQ== X-Received: by 2002:a05:622a:1348:b0:3ef:3c45:b659 with SMTP id w8-20020a05622a134800b003ef3c45b659mr8142715qtk.17.1682083468567; Fri, 21 Apr 2023 06:24:28 -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 w23-20020ac843d7000000b003d7e923736asm1328458qtn.6.2023.04.21.06.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 06:24:27 -0700 (PDT) To: libc-alpha@sourceware.org Cc: Joe Simmons-Talbott <josimmon@redhat.com> Subject: [PATCH v7 0/4] string: Add tests for strdup and strndup (BZ #30266) Date: Fri, 21 Apr 2023 09:24:21 -0400 Message-Id: <20230421132425.2178020-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.9 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, T_SCC_BODY_TEXT_LINE 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 21, 2023, 1:24 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. Chnages to v6: * string/test-strndup.c - Include the changes for v6 which were inadvertently left out. Changes to v5: * string/test-strdup.c - Don't use UCHAR and avoid the casts. * string/test-strndup.c - Don't use unsigned char and avoid the casts. Minor style cleanup. Changes to v4: * string/test-strndup.c - Remove no longer needed defines. Remove unneeded comments. Minor style cleanup. Changes to v3: * string/test-strdup.c - Style cleanup. Make sure we're using CHAR rather than char for wide character support. * string/test-strndup.c - Remove unneeded wide character support since there is no wcsndup(). Use TEST_COMPARE_BLOB rather than memcmp(). * wcsmbs - Enable wcsdup() testcases. 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 (4): string: Allow use of test-string.h for non-ifunc implementations. string: Add tests for strdup (BZ #30266) string: Add tests for strndup (BZ #30266) wcsmbs: Add wcsdup() tests. (BZ #30266) string/Makefile | 2 + string/test-strdup.c | 201 ++++++++++++++++++++++++++++++++++++++++++ string/test-string.h | 4 +- string/test-strndup.c | 198 +++++++++++++++++++++++++++++++++++++++++ wcsmbs/Makefile | 2 +- wcsmbs/test-wcsdup.c | 2 + 6 files changed, 406 insertions(+), 3 deletions(-) create mode 100644 string/test-strdup.c create mode 100644 string/test-strndup.c create mode 100644 wcsmbs/test-wcsdup.c
Comments
On 21/04/23 10:24, Joe Simmons-Talbott via Libc-alpha wrote: > 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. Hi Joe, I appreciate you are working on this and I am aware you are a new contributor. However, the way this thread is being unrolled is becoming confusing and time consuming. So some tips: - Please use a proper tool to send patches. For more than one patch, just use git send-email (as suggested by 'Contribution Checklist' [1]) with --cover-letter and --annotate options (so you can double-check if something is off with the patches). This avoid messing with 'in-reply-to', as you seems to have done in v7. - Avoid replying to an old thread with a new version. It leads to some confusion depending of the email reader on how to organize the reply. - Always rebase and check the patchset against master. Both you v6 and v7 do not fully apply [2] due a recent wcsmbs/Makefile change from Florian. - Also, always address all the comments before send a new version. For instance, you forgot some remarks on my v5 review [3]. I have fixed both last two bullet points on a personal branch [4], just to avoid dragging this thread with another version. If you are ok with this I can install it. [1] https://sourceware.org/glibc/wiki/Contribution%20checklist [2] https://patchwork.sourceware.org/project/glibc/patch/20230421132425.2178020-5-josimmon@redhat.com/ [3] https://sourceware.org/pipermail/libc-alpha/2023-April/147474.html [4] https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/bz30266
On Fri, Apr 21, 2023 at 11:07:54AM -0300, Adhemerval Zanella Netto wrote: > > > On 21/04/23 10:24, Joe Simmons-Talbott via Libc-alpha wrote: > > 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. > > Hi Joe, > > I appreciate you are working on this and I am aware you are a new > contributor. However, the way this thread is being unrolled is becoming > confusing and time consuming. So some tips: Hi Adhemerval, Thank you for your thoughful reviews and feedback. I'm sorry for making this harder on you than needed. > > - Please use a proper tool to send patches. For more than one patch, > just use git send-email (as suggested by 'Contribution Checklist' [1]) > with --cover-letter and --annotate options (so you can double-check if > something is off with the patches). This avoid messing with > 'in-reply-to', as you seems to have done in v7. I'm currently using 'git format-patch' to generate the patches and 'git send-email' to send them. I only pass '--cover-letter' to format-patch and did indeed use --in-reply-to for subsequent versions. I'll stop doing that. > > - Avoid replying to an old thread with a new version. It leads to some > confusion depending of the email reader on how to organize the reply. Thanks for this tip. I'll stop doing that. > > - Always rebase and check the patchset against master. Both you v6 and > v7 do not fully apply [2] due a recent wcsmbs/Makefile change from > Florian. Sorry, I'll make sure to do this in the future. > > - Also, always address all the comments before send a new version. > For instance, you forgot some remarks on my v5 review [3]. I neglected to 'git add' my changes before doing 'git commit --amend' for v6 which was the reason for my v7. > > I have fixed both last two bullet points on a personal branch [4], just > to avoid dragging this thread with another version. If you are ok with > this I can install it. I'm okay with this. Thank you again for all of your help on this patchset. Thanks, Joe > > [1] https://sourceware.org/glibc/wiki/Contribution%20checklist > [2] https://patchwork.sourceware.org/project/glibc/patch/20230421132425.2178020-5-josimmon@redhat.com/ > [3] https://sourceware.org/pipermail/libc-alpha/2023-April/147474.html > [4] https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/azanella/bz30266 >