From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 416943858D37 for ; Thu, 27 Jul 2023 19:20:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 416943858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690485631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=K+E8qaHxMeisDy7TEljdWys+3tbGcAdqqlKSNlOSTCQ=; b=CCDmKq78nJFFz2xP98hEqyQfZaPObGxju8qpPR/6491PwfnfvNgUTLnEcrysnAHqdf7wEC iua1w7D/fzC1fFmKMXo2gfJ4PwDvOKw5xKYHQ5DMTyYA8pCOJrYIQXehSfLUtufPdFx084 GSr/NfVvk9gQTgzHb+/ywpqDJbxFVho= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-185-fp9qG9ryMOuz-7ufrTx9rQ-1; Thu, 27 Jul 2023 15:20:30 -0400 X-MC-Unique: fp9qG9ryMOuz-7ufrTx9rQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E1054280D597; Thu, 27 Jul 2023 19:20:29 +0000 (UTC) Received: from greed.delorie.com (unknown [10.22.10.211]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE8D9C58DC1; Thu, 27 Jul 2023 19:20:29 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 36RJKTkW2005241; Thu, 27 Jul 2023 15:20:29 -0400 From: DJ Delorie To: Sunil Pandey Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Add strlcpy/wcslcpy testcase In-Reply-To: (message from Sunil Pandey on Thu, 27 Jul 2023 12:10:18 -0700) Date: Thu, 27 Jul 2023 15:20:29 -0400 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.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_H4,RCVD_IN_MSPIKE_WL,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 List-Id: Sunil Pandey writes: > Actually, it's already testing the generic version of strlcpy > implementation from the string/strlcpy.c file, so no need to implement > another SIMPLE_* function. While that is true at the moment, in the future someone will start optimizing that function, add cpu-family-specific variants, etc. Then, when you're running on some core that chooses a vector-optimized strlcpy, the simple function will be useful. Note: I'm not saying "you must add this" as most of the other tests don't either, and some test is better than no test. I just don't want you to make a decision based on me not explaining myself well enough ;-) The easy path would have been to just add the IMPL line and have that extra level of paranoia built-in from the start.