Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp666699rdh; Wed, 14 Feb 2024 08:02:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVgAYt1w9Moqi1e1jMl2C2i10deGpOGbf2vd2fw99ZscIHNoTYAc/C0UEddf3LXiPtiWE1FxLAvDyn2wxSNfimp22BfVjflFtWRN7RBgQ== X-Google-Smtp-Source: AGHT+IE4vGFC2AsPH7oBbVejYjHUEG+xENGC49i1ivmids08I5b8fgIJOQ9ezt/q3jUPcTiO1Xj9 X-Received: by 2002:a05:6512:526:b0:511:4f00:45b2 with SMTP id o6-20020a056512052600b005114f0045b2mr2225902lfc.25.1707926574808; Wed, 14 Feb 2024 08:02:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707926574; cv=pass; d=google.com; s=arc-20160816; b=z24K0JOsTSbp3sbpVPavkshygcXlYGfpIrErN8XwsWIDDh83cuSLHvZl0QG+IhWq0E RWjK4ksT7eFehuiSsz9kxp3I6m5BbtrJxd4cxXx+brhLfrqwzUCSULGxPMfgqsW29Nif dRXNjsRiiUfFbbEzOcdRURv/AXPXayLBVlGxBQc7Q8gxAT1t4kNtFzvGm588hqbgk1+S Hr/kTzrLY7eBcYjYRs4tV0ToZt+ACRwry/jwl2QNCk81kKB0bTy8DQey2OAYHFdD80zY DBArdttnibGbWb2PrKvnmefJSN3nHsDXsn3NxKsKRsHU8BUiC9qUQNvDTqTOAtmko+IO gDXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=1Q6s070A3tRZ1LGjYPWEgXBZBEDJQaa6GlMnHg87ugw=; fh=VAesoQgGl5CA380ccoPoQ+0VQN3ddYv13hyDFX9RKM0=; b=J8QAG9hshM+Q/jKj1M1hs9HcmPUBsJTai6VdgC2TtVer1vHE4NvZ00lsjVv924AMU7 GX324vZvZ6+hs8en8zMxkrJv5xX9Us0H2JhsshhN2dStrNAPo9CrBSFtHndAoxofpdbb ZUnvY4iGOn3nVgo8TVbKgEJY4HkkGOi4N+0fV90fpgb+UW02Wkrn7uGqhejScTqS5kkV 4ZBDvX+zcjPAlfnyfLNG+cHKiiMYZYWklfHoTvj3J4n/0Lg5j6N44jnD89DFWooxe0tz 9fvQ9kQNlCiS/bNVF+8WF2Fq1yDofQ3SdYcbdU4wtfqdBGI4RshLxCc24gTB3eHgdJmJ 9WSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sdfg.com.ar); spf=pass (google.com: domain of linux-kernel+bounces-65461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65461-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCV2mDQYtetqOtyYoXgx1CMpsA5Z4nlGEu6pH+2c6dIQmQSArL63/Vu8ut+xX+E89U/G88+Au/YyLBuOoymqPN1wmG58JWCyNLdX1zdOIg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y19-20020a056402135300b005612a7068aasi4815472edw.493.2024.02.14.08.02.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 08:02:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sdfg.com.ar); spf=pass (google.com: domain of linux-kernel+bounces-65461-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65461-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5A06F1F2ADF8 for ; Wed, 14 Feb 2024 15:52:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09E175D918; Wed, 14 Feb 2024 15:52:18 +0000 (UTC) Received: from alerce.blitiri.com.ar (alerce.blitiri.com.ar [49.12.208.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16AE55D8EF for ; Wed, 14 Feb 2024 15:52:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=49.12.208.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707925937; cv=none; b=A2B3SjaeiIqrmgl5laqwICMq1ghgR+MSdVxBRkCKbklkZLlaBNvCyJsUbfpIrBhtH55NmlYUhr67VWrGq7V4RaVLWUePq2ptoVsQJcX3WefOnOg59qOYl/ZjTM+kj3U4r/T7/ljPk+sf3YntUNO9z86XDViuKqt7W/bOIYiy0w4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707925937; c=relaxed/simple; bh=V6qNUL1nKdXu54YcvU1XIkiQF5/92WTEtIFup0YeBAA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=C2IfQ/olqeGpB/JHeJrXbYYyzZRtzsjwV6wvkhHVNS5UBNJCwMhoZdwmXIjPioBTtd8vcja+XJ2f8nnhy74544fH1puwK/sbaD02EW6vMkWV9p12RZE3RVKMJxZv9nyAqQbGbRzeDXG7moaFJYrCCOihznfjzix507yruF/a2Hc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sdfg.com.ar; spf=pass smtp.mailfrom=sdfg.com.ar; arc=none smtp.client-ip=49.12.208.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sdfg.com.ar Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sdfg.com.ar Received: from [192.168.0.26] by sdfg.com.ar (chasquid) with ESMTPSA tls TLS_AES_128_GCM_SHA256 (over submission+TLS, TLS-1.3, envelope from "rodrigo@sdfg.com.ar") ; Wed, 14 Feb 2024 15:52:13 +0000 Message-ID: <8b469fca-e1bd-4c7b-9311-cf4d2270f8cd@sdfg.com.ar> Date: Wed, 14 Feb 2024 12:52:10 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/4] selftests/nolibc: Add tests for strlcat() and strlcpy() Content-Language: en-US To: Willy Tarreau , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: linux-kernel@vger.kernel.org References: <20240129141516.198636-1-rodrigo@sdfg.com.ar> <20240129141516.198636-5-rodrigo@sdfg.com.ar> From: Rodrigo Campos In-Reply-To: <20240129141516.198636-5-rodrigo@sdfg.com.ar> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/29/24 15:15, Rodrigo Campos wrote: > + /* For functions that take a long buffer, like strlcat() */ > + char buf[7] = "foo"; > + I've improved this to not be the same length as the other buffer (we can't catch mistakes like confusing the src and dst buffers like that) and added some trailing chars, so we also test that the \0 is added at the exactly right position.