From patchwork Wed Jan 10 17:55:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13516368 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 ADF904D135 for ; Wed, 10 Jan 2024 17:55:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ttaylorr-com.20230601.gappssmtp.com header.i=@ttaylorr-com.20230601.gappssmtp.com header.b="HpatuzkD" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-67f8d9fe99fso29455666d6.2 for ; Wed, 10 Jan 2024 09:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20230601.gappssmtp.com; s=20230601; t=1704909332; x=1705514132; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6iUMd0d/pviYe4gTvkVDLCNxjOk5mMN6jQaheKj99ic=; b=HpatuzkDg+d1g9awyc780B5vo3LrBJ5H8hc+e4q5pEWmdd3b6j20hfwNmPF02iVUze JzysyYUTXEZLNrfHFe+61qY/EwxYu+JBR69BimGe4bmIc+lnGxPIXEgtRPtmukI/wTMH PiVGRjEkKIK6dICVjufJC1vQidj25DW5fcQ6HnIxaO/lMCzqUS1D1tKpNihSz7jiXFHu tGJtr51dcAjhIWwgBQOfsWYST20UknyTpU2TLN9DBtnLK/iExGl7crc7qVWp3xTnJL9j XfAEtuL2OzdjNY9xSXqIVpd6JZUsHWgebk8U+G0kpH5POQXDJv52MKPK6IEC1/tfWvAS nrAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704909332; x=1705514132; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6iUMd0d/pviYe4gTvkVDLCNxjOk5mMN6jQaheKj99ic=; b=JU5kb6DJsF2yEqkXjCavEJzm6FJOz2s6gdYJa54CIXfFJDfzmSueG5orXIBZJBByKW R44EXHFg9+nF+o3dzgVTn5/JZLYSH9g2vm1j3+s5OR2fXa31/x34Juz49GeoGepSJoe6 +bUlVPxh1mMAczMkQhLUXKZOnqBw44g7L6zJNvUyiwIiHKmNbQTbsYsazm3wLYon917H nTCYuQpv/P1mZ2WM7lUgUM0XX1hui3SZRshgjDLhxJewi9n3BdoVBCqCe/CPv+QdnL5x mZJNigYKcgvMOOGc7koIWwwMTPx5o5pbFB9Vn1qg76zYVadlyRPLidhhuXI9lwZFQ9Jn 7KSw== X-Gm-Message-State: AOJu0YwOHsgb/Jx5c/zFIaD72wdBtxY8F/yqvLHDIcbd/NfLeci7jbql Q05+MzsHpOHr0VW8XZtlZLM4znkKFMOWwuljRsGS20Xd+6ndrg== X-Google-Smtp-Source: AGHT+IFbGnldD4zDChCKISOGy2Cq27nR7FAVOoGukA6SRDC0j+5EmxLVAa+e8w6xURUmWUCiZbLOGA== X-Received: by 2002:a05:6214:1c05:b0:681:1ada:a418 with SMTP id u5-20020a0562141c0500b006811adaa418mr1686656qvc.104.1704909332136; Wed, 10 Jan 2024 09:55:32 -0800 (PST) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id kj1-20020a056214528100b0067f4e2ad746sm1870317qvb.44.2024.01.10.09.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 09:55:31 -0800 (PST) Date: Wed, 10 Jan 2024 12:55:30 -0500 From: Taylor Blau To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH 1/5] t5309: run expected-to-fail `index-pack`s with `--threads=1` Message-ID: <588de2e4f16ab090ff477088084e0b81d9615ec5.1704909216.git.me@ttaylorr.com> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The t5309 script triggers a racy false positive with SANITIZE=leak on a multi-core system. Running with "--stress --run=6" usually fails within 10 seconds or so for me, complaining with something like: + git index-pack --fix-thin --stdin fatal: REF_DELTA at offset 46 already resolved (duplicate base 01d7713666f4de822776c7622c10f1b07de280dc?) ================================================================= ==3904583==ERROR: LeakSanitizer: detected memory leaks Direct leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7fa790d01986 in __interceptor_realloc ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:98 #1 0x7fa790add769 in __pthread_getattr_np nptl/pthread_getattr_np.c:180 #2 0x7fa790d117c5 in __sanitizer::GetThreadStackTopAndBottom(bool, unsigned long*, unsigned long*) ../../../../src/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp:150 #3 0x7fa790d11957 in __sanitizer::GetThreadStackAndTls(bool, unsigned long*, unsigned long*, unsigned long*, unsigned long*) ../../../../src/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp:598 #4 0x7fa790d03fe8 in __lsan::ThreadStart(unsigned int, unsigned long long, __sanitizer::ThreadType) ../../../../src/libsanitizer/lsan/lsan_posix.cpp:51 #5 0x7fa790d013fd in __lsan_thread_start_func ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:440 #6 0x7fa790adc3eb in start_thread nptl/pthread_create.c:444 #7 0x7fa790b5ca5b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 SUMMARY: LeakSanitizer: 32 byte(s) leaked in 1 allocation(s). Aborted What happens is this: 0. We construct a bogus pack with a duplicate object in it and trigger index-pack. 1. We spawn a bunch of worker threads to resolve deltas (on my system it is 16 threads). 2. One of the threads sees the duplicate object and bails by calling exit(), taking down all of the threads. This is expected and is the point of the test. 3. At the time exit() is called, we may still be spawning threads from the main process via pthread_create(). LSan hooks thread creation to update its book-keeping; it has to know where each thread's stack is (so it can find entry points for reachable memory). So it calls pthread_getattr_np() to get information about the new thread. That may allocate memory that must be freed with a matching call to pthread_attr_destroy(). Probably LSan does that immediately, but if you're unlucky enough, the exit() will happen while it's between those two calls, and the allocated pthread_attr_t appears as a leak. This isn't a real leak. It's not even in our code, but rather in the LSan instrumentation code. So we could just ignore it. But the false positive can cause people to waste time tracking it down. It's possibly something that LSan could protect against (e.g., cover the getattr/destroy pair with a mutex, and then in the final post-exit() check for leaks try to take the same mutex). But I don't know enough about LSan to say if that's a reasonable approach or not (or if my analysis is even completely correct). One approach to papering over this issue (short of LSan fixing it upstream) is to make the creation of work threads "atomic", i.e. by spawning all of them before letting any of them start to work. This shouldn't make any practical difference for non-LSan runs. The thread spawning is quick, and could happen before any worker thread gets scheduled anyway. But that requires us to tweak production code (albeit at a negligible cost) in order to appease LSan in this narrow circumstance. Another approach is to simply run these expected-to-fail `index-pack` invocations with `--threads=1` so that we bypass the above issue entirely. The downside of that approach is that the test doesn't match our production code as well as it did before (where we might have run those same `index-pack` invocations with >1 thread, depending on how many CPUs the testing machine has). The risk there is that we might miss a regression that would leave us in an inconsistent state. But that feels rather unlikely in practice, and there are many other tests related to `index-pack` in the suite. Original-patch-by: Jeff King Signed-off-by: Taylor Blau --- t/t5309-pack-delta-cycles.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t5309-pack-delta-cycles.sh b/t/t5309-pack-delta-cycles.sh index 4e910c5b9d..4100595c89 100755 --- a/t/t5309-pack-delta-cycles.sh +++ b/t/t5309-pack-delta-cycles.sh @@ -44,7 +44,7 @@ test_expect_success 'index-pack detects missing base objects' ' pack_obj $A $B } >missing.pack && pack_trailer missing.pack && - test_must_fail git index-pack --fix-thin --stdin cycle.pack && pack_trailer cycle.pack && - test_must_fail git index-pack --fix-thin --stdin recoverable.pack && pack_trailer recoverable.pack && - test_must_fail git index-pack --fix-thin --stdin X-Patchwork-Id: 13516369 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (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 C49504D5A4 for ; Wed, 10 Jan 2024 17:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ttaylorr-com.20230601.gappssmtp.com header.i=@ttaylorr-com.20230601.gappssmtp.com header.b="0aLS7oiW" Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-78104f6f692so359624785a.1 for ; Wed, 10 Jan 2024 09:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20230601.gappssmtp.com; s=20230601; t=1704909335; x=1705514135; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=m6SeAM3pmHZUNXyHKrPaR6yrgE2UjSNVt5yWi9JQboY=; b=0aLS7oiWk3WBJmhcWLCOzDIO2y3SlKM0EvqTIJt+wZh4fzKMSyZoyXCfkn9qacbpzD i7ESJX3+D/SqfLnvBz+JSTxRvkpUXF+rWj1x71rlBbp/jjBVhlor2WoZ/sFv6x9iB9Am Nw4yRRkhyLI+RPRwmlDrSUUdp4H7F8OxvJnVhUt1jXQ0Uba1PJX0hfODrdtvNUbZX27V 8gmTRu/32nVDdRpKJ3R87ccihRmGtIIOwLkdUb2qeZnZlaRyLRuKUUMFXwbToeG73Rdx HDttkCPH++F3jL3v7OrJKpL9eCo3iAo6H/TllrAqP0JQ7kcdw/08oeIelGBoktmTpMBx VlUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704909335; x=1705514135; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=m6SeAM3pmHZUNXyHKrPaR6yrgE2UjSNVt5yWi9JQboY=; b=M2QXqnyQzAExcdVHJNrBOmOhbkquh330wAbPBdqNjLTY/6V4UT/Qgc+0Hrbx1wkb5M VpBg7Xgzsk2NAWDIV4fJYr9QIHTY+cULvxA8MLgf12nMjCMO/7fP94T95wjDn6s+SktY SF28csg3esSCCBvsfF0kcNwuauYMDUc2kKizS2nmw1ux+wq5v2yZVTJkBxNkBCgABXoV 94UnkKOrLb5f0Zxum0lw0iqWWQz3MdXaxNzi+nMVoo2PMwI2xo/Hrdwrzos9l6u4iBqh wcV8XH3ZpwX92vG7bDhp49m8pudLu2yB0BxNcXfYcXaiYqoqDm9M3R5Nq5wV0HvAf2EY fLRg== X-Gm-Message-State: AOJu0YzLmJIZ0IG/hKRXJp3+8mz1TCGYbE9/NSC1PsZU7Quzdwzbv9Es taKOWJyhwxlXOr/ZKAaOR84h8mzLtstC1Bq1JCg8QQTbmUoCEQ== X-Google-Smtp-Source: AGHT+IEvbU+axw3E+Rkyoxoee6rkZesB/YXZpTA9Vx7uVa41lOXaSZIfWUYdRAMYdUUX9UbUxGpoVA== X-Received: by 2002:a05:620a:2984:b0:781:6821:2737 with SMTP id r4-20020a05620a298400b0078168212737mr781087qkp.53.1704909335124; Wed, 10 Jan 2024 09:55:35 -0800 (PST) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id a15-20020a05620a02ef00b0078325452a32sm1772512qko.28.2024.01.10.09.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 09:55:34 -0800 (PST) Date: Wed, 10 Jan 2024 12:55:33 -0500 From: Taylor Blau To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH 2/5] t5302: run expected-to-fail `index-pack`s with `--threads=1` Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: For identical reasons as in the previous commit, apply the same treatment to expected-to-fail `index-pack` invocations in t5302 with `--threads=1`. (Note that this treatment only needs to be applied in tests which are expected to pass when built with the leak-checker enabled). Signed-off-by: Taylor Blau --- t/t5302-pack-index.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index d88e6f1691..fdbcd80f89 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -290,7 +290,7 @@ test_expect_success 'too-large packs report the breach' ' pack=$(git pack-objects --all pack err && + test_must_fail git index-pack --threads=1 --max-input-size=20 pack-$pack.pack 2>err && grep "maximum allowed size (20 bytes)" err ' From patchwork Wed Jan 10 17:55:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13516370 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.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 83C444D594 for ; Wed, 10 Jan 2024 17:55:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ttaylorr-com.20230601.gappssmtp.com header.i=@ttaylorr-com.20230601.gappssmtp.com header.b="yyHBOtqd" Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-680d4584a81so35561206d6.1 for ; Wed, 10 Jan 2024 09:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20230601.gappssmtp.com; s=20230601; t=1704909338; x=1705514138; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2dOkZsTsOFQEblTAxi1gmTvocVfTF9neXhlvxTQtV4w=; b=yyHBOtqdv77FVewkv/9DSHu1B/3in6zqqkq4NK56tCiDT5EEXoyn31GrV8OJxi1z08 P9lVMwx1RQEcegWD+7tOD5ckQbKcBZPKoZ+5xjBAxG37Wc4BU0beLOcAQPv38j/1qbI0 cBbranYIPFOuw+xifnARzOARilz0E1KZJc+cPexN0SptLK/Hm7W/0Ge67ABBr1PCZkY1 wopsPTH2JoyqUn6lTcbVmsnmU/FKQdZsZOWusxSNkRFeTk/+1z+9BonE5KFxflHgpxIC PXEeGe7pPh8eUg0Yxt7yt/gkoj0jlysh/gWX/Ht3rguAgJZ2ff+yXLV/+1TJjNa6kt/X 2frA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704909338; x=1705514138; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2dOkZsTsOFQEblTAxi1gmTvocVfTF9neXhlvxTQtV4w=; b=toizYX71jTROHNhXze4fNypRbCd/mOQ04oc37lB61/gDEDaU4jhiuxRv+23C3IvfHc AngVODwctBM9ZIFn81ZpP3i/nKlH/YtVe9DqRHW+sH8t/WSzU/iZ9xZTLUY3vrEatj0f znlMAEQaMDP/e49NZn0ywJCZaqqvQleShGuXYu8EG6qYc9VD6KJ9uxrbOznMqYNl+kyw dq53dVLgCSMxWQb4V9xGoUwZHrLlVzayRFVIqQManvTdSBpeAhgMK3TJ+naGO/hGdOJC Y5qwFKxDWcae+LOIEnbTJcVVi2Q09MJphc5f1N+PSPijObdOf59vJsivLZIcwPEEd+5f VuEQ== X-Gm-Message-State: AOJu0YxfGB0pqtaaj6xUqqVw4lmBBKgFIJpiG/FP/1a4zcmy/suj7en5 /2pmG1ykPuYNyaH6oEYNMfia8/HZnjmXYQdc4ChyGv3mea0gsw== X-Google-Smtp-Source: AGHT+IGCVZUVOZdnOcK/Qw/f582bd53Swj6alHBS5hSQ8zmEhos//vWmAzbugDTTRb1TI11Tqt157A== X-Received: by 2002:a05:6214:29c7:b0:680:d2a6:8282 with SMTP id gh7-20020a05621429c700b00680d2a68282mr612794qvb.24.1704909338259; Wed, 10 Jan 2024 09:55:38 -0800 (PST) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id p3-20020a0cfd83000000b00680c7c14d4bsm1883571qvr.129.2024.01.10.09.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 09:55:38 -0800 (PST) Date: Wed, 10 Jan 2024 12:55:37 -0500 From: Taylor Blau To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH 3/5] t5308: run expected-to-fail `index-pack`s with `--threads=1` Message-ID: <0170befabd160bd98a32372f14b5e1e9bbcb1069.1704909216.git.me@ttaylorr.com> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: For identical reasons as in the previous commit, apply the same treatment to expected-to-fail `index-pack` invocations in t5308 with `--threads=1`. Signed-off-by: Taylor Blau --- t/t5308-pack-detect-duplicates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5308-pack-detect-duplicates.sh b/t/t5308-pack-detect-duplicates.sh index 655cafa054..5df552a42e 100755 --- a/t/t5308-pack-detect-duplicates.sh +++ b/t/t5308-pack-detect-duplicates.sh @@ -76,7 +76,7 @@ test_expect_success 'lookup in duplicated pack' ' test_expect_success 'index-pack can reject packs with duplicates' ' clear_packs && create_pack dups.pack 2 && - test_must_fail git index-pack --strict --stdin X-Patchwork-Id: 13516371 Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 5721A4E1D5 for ; Wed, 10 Jan 2024 17:55:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ttaylorr-com.20230601.gappssmtp.com header.i=@ttaylorr-com.20230601.gappssmtp.com header.b="eHzcweNH" Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-5f0c0ca5ef1so45296807b3.2 for ; Wed, 10 Jan 2024 09:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20230601.gappssmtp.com; s=20230601; t=1704909341; x=1705514141; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Ld0lXnybPOa+fO1nd5leKrxwaScb8pVs0NekyPyU4rc=; b=eHzcweNHqw8bukIVLIYhA5YnQPL6ut6Ervj3r5kdsXSEPhmkZrbdvTHQ/5uhhWO4re mWBIEFbXUfiz4tDGT3tQ/LDHgd/t8GSszrOOBLstxUQWYsfYdwFLzrkkCtuysH8VbtUi D3ux0I2fT8CIMuTF7LuUDSC1Ay4yY4A70c1tjUJxqGW7V/xpVBDmdbTyKJ76Uj1Xp1Kn Uyx6hqMEvWVEYcDPb3SVSS5vdgdwe8LeaqJ5IItrsvPxeOaJqahgqLMVxjO9yzG8DH2q u+Yb5E/+daA1Kg8FoxHEeXPka2JkXnKO8a8qAlW1WRR/jzXfLk9gLKW65J3IFJ5PR8t8 /HVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704909341; x=1705514141; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ld0lXnybPOa+fO1nd5leKrxwaScb8pVs0NekyPyU4rc=; b=MevVuSaDK8FKVaP3xNcEplwhiy7kHyPqEZtL0b8tggy/jTFgYWdY8v1uwZEafrMmUk uEWhvIeYSQSB7rkTHDno+q3u5ZYeCtzewFKZWExsozsPSarfbhQey8Ihv6bsMA3de3Rd kXbMKdcfqSvvNhXdfs+Fv7NN7I/+x/qEjeoKVuJcbdzxywSt/l3DlEQKWfBWDYLBcKvs zGEwk/vAryDOdEHd9j84XgoX3rAqbBjAYsinVGWJ4BdwOjharFPVmH+OEUmbRKG34zhM /95J9Cg2BG7oyBc5muq8+Wj1Z9LIdXRQp5lgehpzqc1bJZukvnZlYHv4QlgszF3q6NBT kYBg== X-Gm-Message-State: AOJu0YwxjjWLJz+yxFb9pT0JQax7NYAcvw4rEa3oEpl8GoFLe3WGi5oK AZCzVBkFMKzBWUJgpALTuCrc7O/n8DkWs9/XSX0dZ/NNrnz/ag== X-Google-Smtp-Source: AGHT+IHi1HEyWMw8bgkg7W522H+bZODCsvMX8ggbc+w/2GI7rBBJVlcqzTvCK/NsiqZ2M8vxlphQ0Q== X-Received: by 2002:a0d:df82:0:b0:5e7:b0e9:625 with SMTP id i124-20020a0ddf82000000b005e7b0e90625mr1398881ywe.47.1704909341023; Wed, 10 Jan 2024 09:55:41 -0800 (PST) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id pe30-20020a05620a851e00b00781baa4db60sm1755824qkn.66.2024.01.10.09.55.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 09:55:40 -0800 (PST) Date: Wed, 10 Jan 2024 12:55:39 -0500 From: Taylor Blau To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH 4/5] t5313: run expected-to-fail `index-pack`s with `--threads=1` Message-ID: <4477fc49b0e7ca9a1d973ff156d267676716bd8a.1704909216.git.me@ttaylorr.com> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: For identical reasons as in the previous commit, apply the same treatment to expected-to-fail `index-pack` invocations in t5313 with `--threads=1`. Signed-off-by: Taylor Blau --- t/t5313-pack-bounds-checks.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t5313-pack-bounds-checks.sh b/t/t5313-pack-bounds-checks.sh index ceaa6700a2..e9829b6ef3 100755 --- a/t/t5313-pack-bounds-checks.sh +++ b/t/t5313-pack-bounds-checks.sh @@ -91,7 +91,7 @@ test_expect_success 'pack/index object count mismatch' ' # ...and make sure that index-pack --verify, which has its # own reading routines, does not segfault. - test_must_fail git index-pack --verify $pack + test_must_fail git index-pack --threads=1 --verify $pack ' test_expect_success 'matched bogus object count' ' @@ -111,7 +111,7 @@ test_expect_success 'matched bogus object count' ' git cat-file blob $object >actual && test_cmp file actual && - test_must_fail git index-pack --verify $pack + test_must_fail git index-pack --threads=1 --verify $pack ' # Note that we cannot check the fallback case for these @@ -128,7 +128,7 @@ test_expect_success 'bogus object offset (v1)' ' munge $idx $((4 * 256)) "\377\0\0\0" && clear_base && test_must_fail git cat-file blob $object && - test_must_fail git index-pack --verify $pack + test_must_fail git index-pack --threads=1 --verify $pack ' test_expect_success 'bogus object offset (v2, no msb)' ' @@ -136,7 +136,7 @@ test_expect_success 'bogus object offset (v2, no msb)' ' munge $idx $(ofs_table 1) "\0\377\0\0" && clear_base && test_must_fail git cat-file blob $object && - test_must_fail git index-pack --verify $pack + test_must_fail git index-pack --threads=1 --verify $pack ' test_expect_success 'bogus offset into v2 extended table' ' @@ -144,7 +144,7 @@ test_expect_success 'bogus offset into v2 extended table' ' munge $idx $(ofs_table 1) "\377\0\0\0" && clear_base && test_must_fail git cat-file blob $object && - test_must_fail git index-pack --verify $pack + test_must_fail git index-pack --threads=1 --verify $pack ' test_expect_success 'bogus offset inside v2 extended table' ' @@ -169,7 +169,7 @@ test_expect_success 'bogus offset inside v2 extended table' ' mv tmp "$idx" && clear_base && test_must_fail git cat-file blob $object && - test_must_fail git index-pack --verify $pack + test_must_fail git index-pack --threads=1 --verify $pack ' test_expect_success 'bogus OFS_DELTA in packfile' ' From patchwork Wed Jan 10 17:55:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13516372 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (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 E44854E1DC for ; Wed, 10 Jan 2024 17:55:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ttaylorr.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ttaylorr-com.20230601.gappssmtp.com header.i=@ttaylorr-com.20230601.gappssmtp.com header.b="bxKqW1d5" Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-78314e00350so394242385a.1 for ; Wed, 10 Jan 2024 09:55:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20230601.gappssmtp.com; s=20230601; t=1704909343; x=1705514143; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mUW3EvxsaOgQnm91hC/Mf09e44n4GjdPJiii+Nt+qXk=; b=bxKqW1d5Tc5PkhUmlvnuzVfCqC/EjGuW/dZQjJo6rVp7QO9Spozx1QX9ZG+9T2eT5w NuFcrNa2i4POcFGGJL4jYClYQcHstTVaOv3mBD//hbslzkjJQtTVib+z+MaaVS0FBt94 YOGPFm6zaYW7FKh+/l6KeHvQRBCu8BCOKEBFL8s6q/xWI5XGHasD9HREZASh8GiyPZM8 9z5h6fU3HbJescu5xyKgG2Aau23IPQIaOcZPTptuYdjitjKZCs4WAscHKLftAcS9uu3X 1PWUWTuFix6cRLWUWnIGZ/eDWq+cvqkcw8JE5CbaSLFPJK4vDVHh4bt+Bk18cd3IoQ65 G6Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704909344; x=1705514144; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mUW3EvxsaOgQnm91hC/Mf09e44n4GjdPJiii+Nt+qXk=; b=FsPP/MVZOxywxWRFQ+Vm4yZN5exwmTqq4gdlW1em9JYED02tgr2xrR7kNLKsdiFDvT 4A5X15S21tmUcD2Qtn4Gvpa5T17duWjT5rMt0RRWXdqCkOPNU80K0tNNHg6Px2k1owY1 b+P4jzXxXaFQabQkjO135ZxcEZhgxpiAHViy39D91JMZMtR9mwupziVJ0DtmneBh5L/8 bLJQVsVbLV5wkN9Rfgylsaa3LQtHEk3SsIwq+mTH0Iplm3KR6KR2NizsQAVcJAZG4/BI VTszxAMH065O9kQyta3E99lVipcNIwX94pWI9kdaBTkYqPlQXOgIQESCBkBoGeadUf3A kOyw== X-Gm-Message-State: AOJu0YztSw9QiqV13SfE8+BRpM/14iGe9AJ7XZ0T6+tFvRpdal2NQZKz xsbfq25Hn7JlybrnW/4C4P1bClSsGnvOB+HE6RgwlJ9l+GvbQQ== X-Google-Smtp-Source: AGHT+IHH/5Lh5CLlplVF24gILFyBXAD5G5I8+mGv0yvQphH1z/sZR67M31FI/UB/68ac8yB2jmy+SQ== X-Received: by 2002:ac8:7c52:0:b0:429:9a70:9932 with SMTP id o18-20020ac87c52000000b004299a709932mr1681078qtv.85.1704909343736; Wed, 10 Jan 2024 09:55:43 -0800 (PST) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id cp6-20020a05622a420600b004280cad48basm1937124qtb.77.2024.01.10.09.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 09:55:43 -0800 (PST) Date: Wed, 10 Jan 2024 12:55:42 -0500 From: Taylor Blau To: git@vger.kernel.org Cc: Jeff King , Junio C Hamano Subject: [PATCH 5/5] t5325: run expected-to-fail `index-pack`s with `--threads=1` Message-ID: <7d0017342d4f9f81a1ec74ab02aac0d3d44d38ff.1704909216.git.me@ttaylorr.com> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: For identical reasons as in the previous commit, apply the same treatment to expected-to-fail `index-pack` invocations in t5325 with `--threads=1`. Signed-off-by: Taylor Blau --- t/t5325-reverse-index.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5325-reverse-index.sh b/t/t5325-reverse-index.sh index 431a603ca0..dc3d2235e8 100755 --- a/t/t5325-reverse-index.sh +++ b/t/t5325-reverse-index.sh @@ -64,7 +64,7 @@ test_expect_success 'index-pack can verify reverse indexes' ' chmod u+w $rev && printf "xxxx" | dd of=$rev bs=1 count=4 conv=notrunc && - test_must_fail git index-pack --rev-index --verify \ + test_must_fail git index-pack --threads=1 --rev-index --verify \ $packdir/pack-$pack.pack 2>err && grep "validation error" err '