Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp402598rwi; Thu, 27 Oct 2022 02:56:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7OdvMpFvedyeJzmu9ZIOleP/7hDettgCG7OkdfOqkcDreEFn/E/3dWakWkkiGRf0uksZPO X-Received: by 2002:a17:907:2bf9:b0:7a4:bbce:dd98 with SMTP id gv57-20020a1709072bf900b007a4bbcedd98mr21484118ejc.669.1666864564952; Thu, 27 Oct 2022 02:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666864564; cv=none; d=google.com; s=arc-20160816; b=ReTHU1zJliV6WrY/PbvZeEdJSKuB5j9NRABFdkq+68uP/f01qTlJqeaem95kOdkAx4 9s8cfeq1K0bxm3rIo/Loj1buvh3RwFpAp+Kee9QcYErqTxjLrDjdcyCKw6th6yIuu+s/ 862fq9gbmGKSrgAr2Qvux8Xrhr7aa973RFt3+L/P5vTImpeDRTE0QmLHssdMbgjnIxIO UrzuLTcFKdBAmnFJNx6sfbFVa00hm0phqDta6oA1lsVPOqiGb2kW0RKl+kvsjhTOaJid Nu2t2YIw+iAqwy2/uNcFB0XIy9ri0Lsb8OBqT2pxWx3nqizPBgQamBXAHdMrwHPznrxF QSSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=OmfGV//KmMuic4TgO6B6vfIweF0JdsZfuu3s+Qe2Rfc=; b=N+rsDqGytkdTZCfsbdeVnHVTMlsNHuD4W8aUR9y9uYvyVf+E4wVfSHIyWj1ylgwrKl MUtrSggn6u3ly1E8ljmSu8eDR+Sa2xAkuxMzCjoc/0p24AAqhckdVr8JPvCXGFDfOb0B eS/PqpvIeI4xGLA5ikQc24HEUaZ9+DMtErUQoZOiD/dlB3zYFru0BbyKsUJg0ci21f0E bISj20XNWSAJ5un494opoVf08/AUUsOEtL/1viTF38HASiYUVyUSlAZxX8ghO0hfHFro kaXBMnPBbybqv3Lm5uOIq4cNxhOnYuRPdJOMeVCGqRNRsPZ4MoXe6U8+bIACB4BwTLKo e4KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=BOMLOipg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd7-20020a1709069b8700b007832bdf1856si1101052ejc.740.2022.10.27.02.55.38; Thu, 27 Oct 2022 02:56:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=BOMLOipg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235240AbiJ0JKY (ORCPT + 99 others); Thu, 27 Oct 2022 05:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235262AbiJ0JKJ (ORCPT ); Thu, 27 Oct 2022 05:10:09 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56F56120A1 for ; Thu, 27 Oct 2022 02:09:58 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id j4so1544549lfk.0 for ; Thu, 27 Oct 2022 02:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OmfGV//KmMuic4TgO6B6vfIweF0JdsZfuu3s+Qe2Rfc=; b=BOMLOipgWTGcIVb7PapOdU9iiCF8wgQ45BNUdfX0F957+X8rdd2g09ehnb/YzoQE0U 1+urSVIxFDBtB7meLqbvaxdg+t5vQj2AHEL8XLuElrDsXQ+gc8B1uJxlFaDBKH6ZnMHA NTmHmfkbZaav1fWDblzrnvLqaUo+Vlj6UUecY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OmfGV//KmMuic4TgO6B6vfIweF0JdsZfuu3s+Qe2Rfc=; b=VBEYICmiAjwmliRhvCahUOlpIKogBaHBx1nDN5amyXVMW1VbiDKkHJP1eAfZqq2Nzk i17jYeIWkxiHdldTTrWlRFrqZEVSrtD02lFZdHB4tNLNGGO/0V9diYOkqNDNlCoLQBuI s3jRLQBOP0YaC6XsPTSJ0GN/4ZzyfT7WRWVDDXY4+boYIKCReFdhLht6VSkZoPCw9jJW Wv9cX1MdCh39v9X3a+eG+aSMDN159Bf4bAFmFC95drrHFjEjiEawhPPZP4olg6YlhY9/ Z0BYJXgbRT82zqqcBQUNaV6zWRpF0O64bYc5ilpajAbcUcD2P6T9dujFeRHhL3LRwiBr +80Q== X-Gm-Message-State: ACrzQf2jqYlYLApDQ4Jd3aUMSbrAET65wLVLGkxK03fDyZUzSNXFICum WxSLliuuuEggpI2SyyGu2n4w+Q== X-Received: by 2002:a19:700a:0:b0:4a4:7fc2:788b with SMTP id h10-20020a19700a000000b004a47fc2788bmr19520859lfc.117.1666861797193; Thu, 27 Oct 2022 02:09:57 -0700 (PDT) Received: from [172.16.11.74] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id w7-20020ac254a7000000b004946c99e78asm107237lfk.277.2022.10.27.02.09.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Oct 2022 02:09:56 -0700 (PDT) Message-ID: <0b8feeb2-6ec6-d2af-8aa7-0bf34e7ab4b2@rasmusvillemoes.dk> Date: Thu, 27 Oct 2022 11:09:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] selftests/nolibc: add 7 tests for memcmp() Content-Language: en-US To: Willy Tarreau Cc: "Paul E. McKenney" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221021060340.7515-1-w@1wt.eu> <20221021155645.GK5600@paulmck-ThinkPad-P17-Gen-1> <20221021170134.GB8420@1wt.eu> <20221021170738.GM5600@paulmck-ThinkPad-P17-Gen-1> <20221021172026.GC8420@1wt.eu> <20221021180040.GN5600@paulmck-ThinkPad-P17-Gen-1> <20221022112228.GB30596@1wt.eu> <20221024155357.GZ5600@paulmck-ThinkPad-P17-Gen-1> <20221026053922.GA19206@1wt.eu> <20221026195224.GA24197@1wt.eu> From: Rasmus Villemoes In-Reply-To: <20221026195224.GA24197@1wt.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/10/2022 21.52, Willy Tarreau wrote: > On Wed, Oct 26, 2022 at 11:08:41AM +0200, Rasmus Villemoes wrote: >> On 26/10/2022 07.39, Willy Tarreau wrote: >>> >>> No more false positives nor false negatives anymore. I'm sending you >>> the patch separately. >> >> While you're at it, may I suggest also adding a few test cases where the >> buffers differ by 128, e.g. 0x0 v 0x80 and 0x40 v 0xc0. > > I initially thought about it but changed my mind for +/- 0xc0 that > covered the same cases in my opinion. Do you have a particular error > case in mind that would be caught by this one that the other one does > not catch ? Not really, but in a sense the opposite: for the +/- 0xc0 case, both ways of comparison will give the wrong sign because -192 becomes +64 and vice versa. For +/- 0x80, one way of doing the comparison will "accidentally" produce the right answer, and I thought that might also be a little interesting. I'm fine for proposing a respin of the patch to improve > it if it brings some value, It's your call, you can respin, do an incremental patch, or just ignore me :) Rasmus