From patchwork Fri Mar 28 17:07:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain X-Patchwork-Id: 14032264 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 650CA3C0C for ; Fri, 28 Mar 2025 17:07:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743181675; cv=none; b=d63UhTcUDcQRqvIrpWKhCsxBnhBt0jIf93zOBTmZN6dwtwWFJDaH2jvdlX1bZB/0bWHBiW3QiWLP7pn4rPKRubHJJ2Tksf2uPWZCtanbaUASmSL8FV5OzqQJHtcQhbE8co+MvXCfDr5d8Mx5LNKjJ6XBNoeWdDscUQhMk5pzIs4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743181675; c=relaxed/simple; bh=ZWN2MYGjP1xdqTTsLBMoU2agzEliXWhudqtojn4xsCY=; h=Message-Id:In-Reply-To:References:From:Date:Subject:Content-Type: MIME-Version:To:Cc; b=Y2lwH7DU3cNVrDZEOihZnzpRjD5aqCKIBFNC4WPEErqmVlu3oXslmz6lbHycWozDaTtmYY2V2avxZylI1pH4m4IM2ETCb1ik/OyK6WrpyH+9KHNKl0yI74qObqR9wqZgffYgXcT8Ti8ffkaPDb9QSaDbl7KQitjTDLndIGWq13E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=i34Y/EHB; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i34Y/EHB" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-43cf848528aso20981905e9.2 for ; Fri, 28 Mar 2025 10:07:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743181671; x=1743786471; darn=vger.kernel.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=MGr/XzAg5R3LfC3ivsucjN1QW7T4+QNbAHtUXfPMwc4=; b=i34Y/EHBSuS+kIMgZuq/7vfbLmtkeV4hxxKgfURuJ0Jfs+sA4Y/668FYA8AtUnXLbc XjcTXUCXBvGGlLYsX0nBR+xaJcDPCS5OJENkaYHGPi6BTGqBRqkA3/FHfiKFC5c75U+V On26Qn4PM7nJqCRdRVavJ1UrwNe8aKIiIIYWNUKT9U/LS0LTe/AFC6cxA53UCrvHfWaF +dFefqFPbpAPzsIeiAzE46BMQ53Po34onp8ApznAYMF5LGVZQTSZVf4lwIC4E/HvDdDD SjU8gugrpYM0mVm8KXwJMErqCqr1EhfuipAfrb7hwb27xS+9vx2uHIV722J+v6yQDuKk jW/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743181671; x=1743786471; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MGr/XzAg5R3LfC3ivsucjN1QW7T4+QNbAHtUXfPMwc4=; b=IeAgtQ1AJAv6da+uBpCY/2NG/eQCd+XS9l00wdkhY7OjTia2VmKHGPsCfjEGuOiQzo 8kW/VuDUWtRMmySw4sNoDX8mMCCDXSKZrGRhPBd97m83RuVOKgHoVCanM/u04VIjih+D 8WYCSZnagiMpZSc/CKCyW2YXcRgaxLqi7YHuTyN9gLTlI3cRtQhfD/AmIBTnKHEf/cGY BgYsbZJxYc3QFemflNIQF1kncHruQL3GEn8HtPHEvL7KwrtjH3b/fhYKZEZSFofMTUDO 8eoO0WrHk3cxu5F6J9klZ2XunMC2nUeIY0yPfTzdSOrKHdKAkFB8F47Ggzf3Oja6c6vv R6gQ== X-Gm-Message-State: AOJu0YzH/wcMrQPACx089r9m5mmdkmkq6dIvuGYWtfeVguSrMu2b+x3O RrfEAUju+oDyY3+cPHD9/5slFuG1XTctNdw/9Sa3mRE9agWXLb64JlD3fA== X-Gm-Gg: ASbGncvRHQpxocjIo8PK8zfeIBsQp8hGn6X74EKprzj4Zp8pcaAmeuR6yJmMN8VXDyO 9Fo8KJYf0rd3NsxsUcvLZp3GZMJox3UCEGyCC+Zh/k3AbQekr6/VcGGHy0wYNWQWxNd3A431SZs hjUOagO84/8KcrWJhDNftBpwperHvSZa7ipJ2tfXO3T7Ghw5lFCF4tRPqbqOMItRR/oQrYMbtXr QNyI+NbCkk0bJV2SZ67yvAtDJEmRuEv3DTmDq+YH1wMRRZiN4oiM1RSHxioh4zz8K4RhxiooWcF QJQS0ZSsi3QuFlvTjGG75Mw/vq55RbyHEwfRN1grzGz4RQ== X-Google-Smtp-Source: AGHT+IHczGor/Go0ej0TxgN+anwWNuqRDpfOXKcFi69oQH91odJaMzJX1seQKw/IHSfldtS8qTRVhg== X-Received: by 2002:a05:6000:2a10:b0:39b:fc63:474d with SMTP id ffacd0b85a97d-39bfc6349bcmr3591009f8f.54.1743181671218; Fri, 28 Mar 2025 10:07:51 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b6630a3sm3166183f8f.30.2025.03.28.10.07.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Mar 2025 10:07:50 -0700 (PDT) Message-Id: <41a093d570a5756f730b069980edafbcedf5c8bc.1743181669.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Fri, 28 Mar 2025 17:07:48 +0000 Subject: [PATCH 1/2] p7821: fix test_perf invocation for prereqs Fcc: Sent Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 To: git@vger.kernel.org Cc: Victoria Dye , Neeraj Singh , Philippe Blain , Philippe Blain From: Philippe Blain From: Philippe Blain Since 5dccd9155f (t/perf: add iteration setup mechanism to perf-lib, 2022-04-04), perf tests need to declare their prerequisites with '--prereq', after the test title. p7821 was forgotten in that commit, such that running that test on a machine where the PCRE prereq is not satisfied aborts the test with: error: bug in the test script: test_wrapper_ needs 2 positional parameters Fix this by correcting the two 'test_perf' invocations in that test suite. Signed-off-by: Philippe Blain --- t/perf/p7821-grep-engines-fixed.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/perf/p7821-grep-engines-fixed.sh b/t/perf/p7821-grep-engines-fixed.sh index 61e41b82cff..1d126c7b039 100755 --- a/t/perf/p7821-grep-engines-fixed.sh +++ b/t/perf/p7821-grep-engines-fixed.sh @@ -33,13 +33,13 @@ do fi if ! test_have_prereq PERF_GREP_ENGINES_THREADS then - test_perf $prereq "$engine grep$GIT_PERF_7821_GREP_OPTS $pattern" " + test_perf "$engine grep$GIT_PERF_7821_GREP_OPTS $pattern" --prereq "$prereq" " git -c grep.patternType=$engine grep$GIT_PERF_7821_GREP_OPTS $pattern >'out.$engine' || : " else for threads in $GIT_PERF_GREP_THREADS do - test_perf PTHREADS,$prereq "$engine grep$GIT_PERF_7821_GREP_OPTS $pattern with $threads threads" " + test_perf "$engine grep$GIT_PERF_7821_GREP_OPTS $pattern with $threads threads" --prereq "PTHREADS,$prereq" " git -c grep.patternType=$engine -c grep.threads=$threads grep$GIT_PERF_7821_GREP_OPTS $pattern >'out.$engine.$threads' || : " done From patchwork Fri Mar 28 17:07:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain X-Patchwork-Id: 14032265 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 68C761D8DF6 for ; Fri, 28 Mar 2025 17:07:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743181676; cv=none; b=T9xAw+eLTEgsplZ13p7zAWznPDWH3kIxzMNd9PhU6rEJTaWVXBWfMPo4PXwso9sfqHYeqN5+M2scMgeYjk/t6ycpJofZMS7YcSK4SEkp37pQcpaLhOlvKP42B0M2tZx9+DQ8lmo7IOZU8mQdbZekEzepnbTCtTtolevDxnX9QYs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743181676; c=relaxed/simple; bh=Xhf/4Yd1Hr7rW4SJ0uHt7uCkUueGdgHvynERbZbv924=; h=Message-Id:In-Reply-To:References:From:Date:Subject:Content-Type: MIME-Version:To:Cc; b=PkEiJVFrDFzacGgM114IYQ55S3tDCxcLV5bmT1TfQMyCXm58yszH19RtI4uVJGtSuKXejbvRUDAdh5Qj02ocKdbwqraXRo/u8koWqkKlIVSjMmMHYpHe4+3TcofcwK99KeLn+1ZShhySOCMHDG2LrFRMt5O5hhLaT5F+4b2ibC8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dydzieEd; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dydzieEd" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3913d45a148so2015063f8f.3 for ; Fri, 28 Mar 2025 10:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743181672; x=1743786472; darn=vger.kernel.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=vpYYYu//7ksnbdIvkahK7A2Pv8s2++Rw4BnYXpKHzY0=; b=dydzieEdUrs+ifwcx1YEsYEoEBSk1ojVV617UmlGFoZ3VNDbwiQECri7rdJ0yFpF/1 DQAvOt3DCl5oIuBROckps7UvqssZG4+e7vPOPqzmuLQxaiHd+zugTBLrJGXoVBbXvMY5 vw8tfG0lkSDTuE5NVszi9kTDG+nwmKerA8CPbO3q0RqcftJejEmo3w1XKcIco7pMAlBh 6db6Cto1C4BwJsuCO2/FLQ7+o/g6rw88IiP+6gN7T0PzN0uTg4PdBrZE9wwB5PtQhjay Pdb4ktHOyk1Ik8G3WVKdLJGtwxPlGtr8AVaESJRWOQKGltQ2MjGZZO4EjtzFpwrBhP9G Bd3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743181672; x=1743786472; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vpYYYu//7ksnbdIvkahK7A2Pv8s2++Rw4BnYXpKHzY0=; b=YQuSEeu4v0ZuFNq/rih0DMJgcEU1GD9AzfCSrTOGxh0ukEqhRuHNT0LCJB7WVWgQJV pPOCdcLI1jVcBkB7TzXOHMe42zHIuaSM9WQtCLX+B9MOT4pioxPrVf7Yf7XHTeCU1dcP uZ7CdoB/lEj+vXYIVpfDu5+yb+SBeXytAYnakVroHZT7vEM1hAFzY+a3phGmgmyLYopV 9pWt8UeZ9K/+6QX3Heb1zbPCZ60pj+o+hgpTcDD65JCy+InLoefQr7RKbVnEPB9CR8ep yCJoXDwwekBWJnd0XxKgAXOYr3ocU69aiggk8sUTz4pn2ZA+TEx7z/4DGV3kcwrCV8bV sXxg== X-Gm-Message-State: AOJu0YzlJDPk4tPguXanoqBvV5Zl5mYMDO2tj2H7aoOp4y207Yeu+Ysj CbR8QhfV/M42dJ8mkuvIODlu85kdCkzIjAp1Y+3ytxer3RgdgNOX/3BvaQ== X-Gm-Gg: ASbGncuXPkOuFD8Kr/LXhENizEdPdYNIU8s1y2EX+DeTC2171zqoFRihrjsppBoyqV/ yt0ISmMLN4VLnxCS8Vfz232fv99H98j+SSa2b2hKdUfI9hK2PNspSaCt4nBlLbWG/6+GhqUSCAT KJXDacSbIrrdZl97mJGQEY+gH6Rv8PdWbiEsS4l0sbDhQeOsFBXWh2+dabVnQUkwoEK7xF+WeQf 0YTBVyX5Z+urBh1WrM8dA6v9tLlGTpqv1WNN1DoTFhTK7grPZuH+8pGStMKiVw+M2yM3hfRL7uk vRHuTapg2swVuyIAEJr2sbHv0sQPEzFbvy7JgaqdcjkfVA== X-Google-Smtp-Source: AGHT+IGcVE2SdYU2g0wx82CNrPQNiY/xJlmxZjcXv0s+UcHtN/wZWUQ3NFWyqOA/Ms5NOJlgBrMRyg== X-Received: by 2002:a5d:6d0c:0:b0:390:f9f9:3e9c with SMTP id ffacd0b85a97d-39ad1749098mr7419179f8f.25.1743181672325; Fri, 28 Mar 2025 10:07:52 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b79e1b0sm3105891f8f.75.2025.03.28.10.07.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Mar 2025 10:07:51 -0700 (PDT) Message-Id: <1092c32609f249839453052ca802cb10256cb48f.1743181669.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Fri, 28 Mar 2025 17:07:49 +0000 Subject: [PATCH 2/2] p9210: fix 'scalar clone' when running from a detached HEAD Fcc: Sent Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 To: git@vger.kernel.org Cc: Victoria Dye , Neeraj Singh , Philippe Blain , Philippe Blain From: Philippe Blain From: Philippe Blain In p9210-scalar-clone.sh, we test using 'scalar clone' to clone $GIT_PERF_LARGE_REPO (copied locally as 'to-clone'), which defaults to the git.git checkout we are running the test from. When --branch is not specified (as in this test), 'scalar clone' tries to get the default branch of the remote repository by parsing the output of 'git ls-remote --symref $URL HEAD', as implemented in scalar.c:remote_default_branch. When the git.git checkout we are running the test from is in detached HEAD, this fails and we fall back to using the name of the currently checked out branch in the newly initialized repository, which in this case is the value returned earlier in cmd_clone by repo_default_branch_name. We then invoke 'git checkout -t origin/$branch', with $branch being the name we got from remote_default_branch. This invocation fails if '$branch' does not exist as a branch in the current git.git checkout. Fix this by creating a local branch in 'to-clone' in the setup test "enable server-side partial clone", making sure to use '-B' in case a branch named 'test-branch' already exists. Signed-off-by: Philippe Blain --- t/perf/p9210-scalar.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/perf/p9210-scalar.sh b/t/perf/p9210-scalar.sh index 265f7cd1fe2..56b075e906e 100755 --- a/t/perf/p9210-scalar.sh +++ b/t/perf/p9210-scalar.sh @@ -7,7 +7,8 @@ test_perf_large_repo "$TRASH_DIRECTORY/to-clone" test_expect_success 'enable server-side partial clone' ' git -C to-clone config uploadpack.allowFilter true && - git -C to-clone config uploadpack.allowAnySHA1InWant true + git -C to-clone config uploadpack.allowAnySHA1InWant true && + git -C to-clone checkout -B test-branch ' test_perf 'scalar clone' '