Article View: linux.kernel.git
Article #2826[PATCH 09/20] t9300: make the big blob tests self-contained
From: Karthik Nayak
Date: Tue, 10 Nov 2026 11:49
Date: Tue, 10 Nov 2026 11:49
115 lines
14998 bytes
14998 bytes
Similar to the previous commits, modify the big blob tests in 'series R' to make them independent of state from previous tests. 'R: blob bigger than threshold' imports the blobs, and the tests after it inspect the result. Fold them into a single test, which does the import and checks the pack, the blob contents and that the blob is stored only once. Set 'fastimport.unpackLimit' to 0 for the import so that a pack is written, and verify it with an inline loop in place of 'verify_packs()', which won't be available once the test is moved to another file. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> --- t/t9300-fast-import.sh | 79 ++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 75c2de46ed..9f4aea09dd 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -3148,51 +3148,48 @@ test_expect_success 'R: corrupt lines do not mess marks file' ' ## R: very large blobs ## test_expect_success 'R: blob bigger than threshold' ' - blobsize=$((2*1024*1024 + 53)) && - test-tool genrandom bar $blobsize >expect && - cat >input <<-INPUT_END && - commit refs/heads/big-file - committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE - data <<COMMIT - R - big file - COMMIT - - M 644 inline big1 - data $blobsize - INPUT_END - cat expect >>input && - cat >>input <<-INPUT_END && - M 644 inline big2 - data $blobsize - INPUT_END - cat expect >>input && - echo >>input && - - test_create_repo R && - git --git-dir=R/.git config fastimport.unpackLimit 0 && - git --git-dir=R/.git fast-import --big-file-threshold=1 <input -' - -test_expect_success 'R: verify created pack' ' + test_when_finished "rm -rf repo" && + git init repo && ( - cd R && - verify_packs -v > ../verify + cd repo && + + blobsize=$((2*1024*1024 + 53)) && + test-tool genrandom bar $blobsize >expect && + cat >input <<-INPUT_END && + commit refs/heads/big-file + committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE + data <<COMMIT + R - big file + COMMIT + + M 644 inline big1 + data $blobsize + INPUT_END + cat expect >>input && + cat >>input <<-INPUT_END && + M 644 inline big2 + data $blobsize + INPUT_END + cat expect >>input && + echo >>input && + + git -c fastimport.unpackLimit=0 fast-import --big-file-threshold=1 <input && + + for p in .git/objects/pack/*.pack + do + git verify-pack -v "$p" || return 1 + done >verify && + + git cat-file blob big-file:big1 >actual && + test_cmp_bin expect actual && + a=$(git rev-parse big-file:big1) && + b=$(git rev-parse big-file:big2) && + test $a = $b && + n=$(grep $a verify | wc -l) && + test 1 = $n ) ' -test_expect_success 'R: verify written objects' ' - git --git-dir=R/.git cat-file blob big-file:big1 >actual && - test_cmp_bin expect actual && - a=$(git --git-dir=R/.git rev-parse big-file:big1) && - b=$(git --git-dir=R/.git rev-parse big-file:big2) && - test $a = $b -' - -test_expect_success 'R: blob appears only once' ' - n=$(grep $a verify | wc -l) && - test 1 = $n -' - ### ### series S (mark and path parsing) ### -- 2.56.GIT
Technical Details
Message-ID:
<20261110-kn-fast-import-tests-1-v1-9-dbd9ee502aae@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!git+bounces-75062-linux-kernel-git=dewy.ruReferences:
<20261110-kn-fast-import-tests-1-v1-0-dbd9ee502aae@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!git+bounces-75062-linux-kernel-git=dewy.ru
From: karthik.188@gmail.com (Karthik Nayak)
Newsgroups: linux.kernel.git
Subject: [PATCH 09/20] t9300: make the big blob tests self-contained
Date: Tue, 10 Nov 2026 12:49:54 +0100
Organization: Usenet Network
Message-ID: <20261110-kn-fast-import-tests-1-v1-9-dbd9ee502aae@gmail.com>
References: <20261110-kn-fast-import-tests-1-v1-0-dbd9ee502aae@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="599903"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:phY+G66Tahgzd2rF49WkFWNQT8c= sha256:zLOwqdHam+ecz8+2pH6n0+6gFjBowaQ/IiItQq7Obsc=
sha1:cZ/yW97l1GECt5Cpm0qi1fyT3PM= sha256:P1tM32dkBBXiTBxIPghX4vITB/e8vfnrw3S5RSZjbwI=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id BD8B4113B5D; Tue, 10 Nov 2026 15:08:22 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.948
X-Spam-Status: No, score=-1.948 tagged_above=-9999 required=6.31
tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id vVPbnAlvUa14;
Tue, 10 Nov 2026 15:08:18 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-75062-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 6C6EC113B1B; Tue, 10 Nov 2026 15:08:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 082ED108410; Tue, 10 Nov 2026 11:55:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1794311732;
b=zky81B0Ic982y/7pahLjm4vweJ7DgT2+c5mq4jYv8od1Kn7OKiiFhXqtcZmyGBwrN1V6
ZiPfE/8o8TuCJVCHfA0EW8suSvNUNHhCfMgcBfYvH7w3uaRp4Atqfdrb4io/CzCaGiod4
wtJpQ1V3+AuvYROjZbbEIzuKkUKLcwW2QyH5iHKGOqqQm5ZAMnLDstNEML907ONmBx3gQ
Gy7YumSZnAPHxdU0Y7Pn21GUCUMM+ZhRh+MGP7p9KLnfgpdeC1gAGrB3P6XNRdpZmYjxe
D+j5vwPToSJX5oaQeTmi7dBXxBh5o3Nm6IazRH5g/AT+4qsak0M6zNZrCqJhO3cjjFw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794311732;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:Date:Subject:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Type:Content-Transfer-Encoding:Message-Id:References:
In-Reply-To:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key;
bh=EWOcfY9tLMDUzPK76cIprm0dPJVXp1eQx5+RhGaOvBo=;
b=XKfUMxF16Dg9aqxEKMh3+YmA0WiyWTJdVc9X5YBgKJd/3ZaPytk1RRA7MxP1p+/1/yIc
6QHO3+0iHsDlYZ1VvBrzApi/b6+nCX0Lq0n6Sw9Hmh4n/kaQPJ6AIOhWWeihvyr3mJAUU
b6MLF4wI2i0qMyTidCvoyWQLGHmfZLPiTQoE2Zn78Sfgi/4VA6e5dx1WuRTcW0v+p1hCH
FoDtUjqmvolPwvwBX0yc6tPP3Vylr2iBqkmVkbQLqqPzoEqDmQ8bQzel6QeuYtXKS0iis
rkBjB3NY7caKPJIOTiGRwGHSLIheuIZrZWpy8Gm51hLhGwIrZae7UlgfjcAFHpFOnVw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hgzIwDv9;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 122BB606A32A;
Tue, 10 Nov 2026 11:55:32 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hgzIwDv9
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.51
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794311731;
b=xh4/deWbQlez5b/D76FZ/TQxshYWHNl+jIuHaWIfeTZq5reAB/m64gBXqkEaXno9n4md
DiEYtxZMYaDVSiPb4xXrR8lcnRHQoFqmPcpGFu2CBly8MQcAQ2BOUMcnHCQUMCbQeaJSi
AFnq8SzT84vqYMIoSclL3VfTjTOPSLHf1jpt7qmSalFBRlg3YetzlWJByDkFb3i3PlOPh
owND6TRYIXgxhBpFsK94obghfWeCMSnB/XHBTdl8NnEnCEIMe6pEDOVcwAsyT4mHKUBzj
F2Mo59anYiBM9DVEV/ODGQ7WNI2Gg73XxQqHTeIH4XL3+Pq1MEWQtLtzZofLNM4/TCw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794311731;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:Date:Subject:
MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:
References:In-Reply-To:To:Cc:X-Mailer:X-Developer-Signature:
X-Developer-Key;
bh=EWOcfY9tLMDUzPK76cIprm0dPJVXp1eQx5+RhGaOvBo=;
b=Ywp3svh/pQZDcKtqxrDq5YqWkvmFoWQTgbLRjLm3F5ubpQ64dh1GBcyUxnd/iEfRwQHp
ig/WLhfHuTlStEdD1iQHEr9Chwjs889Mzo/UWYVXji2ELZI83T6j6q6BShf/TNm8fA23o
OT4mCeQVI72QWA+yGTCUJFOD0blcoUSQFVp2D8DgUP07uyU9JIBKODaO1ETtNjam5HhYs
g1mnFWB5JUEo3SeKYr0wys/uibYPpuuog74vVj2jYe9p54NePmi6z1Ywnu7mrRpeBm3/t
D+DHt4woLTYGB/Giq94smMA0cwixN1Z6MgI0f/86066AJbMeQNw2Np1pEtjXejt37/A==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hgzIwDv9;
arc=none smtp.remote-ip=209.85.167.51
X-Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D29CE606A31C
for <git@vger.kernel.org>; Tue, 10 Nov 2026 11:55:30 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D29CE606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-5bcdae234ecso2184583e87.3
for <git@vger.kernel.org>; Tue, 10 Nov 2026 03:55:30 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1794311729; x=1794916529; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:content-type:mime-version:subject:date:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=EWOcfY9tLMDUzPK76cIprm0dPJVXp1eQx5+RhGaOvBo=;
b=hgzIwDv9h+TYA0E1UPIfeDA2Zsc0aqIP55XrtHlVf1g3h5w39BkAEOdjl4E9feitAH
vG51jWd4sSt2GvcDtvTQgCNoyoAs+rNga0MOfOPE/Zg/GqVAcFi6/+tfxJriLKJ9f205
GlkCjf+r1ELaE6lTZSenXlLeg4PaXXdtxUsq0aWCGjW7jOyeBGZW7AMJcK/+KojyYVcE
i2ZxSHODgmIzqJFDbEaO6dXFvSMmh1uVSb5H6/obdtw5VYB6olMAMERe225kG3zmt+JK
lsy4t27WB7NtUH0Mkel0K6Nzq7Xmo2DDVy++HMTwvB0soW8QQUjq2D7nu470yeaWHlvN
HhqA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794311729; x=1794916529;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:content-type:mime-version:subject:date:from:x-gm-g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2YhaG/cOIYrQY3MraPNP0GT0ZHVKSeg
QHsfj9kNIa+eLA1Lx0U0fKRUAAxTbMJQJr2aIDFSaDvTKrlGK3GQQYOz2jbvvlgoFPKiDHwoOlh
xP9VRyQMQNXngM3/kwTePY/MQnAxj8mkoOABW39sLeBZ6rOdL6iKsiEhSiiZZAMV2dU=
X-Received: by 2002:a05:600c:3b86:b0:4a2:167a:c939 with SMTP id 5b1f17b1804b1-4ba0234e2fdmr46323265e9.21.1794311410993;
Tue, 10 Nov 2026 03:50:10 -0800 (PST)
X-Received: from [127.0.0.2] ([2a02:8109:d906:4e00:1917:82b:d709:897d])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4ba02005762sm60715995e9.2.2026.11.10.03.50.10
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 10 Nov 2026 03:50:10 -0800 (PST)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261110-kn-fast-import-tests-1-v1-0-dbd9ee502aae@gmail.com>
X-Cc: Karthik Nayak <karthik.188@gmail.com>
X-Mailer: b4 0.15.2
X-Developer-Signature: v=1; a=openpgp-sha256; l=3294; i=karthik.188@gmail.com;
h=from:subject:message-id; bh=2QqW6cr4BUMnON3kDRRxHb64H6i5xO6pNTzeo1quR04=;
b=owJ4nAHtARL+kA0DAAoBPtWfJI5GjH8ByyZiAGrzBOcnXiByWvOH0kWoveSSz5y3vFojJvTIH
lMTzNCyc25LYIkBswQAAQoAHRYhBFfOTH9jdXEPy2XGBj7VnySORox/BQJq8wTnAAoJED7VnySO
Rox/cvYMAIgPUCHFkJtp4ET9zYcQI8StqXH7E7JKq4XFZN9nsB61kWW36nwnz+qvrVbahHGCoEC
2vlMYJ7c5ZbT0naFV3rmnQegS+2huZO0U6PyCy/ZrydqoCUXt0P3rnmjUtd4mVyERgTWeEDZVKP
UN7VYcWhjkkP3NSNkZpt/6jq3bvptQdB7O5Om+ZpPPuCkD2Okuep4kLHJWAqqJ+8c9nUjaRBnVP
MWYT/16LSkjboCTvJTdRE2j6Fg+3V030BGqXtRXhK1QeH2EO4rZ1dxvN2LmFggnUXiMp2qixw7o
VK/qEg4SV2yFJUrXxpCNOt4TLcaNEaFa72cnNAb4gLn1nmxU+Y+pPieZ4bJ2mHsyvp13ialfF9P
RaLJqcSoiwiS2qw6Gjy/wfts9/EP7ybr8gLqy8t1AaMziM0nn4EaFwLmFo/kWTiz99KPYHjh4so
EqWSDJOkUOhJDyqbN0yN1ydHhfvFBdSbqSAK62tokVkaDLzm6NyJ3gKfvqRi1wjurRYFMwA05d9
Oo=
X-Developer-Key: i=karthik.188@gmail.com; a=openpgp;
fpr=57CE4C7F6375710FCB65C6063ED59F248E468C7F