From patchwork Mon Aug 28 22:52:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13368397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA5F9C83F15 for ; Mon, 28 Aug 2023 22:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234271AbjH1WxS (ORCPT ); Mon, 28 Aug 2023 18:53:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234329AbjH1WxA (ORCPT ); Mon, 28 Aug 2023 18:53:00 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 483B099 for ; Mon, 28 Aug 2023 15:52:58 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-d746ea563f9so3580029276.1 for ; Mon, 28 Aug 2023 15:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1693263177; x=1693867977; 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=8Nz/yD5Q4DmqXtQBwVf/XLqmw0aqScWrdJNHEWd7fVI=; b=P+1HRh//WTO0Fw+tx9SS2GazZAYGeuTRauZ9GwwRJ7PLIxbxMwsgEhrxV1jbIMxIGp nAl4I5z9Q21c47YXULxapuvPFNynkDspj6k3mzgmQQcA3fEsLVZ+EGik7e4t6SaaadYa fcxCW9UmEMxq3p47WqMsGEHPR9AIKhAdIM2wjNJTrSm3PFyvgxp20C1/AAK5lE15UIZQ 7V34zSsDz0Cu/Sd6BL75zDYL1lSnEh27yvf6yZb7DobPgcduybZfreCRdzYefuQErQoL NMCTcxzpU3rH/okBh8mUuoEkPqgeHJK6hbulUknxJoQp/tI9w7bbmOqgSEwbDPpgtM21 CkHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693263177; x=1693867977; 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=8Nz/yD5Q4DmqXtQBwVf/XLqmw0aqScWrdJNHEWd7fVI=; b=ZFd+4P2uF236Yg2NHx+sgraS6XcirY4NrvQEU6Wxhl37Hkasymy6JbL8jJ3X2eT/S+ L8ni1GSBuNIRby/GJSL53P7HAuWI1AcsZH/hXU/VtBYKKWL2Xe8o/gdRrb+ojJS4fF5T uwPLA4l+N2rSpOMQ8KpgiFKHVjmpewYgsPJqMW7a5N05opRsgJVFiPNzyvkkFxlT4q27 cKiKMivzR0BnPR0D/Hdmw464NCA9dZtelFoTZNvsXfl1dYEwdO5pKT9PhKCanCDJtk2P /ZiAt2epo+kYrTJgBDopYSWWTnKrPluxPbt3T79vXySvvkfBahH5htSli3fcX0zB9Elq mFQg== X-Gm-Message-State: AOJu0YybntTsvWySOAIc07DvDzCKuQamZZrXQ7P+TGh3fZWaJ4dgz97T zfiEbcZLtvDpiz45CoKfeNu/TbZ+E7TnhEddiSCkKg== X-Google-Smtp-Source: AGHT+IErFB1MpPwH8i8yRA8Ko13ffjJvk1fcmK2plx4WxNs2sgGrCz72zJGrbDNnC/ovu8EnItHnSQ== X-Received: by 2002:a25:241:0:b0:d74:6c43:f327 with SMTP id 62-20020a250241000000b00d746c43f327mr26256664ybc.10.1693263177381; Mon, 28 Aug 2023 15:52:57 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id e8-20020a256908000000b00d7497467d36sm1916786ybc.45.2023.08.28.15.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 15:52:57 -0700 (PDT) Date: Mon, 28 Aug 2023 18:52:56 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Subject: [PATCH v2 1/4] test-lib: ignore uninteresting LSan output Message-ID: <7dd42212c0b0debe40504cca474f2a5d9207155a.1693263171.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jeff King When I run the tests in leak-checking mode the same way our CI job does, like: make SANITIZE=leak \ GIT_TEST_PASSING_SANITIZE_LEAK=true \ GIT_TEST_SANITIZE_LEAK_LOG=true \ test then LSan can racily produce useless entries in the log files that look like this: ==git==3034393==Unable to get registers from thread 3034307. I think they're mostly harmless based on the source here: https://github.com/llvm/llvm-project/blob/7e0a52e8e9ef6394bb62e0b56e17fa23e7262411/compiler-rt/lib/lsan/lsan_common.cpp#L414 which reads: PtraceRegistersStatus have_registers = suspended_threads.GetRegistersAndSP(i, ®isters, &sp); if (have_registers != REGISTERS_AVAILABLE) { Report("Unable to get registers from thread %llu.\n", os_id); // If unable to get SP, consider the entire stack to be reachable unless // GetRegistersAndSP failed with ESRCH. if (have_registers == REGISTERS_UNAVAILABLE_FATAL) continue; sp = stack_begin; } The program itself still runs fine and LSan doesn't cause us to abort. But test-lib.sh looks for any non-empty LSan logs and marks the test as a failure anyway, under the assumption that we simply missed the failing exit code somehow. I don't think I've ever seen this happen in the CI job, but running locally using clang-14 on an 8-core machine, I can't seem to make it through a full run of the test suite without having at least one failure. And it's a different one every time (though they do seem to often be related to packing tests, which makes sense, since that is one of our biggest users of threaded code). We can hack around this by only counting LSan log files that contain a line that doesn't match our known-uninteresting pattern. Signed-off-by: Jeff King Signed-off-by: Taylor Blau --- t/test-lib.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/test-lib.sh b/t/test-lib.sh index 293caf0f20..5ea5d1d62a 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -334,6 +334,7 @@ nr_san_dir_leaks_ () { find "$TEST_RESULTS_SAN_DIR" \ -type f \ -name "$TEST_RESULTS_SAN_FILE_PFX.*" 2>/dev/null | + xargs grep -lv "Unable to get registers from thread" | wc -l } From patchwork Mon Aug 28 22:52:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13368393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 993A4C71153 for ; Mon, 28 Aug 2023 22:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234286AbjH1WxT (ORCPT ); Mon, 28 Aug 2023 18:53:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234335AbjH1WxE (ORCPT ); Mon, 28 Aug 2023 18:53:04 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3665799 for ; Mon, 28 Aug 2023 15:53:01 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-5922b96c5fcso44460047b3.0 for ; Mon, 28 Aug 2023 15:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1693263180; x=1693867980; 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=nF6suqJ6Q8WuyTlKIQHkPYlFwZJHpu9xa7j+9QflZDU=; b=L9yodV2QBfjoa2wzgbaGe7jKSe+ssCjgVBx84Wq8fZAj9QvFMus3zsPAjxjk0TRh1+ u/qGrmkrKRI6CoRkKlKSMeqNU4rP8njKM6QImtkF1MqAuIAjp3jRyBwAAN93tiDPBfcI 1jACLSecfR5okJktQwJVwqKXZ/VQol/EApambIz3Z55EmrVia8Le6f8rOCx1dmoUmfoR XEcPY3/tmmHN54W/Ug5wHXY7P4Vqw2CmLZgdusB3N58Aqi9KTgQqIbCz4zONvJeGlhAJ aaRN1YuHj9gEVAvx1dd+7z2Jf43bd56WELqJuBbWCVxgGOibpTZN406YI6u9OdjUsNqf lz1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693263180; x=1693867980; 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=nF6suqJ6Q8WuyTlKIQHkPYlFwZJHpu9xa7j+9QflZDU=; b=HcAuA2M1TVizjOnlNsLi1LkiSyS3cIk3zcd5c6p0NnnpM1bvv3NqopVCdOLHYJcAUo O8k1HyqP6a1QguojiUcY7t7YeCIRaCER2P/pPl5s/8IhgFcC62AP982Px1tOPUDUuoe2 MULtp50rJnmVPsPWXzcfiKsd2O+n1JMgGpcEjY3XSmdDg4U+M8zaIcgNSaZpvqaUKMRB TppkUJK9+oUc2OnNTp/0goMF5kZeYT+vKCnFDPlHuVMrT2finl9SW5XvDg5bi1oLIcxw RR5BwkveYHVl9rEL8wQmVr0SnDsfddUy0zYeB5MRxz0TYkhrt/IGdPcJGeyNZYlWXvKs ztWA== X-Gm-Message-State: AOJu0YwCoXqjJtFiO3Hwmao0OiUMwtfxLzmXzSccqYoAVXCoL/59pmk6 nTCdHPKa2gFpszGHKJgIPSdaWPW45Zpz/gIYto5ITA== X-Google-Smtp-Source: AGHT+IHvn7cxVMn4spno3ndqATPQqZWTTp+083fAQ9p6IxT6CYEhdO3VhGhIz5UdpBAW7rpjGQEhyQ== X-Received: by 2002:a81:60c2:0:b0:591:4f2b:7eea with SMTP id u185-20020a8160c2000000b005914f2b7eeamr26561743ywb.18.1693263180312; Mon, 28 Aug 2023 15:53:00 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id d15-20020a81ab4f000000b005925765aa30sm2418074ywk.135.2023.08.28.15.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 15:53:00 -0700 (PDT) Date: Mon, 28 Aug 2023 18:52:59 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Subject: [PATCH v2 2/4] leak tests: mark a handful of tests as leak-free Message-ID: <164f37cade68104e7cae7613cad833eeeb87b4f1.1693263171.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In the topic merged via 5a4f8381b6 (Merge branch 'ab/mark-leak-free-tests', 2021-10-25), a handful of tests in the suite were marked as leak-free. Since then, a handful of tests have become leak-free due to changes like - 861c56f6f9 (branch: fix a leak in setup_tracking, 2023-06-11), and - 866b43e644 (do_read_index(): always mark index as initialized unless erroring out, 2023-06-29) , but weren't updated at the time to mark themselves as such. This leads to test "failures" when running: $ make SANITIZE=leak $ make -C t \ GIT_TEST_PASSING_SANITIZE_LEAK=check \ GIT_TEST_SANITIZE_LEAK_LOG=true \ GIT_TEST_OPTS=-vi test This patch closes those gaps by exporting TEST_PASSES_SANITIZE_LEAK=true before sourcing t/test-lib.sh on most remaining leak-free tests. There are a couple of other tests which are similarly leak-free, but not included in the list of tests touched by this patch. The remaining tests will be addressed in the subsequent two patches. Helped-by: Jeff King Signed-off-by: Taylor Blau --- t/t5571-pre-push-hook.sh | 1 + t/t7516-commit-races.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh index a11b20e378..448134c4bf 100755 --- a/t/t5571-pre-push-hook.sh +++ b/t/t5571-pre-push-hook.sh @@ -4,6 +4,7 @@ test_description='check pre-push hooks' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh test_expect_success 'setup' ' diff --git a/t/t7516-commit-races.sh b/t/t7516-commit-races.sh index 2d38a16480..bb95f09810 100755 --- a/t/t7516-commit-races.sh +++ b/t/t7516-commit-races.sh @@ -1,6 +1,8 @@ #!/bin/sh test_description='git commit races' + +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh test_expect_success 'race to create orphan commit' ' From patchwork Mon Aug 28 22:53:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13368396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDA3CC83F14 for ; Mon, 28 Aug 2023 22:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234291AbjH1WxU (ORCPT ); Mon, 28 Aug 2023 18:53:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234334AbjH1WxG (ORCPT ); Mon, 28 Aug 2023 18:53:06 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC329EC for ; Mon, 28 Aug 2023 15:53:03 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-d7830c5b20aso4811333276.0 for ; Mon, 28 Aug 2023 15:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1693263183; x=1693867983; 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=LZE1PgP+/38boNpAx1097/xpf9xTwKbnXuMbbKRoWPg=; b=kMPZ7JhNWdbpB5wlMwHVFaSFuDmAH/HASBx5SNtOhanRDCpVDJFzRZmsIILDKjPVGS /nwMqzh9EzrbFat7Z83900eWwo+9UVLWt+mGrWj5NnAuRYMy8HP7UNZa7rK4QQiHqJKs iiX5lrTP7WsvyQyJHLQi1qmBj5iYu9GPLs7ro0bDbCxPImW4orAgiB63Br7UsNcaCo7z BWwxGe0u+/vcz1CdgcGY5A8niq5nmzqrGGa4Te7bPud7CatP/RbvT6zfqQ10DH9aeIyj c0gMPPM1f6cSflhWGkwFN/EGlVVTRzRzMX03Gj/iHGFDA1KLsDs1xsbOLfrdc2F3QzQX /cPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693263183; x=1693867983; 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=LZE1PgP+/38boNpAx1097/xpf9xTwKbnXuMbbKRoWPg=; b=JGYrk61IYhIv0/zO3lqklyxu7FSRmP1Z0ySViA/MjRx5JmH05r0ZJdwftx42qfUa4h aZfCWeKV0ZI4ypBI2Pq7Jy1xO2UF6zWhGfTrEzJ6gA8aVJoH0gzs/ijgUDvar9P5U8WV EX1GOyI998wuh4c0Jc2iKtz+qzvgCSSyVh3uOEX8H8QuQJJxINLb95pEwu/ygWkV/r9q ElXQOpPKc60TkPJFysHTxpOZpENKQRh8kvl1GJN6jX96MOJCANILemUyPPqryNHU9UON SOXwS+DnmhEu1w2Xad6gMHxUz/xa6RJhesNr7dzyvgg2UxlwcHfQAEkjbbWZ+RsfgWZ0 VPWQ== X-Gm-Message-State: AOJu0YyzFSl2ZN2yhR5BY8ePnszWDKEfNkLUj9+6sY5bYZfU6vTIxHEP U2uP0Hpaogyn8zdqV6hTHn/B9W9qJlrZwZjgSMGrMw== X-Google-Smtp-Source: AGHT+IGnbnov2cD4hbpUXTliMdpz26OwbQ5Y2QGNtUwlsvzQGnD9PwB9xqyn46r1tTop3n1GrNYECA== X-Received: by 2002:a25:ae04:0:b0:d0c:7309:87f7 with SMTP id a4-20020a25ae04000000b00d0c730987f7mr1282833ybj.10.1693263182897; Mon, 28 Aug 2023 15:53:02 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id p5-20020a257405000000b00d74b5e166acsm1934534ybc.10.2023.08.28.15.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 15:53:02 -0700 (PDT) Date: Mon, 28 Aug 2023 18:53:01 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Subject: [PATCH v2 3/4] leak tests: mark t3321-notes-stripspace.sh as leak-free Message-ID: <116555fc023553586ffbb88e1bdde43ca3b919a4.1693263171.git.me@ttaylorr.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This test was leak-free when t3321 was originally introduced, but never marked as such: $ rev="$(git log --format='%H' --reverse -1 HEAD^ -- t/t3321-notes-stripspace.sh)" $ git checkout $rev $ make SANITIZE=leak [...] $ make -C t GIT_TEST_PASSING_SANITIZE_LEAK=check GIT_TEST_OPTS=--immediate t3321-notes-stripspace.sh [...] # passed all 27 test(s) 1..27 # faking up non-zero exit with --invert-exit-code make: *** [Makefile:66: t3321-notes-stripspace.sh] Error 1 make: Leaving directory '/home/ttaylorr/src/git/t' Mark this test as leak-free accordingly. Signed-off-by: Taylor Blau --- t/t3321-notes-stripspace.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t3321-notes-stripspace.sh b/t/t3321-notes-stripspace.sh index 028d825e8f..36abdca5ee 100755 --- a/t/t3321-notes-stripspace.sh +++ b/t/t3321-notes-stripspace.sh @@ -5,6 +5,7 @@ test_description='Test commit notes with stripspace behavior' +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh MULTI_LF="$LF$LF$LF" From patchwork Mon Aug 28 22:53:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Blau X-Patchwork-Id: 13368395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD35CC83F18 for ; Mon, 28 Aug 2023 22:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234294AbjH1WxU (ORCPT ); Mon, 28 Aug 2023 18:53:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234336AbjH1WxJ (ORCPT ); Mon, 28 Aug 2023 18:53:09 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C71E99 for ; Mon, 28 Aug 2023 15:53:06 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-58d41109351so64933467b3.1 for ; Mon, 28 Aug 2023 15:53:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20221208.gappssmtp.com; s=20221208; t=1693263185; x=1693867985; 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=WLV4ZWApsmO0kuPIdYj0hxnbYvgZRufZuj3K65KOvuo=; b=RXcN+IFQEtkLB7LsUpwbWJk60c0XsCP0hTWhJKSVzPr8CzV7P1LML4qf1cjnxlBl5N 60Es61S9qkVFftE9YTjYBE5UwQwVef1fd3JI697bPRSfhYwqB/UC+/aZppD2aziHX9At rX6krGzkqloHUoq/aXtc8B5tUEJ2sM14vnRUXtH1J8KQg0cMye2oUzyw5OMINAQkREvz E/n2lI5QvuPdEy0ayOxJbX4VocIJ9X6pAzZ67Vxrz59mNbmP6n9UxFMeHDPtQI+kwGNR YpGt2lnbxfn5uBL7k+f8sn7Ssch//0aN7aSYC/VAeEBhzVvPx10l95vEtmEvP7ILUrvk uMgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693263185; x=1693867985; 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=WLV4ZWApsmO0kuPIdYj0hxnbYvgZRufZuj3K65KOvuo=; b=VylyCokUXFomQK0NX/OuUhsMIhkAqr1RC1j+GQuj2IsAC04xHagCTOjvAshEWMf43Q I72u+Vhc8loBUtKe2S8hN+tQXala8nTXDR0C06qaWH4/VPbQxxA4TE1GGqifFOk/SlHM zNhxhM1rIdkSsW3DBHp09CJecKd4KrG0lL+PqA3Rrzu11BAzc48CNq3dlpbK+3l85aNO TsgIdTzZHCFsGWTcsGlZyphrgQM1YS9ZgnMzL/qWs0QnQfljlPWrMCb45QYVYEKy1kJj bu5T0ks/78NxYfAIBRt6HE8pwlaT63X0aUYV8P1gRy6TAOUGFs+/rXkUX6IZfsEpJJHD q9fA== X-Gm-Message-State: AOJu0YxJ3LdIWOJN94FK91p5p6FbkHlXsXEbc9TK5HzyxCiGG20LRH4/ s9WWgDdoksRYssoGJTVBGqRBI94XrJI0lOvi8t1Yjw== X-Google-Smtp-Source: AGHT+IEZJnNNXWIIp713bJ2rRAAX3h6V1Pk9EE1fcTNa+UxoLfdorOIbr9m8DGUzV6X7jHG6xF6o5g== X-Received: by 2002:a0d:dd0f:0:b0:586:b0ad:18fa with SMTP id g15-20020a0ddd0f000000b00586b0ad18famr1059807ywe.25.1693263185454; Mon, 28 Aug 2023 15:53:05 -0700 (PDT) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id eb6-20020a05690c26c600b00594fb0e2db3sm1516842ywb.138.2023.08.28.15.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 15:53:05 -0700 (PDT) Date: Mon, 28 Aug 2023 18:53:04 -0400 From: Taylor Blau To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Subject: [PATCH v2 4/4] leak tests: mark t5583-push-branches.sh as leak-free Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org When t5583-push-branches.sh was originally introduced via 425b4d7f47 (push: introduce '--branches' option, 2023-05-06), it was not leak-free. In fact, the test did not even run correctly until 022fbb655d (t5583: fix shebang line, 2023-05-12), but after applying that patch, we see a failure at t5583.8: ==2529087==ERROR: LeakSanitizer: detected memory leaks Direct leak of 384 byte(s) in 1 object(s) allocated from: #0 0x7fb536330986 in __interceptor_realloc ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:98 #1 0x55e07606cbf9 in xrealloc wrapper.c:140 #2 0x55e075fb6cb3 in prio_queue_put prio-queue.c:42 #3 0x55e075ec81cb in get_reachable_subset commit-reach.c:917 #4 0x55e075fe9cce in add_missing_tags remote.c:1518 #5 0x55e075fea1e4 in match_push_refs remote.c:1665 #6 0x55e076050a8e in transport_push transport.c:1378 #7 0x55e075e2eb74 in push_with_options builtin/push.c:401 #8 0x55e075e2edb0 in do_push builtin/push.c:458 #9 0x55e075e2ff7a in cmd_push builtin/push.c:702 #10 0x55e075d8aaf0 in run_builtin git.c:452 #11 0x55e075d8af08 in handle_builtin git.c:706 #12 0x55e075d8b12c in run_argv git.c:770 #13 0x55e075d8b6a0 in cmd_main git.c:905 #14 0x55e075e81f07 in main common-main.c:60 #15 0x7fb5360ab6c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #16 0x7fb5360ab784 in __libc_start_main_impl ../csu/libc-start.c:360 #17 0x55e075d88f40 in _start (git+0x1ff40) (BuildId: 38ad998b85a535e786129979443630d025ec2453) SUMMARY: LeakSanitizer: 384 byte(s) leaked in 1 allocation(s). This leak was addressed independently via 68b51172e3 (commit-reach: fix memory leak in get_reachable_subset(), 2023-06-03), which makes t5583 leak-free. But t5583 was not in the tree when 68b51172e3 was written, and the two only met after the latter was merged back in via 693bde461c (Merge branch 'mh/commit-reach-get-reachable-plug-leak', 2023-06-20). At that point, t5583 was leak-free. Let's mark it as such accordingly. Signed-off-by: Taylor Blau --- t/t5583-push-branches.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t5583-push-branches.sh b/t/t5583-push-branches.sh index e7e1b6dab6..320f49c753 100755 --- a/t/t5583-push-branches.sh +++ b/t/t5583-push-branches.sh @@ -5,6 +5,7 @@ test_description='check the consisitency of behavior of --all and --branches' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh delete_refs() {