From patchwork Mon Dec 9 16:09:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11279675 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C336413B6 for ; Mon, 9 Dec 2019 16:10:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A07F8207FF for ; Mon, 9 Dec 2019 16:10:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oikF3ZGD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726483AbfLIQKI (ORCPT ); Mon, 9 Dec 2019 11:10:08 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39617 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfLIQKI (ORCPT ); Mon, 9 Dec 2019 11:10:08 -0500 Received: by mail-wr1-f67.google.com with SMTP id y11so16806448wrt.6 for ; Mon, 09 Dec 2019 08:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=pfn0Wbyas+epD+7PkfHj1Q6CsjnDLoQMW5oNeHuZuqk=; b=oikF3ZGDovZr9wcDhfRevkpxNy3NM8fXrpNGOBT2gF6grz5zTP7Bu7E4sfrqe7arT+ lDDp5doH8xkynClfeE6IfleOmLHiJuXvoSIARYqwz1E3ih770aZxoo+YJtw0X+tkWM1B IzHbVUPZEsZSNNPSJzaJCIApxZ2WlZmH1+QFrxyZluLLytn5kb3PUtBfH8lpWSFShfkB vSzpZp0SuUc2KYbdGtyOBWBHntWLldq8VDSNHzIkCkAOMPcyn9ZlCp8ptH2Bmaa6CXrf 5KdUeSskdsj2o16PRc0Pk0OYcbO1HpNOThrkduUHbIPEYgRJK0IhTt2CiFB5PyjapiS1 CHBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=pfn0Wbyas+epD+7PkfHj1Q6CsjnDLoQMW5oNeHuZuqk=; b=dJHau7WTk0nCsNDQC8Qj0RksVU40KKzzwRCNLhgA4sveV+bOjzDsGtER9dOFp2FGxY r4m4JJ+wL+TMuUGqE2CrvhKUXVKYDsShZlxFg/trPLLYMApU3IDSKYGzO1O/pSgiqEfK 1CQJbk1NAkJ+jdMa9TXmt9DLNrmlRDzWuPvJggc852zNmlP2TxdlnZf0WpYFjGNGrjLg IQ6Eg9r4P9tFw5cjP5pjV+2gaMY+ZK24b9zdqNomjXfDxnWH9GpwG54yJnY8kxWBvNAU cnGj0OTSDnvgDr+DMdoLuxg5Z7hvxn9hFgFoCZtthy7Sv/7PuKsHNadYQxAVX0F6QfU5 f4kg== X-Gm-Message-State: APjAAAWgV7dMkyg8HSrKkxa/p3sujittIdn8T/Cr2YWdpO9Vn++Gda+a nSrcwfgyllO3LN/QuV3i2uPXVMh8 X-Google-Smtp-Source: APXvYqwjp/SbL6x5/H70JAX0d3ysgzp38X2ZhVtQyuDM7oTEl8ASjrrTSCjK9GPQWTiaYvCPys/tBQ== X-Received: by 2002:adf:f70b:: with SMTP id r11mr3206136wrp.388.1575907806276; Mon, 09 Dec 2019 08:10:06 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id x132sm306868wmg.0.2019.12.09.08.10.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 08:10:05 -0800 (PST) Message-Id: <79bb4c8e7d74c9c85cd6e6616811fc9a2e7c0afa.1575907804.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Mon, 09 Dec 2019 16:09:57 +0000 Subject: [PATCH v2 1/8] fsmonitor: disable in a bare repo Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: szeder.dev@gmail.com, ukshah2@illinois.edu, Kevin.Willford@microsoft.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee The fsmonitor feature allows an external tool such as watchman to monitor the working directory. The direct test t7619-status-fsmonitor.sh provides some coverage, but it would be better to run the entire test suite with watchman enabled. This would provide more confidence that the feature is working as intended. If the repository is bare, then there is no working directory to watch. Disable the core_fsmonitor global in this case. Before this change, the test t0003-attributes.sh would fail with GIT_TEST_FSMONITOR pointing to t/t7519/fsmonitor-watchman. Signed-off-by: Derrick Stolee --- config.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.c b/config.c index 3900e4947b..f6d4e2fae3 100644 --- a/config.c +++ b/config.c @@ -2339,6 +2339,11 @@ int git_config_get_max_percent_split_change(void) int git_config_get_fsmonitor(void) { + if (!the_repository->worktree) { + core_fsmonitor = 0; + return 0; + } + if (git_config_get_pathname("core.fsmonitor", &core_fsmonitor)) core_fsmonitor = getenv("GIT_TEST_FSMONITOR"); From patchwork Mon Dec 9 16:09:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11279677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C0F613B6 for ; Mon, 9 Dec 2019 16:10:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FFC720692 for ; Mon, 9 Dec 2019 16:10:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s01U2OfS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726584AbfLIQKK (ORCPT ); Mon, 9 Dec 2019 11:10:10 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39619 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbfLIQKJ (ORCPT ); Mon, 9 Dec 2019 11:10:09 -0500 Received: by mail-wr1-f67.google.com with SMTP id y11so16806505wrt.6 for ; Mon, 09 Dec 2019 08:10:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=ymnkwB7JOEvPi7Ws+rA1Lp/Cyqkxn5JphfBC72RMmsI=; b=s01U2OfSM1M3kxxLoYTRlUuOyBilYg0/qPcR271kZ3j15uLkoVaN2XC5jGdaNdBvm0 b+Q2wXUTRGJelmMf3Grot3DiL4KUiT2HHOZJrRuJpY+9XeNrKA4blhe1CewaDEba/6M7 ZWYrpq79tdjwXmrgumI5lvTBaPBjH8KMxGa8rD+upGlimaNZNViMvYBCyRG9bu6S8pQC FXRCpPlMCMXFy4rwQTzPR4OB/hFgwwnt7opVgja3+ZNwl1hQGgb4aV9PziranmiQjILU BqULLSZ/27VyLr624/AzDSPYnq9XDrjubpVQOHq8I9pmjpKoBqLBX1IJj5ORWnpR8ZdE Puaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=ymnkwB7JOEvPi7Ws+rA1Lp/Cyqkxn5JphfBC72RMmsI=; b=DCCSXBi1peOn5Dndb4V9JL3qItoDVVvSyeo39tbiiQ+CpMZEcAaO3+RlDjYMhAsq5c fpOpXZWsKOCKddhK0PP0tq77rGiQPEuBxRS1fkbwQxnoaNjBFN51CtvmCFQUu72JJIrI BqCj6PPs+CHPHvuHKVKrmsBWKcfMv2DhsWWjk545Fi9a1qz7TrUjRY5ErXOEjCZcY8Fz YD/9uz0ql1/i9OAxT8GA1COT06vQ+NisZv884KC6sbqWoNtN9m5UP59qvL4MvCsAMVyU HAgK/jkbRAfk60Rc7tgqTLMN9uOJnWaCx6QRXOMxz1NSGuU6BO1amHX+/g3d/RBK3BNI XFuw== X-Gm-Message-State: APjAAAVJSRtG7uqoMXm/jMA8Rua176qeEegjzGUS3rRIUyJCRBICpcKs CZIHUJohGDU7S27ZahVXo3QIXuu5 X-Google-Smtp-Source: APXvYqwIXV1P2fEC+EQJatf2Rk81pBPkhHTSRi2T/e9nLwHL6vsWNFzVPtvFT5Mg+eeAzOZaRRQqQQ== X-Received: by 2002:adf:ef03:: with SMTP id e3mr3124577wro.216.1575907806998; Mon, 09 Dec 2019 08:10:06 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id k16sm29709640wru.0.2019.12.09.08.10.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 08:10:06 -0800 (PST) Message-Id: In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Mon, 09 Dec 2019 16:09:58 +0000 Subject: [PATCH v2 2/8] fsmonitor: do not output to stderr for tests Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: szeder.dev@gmail.com, ukshah2@illinois.edu, Kevin.Willford@microsoft.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee The fsmonitor feature allows an external tool such as watchman to monitor the working directory. The direct test t7619-status-fsmonitor.sh provides some coverage, but it would be better to run the entire test suite with watchman enabled. This would provide more confidence that the feature is working as intended. The test t0003-attributes.sh and others would fail when GIT_TEST_FSMONITOR is pointing at t/t7519/fsmonitor-watchman because it sends a message over stderr when registering the repo with watchman for the first time. Remove this stderr message for the test script to avoid this noise. Signed-off-by: Derrick Stolee --- t/t7519/fsmonitor-watchman | 1 - 1 file changed, 1 deletion(-) diff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman index d8e7a1e5ba..06312876aa 100755 --- a/t/t7519/fsmonitor-watchman +++ b/t/t7519/fsmonitor-watchman @@ -94,7 +94,6 @@ sub launch_watchman { my $o = $json_pkg->new->utf8->decode($response); if ($retry > 0 and $o->{error} and $o->{error} =~ m/unable to resolve root .* directory (.*) is not watched/) { - print STDERR "Adding '$git_work_tree' to watchman's watch list.\n"; $retry--; qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . From patchwork Mon Dec 9 16:09:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11279679 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 38C3113B6 for ; Mon, 9 Dec 2019 16:10:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 175482080D for ; Mon, 9 Dec 2019 16:10:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="A0DP0MDp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726605AbfLIQKL (ORCPT ); Mon, 9 Dec 2019 11:10:11 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36630 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726290AbfLIQKJ (ORCPT ); Mon, 9 Dec 2019 11:10:09 -0500 Received: by mail-wr1-f66.google.com with SMTP id z3so16858912wru.3 for ; Mon, 09 Dec 2019 08:10:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=i6FS5Z9erfGEDfl+U8ls7BzR3WgHycQ1uiew02661W4=; b=A0DP0MDpS/0GvxbUTIotai31DRsIJsUAtnkQww6NaDQdm+mBPN58XAxu9NUHSsmkRO IBU5xxp3NVdg0fRnmKsNpI7yvYqKSU36nOW9z8GgVIJs1Z3Vh8qojlFwbEHoS12lkzMU lx5UG8HgvTMcR4WUFRtBxP967QkxrqaRVo7+gpq1UjsMuDaSi/HtvKxLx6iDG4Ql5YuR 8/eyu9m6WgUYOVNS0ovcaJojYq0qlKyodRofJLxuImkgciY/tXK8bDqTuYW5sF+2WYuW qnhgzTfzQEwx2GTRthY1qbBzAM6gVv+wb1kNoxrhWc0owpfmxsY954J7HdRGM77/OAM7 jZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=i6FS5Z9erfGEDfl+U8ls7BzR3WgHycQ1uiew02661W4=; b=HuZtL+trwLuzMX8JZIRjC/5lUaJmdFXvGH6rwbtsmpj98O93gbyBUEQ8WpF4IGdy5+ R2p/MNV48YaE8WfgK5v+tiKA0uOwd4BULq53z+UiJn9keA03KvQwxJvdbTrHrNGhY2+f jeKJ490ihb/HaGMNSb8tnwZ3ZhgFKidGt4taOEEVMTP/9wGhUCYlMmK3WDTGDlr0F8g7 PkqRDqB/70dw24lh8Dn/vNHucYQZTSiCg06ZCPNP2Y5ggXrao9ePKIxJmXR1XNEGhArL FQev+RtxhxxFd1YPoMP5u5Ak3A5rwHcz8fztx+o/1I4AQbQPwHrzWhUrEMZyeibENm9z djHQ== X-Gm-Message-State: APjAAAV9jdFoMSwbY407jm7SEcPclbOU5B9Tm0v6zygTRmX0pk2Xs5fp 1iPLi/SG5Jf10ZwHHnWhw0lfQ0VE X-Google-Smtp-Source: APXvYqyl0cYzwBKn8D26AdNORNxnVw4ue38yRspCWlPfsL/6fqOr8F/zOaduZf8POtSsuzqoG8eJzA== X-Received: by 2002:adf:f10a:: with SMTP id r10mr3043997wro.202.1575907807687; Mon, 09 Dec 2019 08:10:07 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id e6sm26594450wru.44.2019.12.09.08.10.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 08:10:07 -0800 (PST) Message-Id: In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Mon, 09 Dec 2019 16:09:59 +0000 Subject: [PATCH v2 3/8] t1301-shared-repo.sh: disable FSMONITOR Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: szeder.dev@gmail.com, ukshah2@illinois.edu, Kevin.Willford@microsoft.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee The fsmonitor feature allows an external tool such as watchman to monitor the working directory. The direct test t7619-status-fsmonitor.sh provides some coverage, but it would be better to run the entire test suite with watchman enabled. This would provide more confidence that the feature is working as intended. The test t1301-shared-repo.sh would fail when GIT_TEST_FSMONITOR is set to t/t7519/fsmonitor-watchman because it changes permissions in an incompatible way. Signed-off-by: Derrick Stolee --- t/t1301-shared-repo.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 2dc853d1be..665ade0cf2 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -128,6 +128,7 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' ' ' test_expect_success POSIXPERM 'forced modes' ' + GIT_TEST_FSMONITOR="" && mkdir -p templates/hooks && echo update-server-info >templates/hooks/post-update && chmod +x templates/hooks/post-update && From patchwork Mon Dec 9 16:10:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11279681 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43B8413B6 for ; Mon, 9 Dec 2019 16:10:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 205E920692 for ; Mon, 9 Dec 2019 16:10:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BjqFPJzj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbfLIQKM (ORCPT ); Mon, 9 Dec 2019 11:10:12 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:34823 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfLIQKK (ORCPT ); Mon, 9 Dec 2019 11:10:10 -0500 Received: by mail-wm1-f68.google.com with SMTP id c20so14084059wmb.0 for ; Mon, 09 Dec 2019 08:10:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=TfdVMVQJfprx0PnKlAxqLnM0P66R/GPubmf8+9bHXKw=; b=BjqFPJzjuCS1N1TsraXt9M2X6kTF+leODTw+RYVGkgY0W1z+oKtrQCfzSxpohSumFA tmAsIc5z4iuhHGeswzpP+OJfd6OAKiqjeW9F9su680lTWpJqx0jo7z5ei0QwBrXY3nEG FnRCHLXGkOFv7zS14EL24ux/Zq3EIiksTkyxv3bs29JUyDcsZ7Wmajoymuz71/6KOf+7 jM43ylj/XBPzj/c90S9Sag1qarx2M54SfoZsRJMML4a8dLCb+4RhlRzPG8xnpT6kJf/V 8jis2BYUnDR5cSJ27fcxgaDV80VSdvltpV5FL43HKhdgnLdL0RtOFxbEym1OZ1MfLRa+ YegQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=TfdVMVQJfprx0PnKlAxqLnM0P66R/GPubmf8+9bHXKw=; b=Ttz7W3g0d7DOqoJj5llrXfkDtUyC7jHMby3plL79LyAfgHYJy+qxeVk5A0Bfrsl0Fa XSogE9aKIClnNDxKTEoK2dMhvucQNAuGpGcO8S4TvFZafSW8Kk1Sh/E2Pj9tFMjWQ1q5 UjQ7zKSkaRgi8RhSy2cN8LAe5MXVonMP2p2G0Q8JFWD4yo3k4ZzEB8KlKsENSci8t4hY vJ9mKASrbt6i7x5VxaBB6TkU0AOhXXmQTednfOR7GRpX3XuYhoJeIhRkmlyCXUFuAVO+ uGRqsOq8AHBeF+aY+7IVkCLPyepeSVd6UZZCRjzlaUz3fR7bQWSGSxk4IzBKfqZPWL/v VJJA== X-Gm-Message-State: APjAAAWvSI4DPHHK5latRKoTYICEpmAIXEYkoDgDo/T8KchvFt7RSqHy F1wH3kPmbZR5vG0UaFO51UdBkI9R X-Google-Smtp-Source: APXvYqyW33wANoQWgiIbCEz/krNHQIV6zvaX9MKJKq9U6wzzp2XEmVpWrLNBsWA8JTKsGrMf4jc2TA== X-Received: by 2002:a1c:8055:: with SMTP id b82mr25776899wmd.127.1575907808470; Mon, 09 Dec 2019 08:10:08 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id f5sm235260wmh.12.2019.12.09.08.10.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 08:10:08 -0800 (PST) Message-Id: In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Mon, 09 Dec 2019 16:10:00 +0000 Subject: [PATCH v2 4/8] t3030-merge-recursive.sh: disable fsmonitor when tweaking GIT_WORK_TREE Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: szeder.dev@gmail.com, ukshah2@illinois.edu, Kevin.Willford@microsoft.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee The fsmonitor feature allows an external tool such as watchman to monitor the working directory. The direct test t7619-status-fsmonitor.sh provides some coverage, but it would be better to run the entire test suite with watchman enabled. This would provide more confidence that the feature is working as intended. Worktrees use a ".git" _file_ instead of a folder to point to the base repo's .git directory and the proper worktree HEAD. The fsmonitor hook tries to create a JSON file inside the ".git" folder which violates the expectation here. It would be better to properly find a safe folder for storing this JSON file. This is also a problem when a test script uses GIT_WORK_TREE. Signed-off-by: Derrick Stolee --- t/t1510-repo-setup.sh | 1 + t/t2400-worktree-add.sh | 2 ++ t/t3030-merge-recursive.sh | 2 ++ 3 files changed, 5 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 9974457f56..28dce0c26f 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -775,6 +775,7 @@ test_expect_success '#29: setup' ' setup_repo 29 non-existent gitfile true && mkdir -p 29/sub/sub 29/wt/sub && ( + GIT_TEST_FSMONITOR="" && cd 29 && GIT_WORK_TREE="$here/29" && export GIT_WORK_TREE && diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh index e819ba741e..d4d3cbae0f 100755 --- a/t/t2400-worktree-add.sh +++ b/t/t2400-worktree-add.sh @@ -1,5 +1,7 @@ #!/bin/sh +GIT_TEST_FSMONITOR="" + test_description='test git worktree add' . ./test-lib.sh diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh index ff641b348a..62f645d639 100755 --- a/t/t3030-merge-recursive.sh +++ b/t/t3030-merge-recursive.sh @@ -520,6 +520,7 @@ test_expect_success 'reset and bind merge' ' test_expect_success 'merge-recursive w/ empty work tree - ours has rename' ' ( + GIT_TEST_FSMONITOR="" && GIT_WORK_TREE="$PWD/ours-has-rename-work" && export GIT_WORK_TREE && GIT_INDEX_FILE="$PWD/ours-has-rename-index" && @@ -545,6 +546,7 @@ test_expect_success 'merge-recursive w/ empty work tree - ours has rename' ' test_expect_success 'merge-recursive w/ empty work tree - theirs has rename' ' ( + GIT_TEST_FSMONITOR="" && GIT_WORK_TREE="$PWD/theirs-has-rename-work" && export GIT_WORK_TREE && GIT_INDEX_FILE="$PWD/theirs-has-rename-index" && From patchwork Mon Dec 9 16:10:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11279691 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 09D5E188B for ; Mon, 9 Dec 2019 16:10:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCAC9207FF for ; Mon, 9 Dec 2019 16:10:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GrFV/zwX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbfLIQKQ (ORCPT ); Mon, 9 Dec 2019 11:10:16 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38722 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726538AbfLIQKL (ORCPT ); Mon, 9 Dec 2019 11:10:11 -0500 Received: by mail-wm1-f65.google.com with SMTP id p17so15563607wmi.3 for ; Mon, 09 Dec 2019 08:10:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=WDklD2JX9l7ontB7B0w1M/kSgIVjukgaGNJHtkfp5Z0=; b=GrFV/zwXDzIRf8y1rpjUxGdKEfQcC6RscumegpjS5llZFT3gqNcFAwJLFHh0UXKdGz QdAA0r1+iLerIQdtN8TLJZYC+2FrMCDhiNUL6mGhf83/+3sQm+z5VIgRjaILOdRPVwqQ xVgESzYXZ2c+GsF0MAoC/657h8nXi+PAh1cvIF+Y+xAvyB9Vj8dYYEzEB2IyPZYZymFn wvtW0VZPkQzsg7wWtu0M9uoZRUPJfetkHF4olOKxRjBNVBvadE7zMhd7Q31GTpZIhtPb Q70yyZ/jawtbDtw8x++mFF3kz+gdhzuUCQSJ3OJxqhFzpt9FqArpZFKtSxlIOXcHze9k b4GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=WDklD2JX9l7ontB7B0w1M/kSgIVjukgaGNJHtkfp5Z0=; b=Q5mUlZ/+IeO/E/bm3SPvnBuz4dWpMUnBUYrAAnQZ5luveGYSSQFeFOnscnVVnr/xyz C69C+JSVXFrW17+V+cBCa9LZ6LtdzH1StlcPLvWtRlmplYwhzssghRJsujT8+JLwuA1+ eLLnv4ZXMJtCpwDRzXkQjbfvQtTmwp56m9pzJC/UxNf25p2hI2//Zn+wU+hBHpSjP03j VEV7IPQCK0EWvxqUxi5QLhb+Jn7HE+mXVH1wTW8zP2PTjrr9f+dqJDvvjbbHSF8ZHjbg a2MITDBG5nIJK9UmatjqDTybGtzcfn30kxVZ/uwv5ZIRxnQPwXEfIIxHM4Aam6xSBLhx Ifuw== X-Gm-Message-State: APjAAAU55/Qkh2tej7QLJHMGYnOVaIu5c6/Xls8l6EVByPDETyETLWzK ULsVgkWvZY3/ztpH/5NX3sopOORY X-Google-Smtp-Source: APXvYqzxUcbAC6OAIap00p/D2CCeuLOHZAfTEw7p2i4jI+1l4m5ndjp/TYfahmJzuy9HqNeTewBL7g== X-Received: by 2002:a1c:dc08:: with SMTP id t8mr26476413wmg.139.1575907809088; Mon, 09 Dec 2019 08:10:09 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id a186sm196157wmd.41.2019.12.09.08.10.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 08:10:08 -0800 (PST) Message-Id: In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Mon, 09 Dec 2019 16:10:01 +0000 Subject: [PATCH v2 5/8] tests: disable fsmonitor in submodule tests Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: szeder.dev@gmail.com, ukshah2@illinois.edu, Kevin.Willford@microsoft.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee The fsmonitor feature allows an external tool such as watchman to monitor the working directory. The direct test t7619-status-fsmonitor.sh provides some coverage, but it would be better to run the entire test suite with watchman enabled. This would provide more confidence that the feature is working as intended. The fsmonitor feature struggles with submodules. Disable the GIT_TEST_FSMONITOR environment variable before running tests with a lot of submodule interactions. Signed-off-by: Derrick Stolee --- t/t3404-rebase-interactive.sh | 1 + t/t3600-rm.sh | 1 + t/t4060-diff-submodule-option-diff-format.sh | 3 +++ t/t5526-fetch-submodules.sh | 2 ++ t/t7402-submodule-rebase.sh | 3 +++ t/t7406-submodule-update.sh | 2 ++ t/t7506-status-submodule.sh | 3 +++ t/t7508-status.sh | 3 +++ 8 files changed, 18 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 461dd539ff..9dc7d1aefb 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -697,6 +697,7 @@ test_expect_success 'do "noop" when there is nothing to cherry-pick' ' ' test_expect_success 'submodule rebase setup' ' + GIT_TEST_FSMONITOR="" && git checkout A && mkdir sub && ( diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh index 66282a720e..64269bd89d 100755 --- a/t/t3600-rm.sh +++ b/t/t3600-rm.sh @@ -355,6 +355,7 @@ test_expect_success 'rm succeeds when given a directory with a trailing /' ' ' test_expect_success 'rm of a populated submodule with different HEAD fails unless forced' ' + GIT_TEST_FSMONITOR="" && git reset --hard && git submodule update && git -C submod checkout HEAD^ && diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh index 9dcb69df5c..017417790e 100755 --- a/t/t4060-diff-submodule-option-diff-format.sh +++ b/t/t4060-diff-submodule-option-diff-format.sh @@ -15,6 +15,9 @@ This test tries to verify the sanity of --submodule=diff option of git diff. # Tested non-UTF-8 encoding test_encoding="ISO8859-1" +# fsmonitor does not work well with submodules +GIT_TEST_FSMONITOR="" + # String "added" in German (translated with Google Translate), encoded in UTF-8, # used in sample commit log messages in add_file() function below. added=$(printf "hinzugef\303\274gt") diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh index 63205dfdf9..fb346bff05 100755 --- a/t/t5526-fetch-submodules.sh +++ b/t/t5526-fetch-submodules.sh @@ -1,6 +1,8 @@ #!/bin/sh # Copyright (c) 2010, Jens Lehmann +GIT_TEST_FSMONITOR="" + test_description='Recursive "git fetch" for submodules' . ./test-lib.sh diff --git a/t/t7402-submodule-rebase.sh b/t/t7402-submodule-rebase.sh index 8e32f19007..c78e9009cf 100755 --- a/t/t7402-submodule-rebase.sh +++ b/t/t7402-submodule-rebase.sh @@ -7,6 +7,9 @@ test_description='Test rebasing, stashing, etc. with submodules' . ./test-lib.sh +# fsmonitor does not work well with submodules +GIT_TEST_FSMONITOR="" + test_expect_success setup ' echo file > file && diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index c973278300..8d93aaef5f 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -11,6 +11,8 @@ submodule and "git submodule update --rebase/--merge" does not detach the HEAD. . ./test-lib.sh +# fsmonitor does not work well with submodules +GIT_TEST_FSMONITOR="" compare_head() { diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh index 08629a6e70..1a716f2c2a 100755 --- a/t/t7506-status-submodule.sh +++ b/t/t7506-status-submodule.sh @@ -4,6 +4,9 @@ test_description='git status for submodule' . ./test-lib.sh +# fsmonitor does not work well with submodules +GIT_TEST_FSMONITOR="" + test_create_repo_with_commit () { test_create_repo "$1" && ( diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 4e676cdce8..bf0487632d 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -846,6 +846,9 @@ test_expect_success 'status refreshes the index' ' test_cmp expect output ' +# fsmonitor does not work well with submodules +GIT_TEST_FSMONITOR="" + test_expect_success 'setup status submodule summary' ' test_create_repo sm && ( cd sm && From patchwork Mon Dec 9 16:10:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11279689 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D203513B6 for ; Mon, 9 Dec 2019 16:10:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1CCE207FD for ; Mon, 9 Dec 2019 16:10:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J0dsVUyg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726718AbfLIQKR (ORCPT ); Mon, 9 Dec 2019 11:10:17 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43393 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726607AbfLIQKM (ORCPT ); Mon, 9 Dec 2019 11:10:12 -0500 Received: by mail-wr1-f65.google.com with SMTP id d16so16796046wre.10 for ; Mon, 09 Dec 2019 08:10:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=8+b2TZljW1nJNaPhxqNuAwAOAmDbaiK/LSojADStCD4=; b=J0dsVUyg2jghFV47cbkisqZjesum7lz3z+SwUssLqYbydlVDwbQCxf4cv/RJGYKDkB 5bKpSypw48pbZLzHNuvpDWjAPYDoAWjCpQNVbgutADaNnhh8Syl+ahTBSVndmxYD00fM DsbCiaTxnwSP8i5r2kI8SjHk9kaktVCV9CjzC4hFcogzlYEOgSul9eXO6NSbAZhYLzrb lbT55+bm6MYymWdZVu8o6aZrdwJOs/ICxJx3qOtI/XbTgNcW42n11Qjl91EVcoEi5iog yLqL8udSJc4XpCJk57e1RnXTNVdwY2a51fhve8KuteUslY6aMDA6XVedAhEbEunhYwYz 18NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=8+b2TZljW1nJNaPhxqNuAwAOAmDbaiK/LSojADStCD4=; b=XrI3LUTwZEB8V5T25U7SNcjPbW4cp3mCcBhpw3AK4qtt4QS/5dbzBKWM8oibc4+BIH G8p6FJaaoyrvC/UmKjv4giYZgZmMKHHLjB55NhQr3/XlDf27ycjav4S55+ZIoMTfzDYp y+H5LERlERUtsSp0yKZtCkHmoVP/oJNBrC/ReTGbzfwYw7vauVdmb3WLrXDCIxEYSy8+ 9Hv7ciwG0uBLhDikUPK7aCpJNSIpnusJxl8U0WCNXIVZV6vFXYiHms1gy6qUa48Wucmj apxr1rd9VvxHLPDZF7zQfiNhWuit61AsS+LnJDNVpsnAmzxNpHCOEFvRljxpb29FnF1y ik6Q== X-Gm-Message-State: APjAAAWUNMIeJi1Yx7eEEiWEz0YZtrF0uvOMteGCfOJY3s9YMDgeifrP MJwJKFqSJ0gKBJsOsaTrRSCEH0IO X-Google-Smtp-Source: APXvYqx6FGi66ZbKmgf5P0V/5QDAU1MTRQFazJJYhA0XaSgPO1xB77fk9qhgty+hmKc7yVkkp994ZA== X-Received: by 2002:adf:e70d:: with SMTP id c13mr1538070wrm.248.1575907810606; Mon, 09 Dec 2019 08:10:10 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o189sm223724wme.29.2019.12.09.08.10.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 08:10:09 -0800 (PST) Message-Id: <9cd4a08d82521082f0ee13ebea353708fada3403.1575907804.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Mon, 09 Dec 2019 16:10:02 +0000 Subject: [PATCH v2 6/8] t7063: disable fsmonitor with status cache Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: szeder.dev@gmail.com, ukshah2@illinois.edu, Kevin.Willford@microsoft.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee The fsmonitor feature allows an external tool such as watchman to monitor the working directory. The direct test t7619-status-fsmonitor.sh provides some coverage, but it would be better to run the entire test suite with watchman enabled. This would provide more confidence that the feature is working as intended. The status cache tests use GIT_TRACE_UNTRACKED_STATS to check very detailed statistics related to how much Git actually checked for untracked files. The fsmonitor feature changes the expected behavior here, so disable the GIT_TEST_FSMONITOR environment variable. Signed-off-by: Derrick Stolee --- t/t7063-status-untracked-cache.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh index 190ae149cf..c433738a3a 100755 --- a/t/t7063-status-untracked-cache.sh +++ b/t/t7063-status-untracked-cache.sh @@ -4,6 +4,9 @@ test_description='test untracked cache' . ./test-lib.sh +# fsmonitor changes the expected behvaior of GIT_TRACE_UNTRACKED_STATS +GIT_TEST_FSMONITOR="" + # On some filesystems (e.g. FreeBSD's ext2 and ufs) directory mtime # is updated lazily after contents in the directory changes, which # forces the untracked cache code to take the slow path. A test From patchwork Mon Dec 9 16:10:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11279683 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA52A15AB for ; Mon, 9 Dec 2019 16:10:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88870207FD for ; Mon, 9 Dec 2019 16:10:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S+JNHi2P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfLIQKP (ORCPT ); Mon, 9 Dec 2019 11:10:15 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53543 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726290AbfLIQKN (ORCPT ); Mon, 9 Dec 2019 11:10:13 -0500 Received: by mail-wm1-f65.google.com with SMTP id n9so15592099wmd.3 for ; Mon, 09 Dec 2019 08:10:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=Aw86E2JesYnBke1UD3Cn25oDyN4i0P0DvTe/Iw1CwQU=; b=S+JNHi2PyX6IU5/Jf2Zo/p/EiYPKqIYmbWUJ4MAJdJP4OaMxvEgdDd25zEwFgrYWu2 2jaM++fKj4r2GyEXwt2RX5RcnOJvFkLW9XqUwaKK++aL+rIq30LfV4EXlpRr4yAC1m1z 7buJKH8efyGuXZuVGvfkJRwGM5qu9e59b6kzNE4IIAHq0owh45AdFKzdCF8rk+KXslBc MVUTu6KKp9eYNSCY9mq4U5OpEQOVTG9Ju/1Snvr+R+/Ak2QBpV/8QMYvUXcvdSOWzEr1 5JLfRog5iXkKKhRmagCzKrBj3SVpF/L3VjttrNyykWD0sNBs20U0r8kBuwKIy+Y4FIzV 4dxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=Aw86E2JesYnBke1UD3Cn25oDyN4i0P0DvTe/Iw1CwQU=; b=M83IxbT7rVxzntEDRYW3A7Tjva/unLZW5EVAhxS3kbiRg5HQPUojLVp5g8Tccv9p9E l8AB/YlRewRbMWSu36im8UYriXSntJ4Wp28w+hjw8loMEhaQpNyG0pMh2eLuGEKDZ6dB ZHCf7ajcAjlDlVNeayGndbrnUNTj1zgCf8d5GeMQDdS9kfxytRqDxoQmoSwRuRcHzNbp 6e0adD/tAj+mhsDizykq1IvSeNgCYs2Li3UwUGnFk7IIVXp3UBoxlglPrV4a6Bnl0Zkm zwN5PEQQjCePPo0q6FIZN4FyMyYxCbEi1f6HGOR602pKwSzLGTjokQY2hkLONRnv1Xt/ 0RKA== X-Gm-Message-State: APjAAAW0V8fT9rJuve11QdagOXK96KQD9mHBO8YqAsNpXkNR288vxiZd k2/NGXtZX3BDBBRmixlEWNAotlcU X-Google-Smtp-Source: APXvYqzPF4R1ZMZksTEgJl/rSpqaQVK634tLh6fauUZhf7cJ+1P+tuTqUdghShR0lT+K91w2p2FE5Q== X-Received: by 2002:a1c:8086:: with SMTP id b128mr25735248wmd.80.1575907811306; Mon, 09 Dec 2019 08:10:11 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id z11sm27843002wrt.82.2019.12.09.08.10.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 08:10:10 -0800 (PST) Message-Id: <215ec8688e60c594d50628caa03258010e4d6606.1575907804.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Mon, 09 Dec 2019 16:10:03 +0000 Subject: [PATCH v2 7/8] t7519: disable external GIT_TEST_FSMONITOR variable Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: szeder.dev@gmail.com, ukshah2@illinois.edu, Kevin.Willford@microsoft.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee The GIT_TEST_FSMONITOR variable was created specifically so the t7519-status-fsmonitor.sh test script could tweak the expected behavior depending on its value. However, if we set it externally to use the Watchman integration, then it breaks the initial tests that demonstrate behavior _without_ the fsmonitor feature. Disable this variable at the start of the script. Signed-off-by: Derrick Stolee --- t/t7519-status-fsmonitor.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh index 81a375fa0f..443d2e653b 100755 --- a/t/t7519-status-fsmonitor.sh +++ b/t/t7519-status-fsmonitor.sh @@ -8,6 +8,9 @@ test_description='git status with file system watcher' # "git update-index --fsmonitor" can be used to get the extension written # before testing the results. +# Disable an external value, as we will set it directly as needed. +GIT_TEST_FSMONITOR="" + clean_repo () { git reset --hard HEAD && git clean -fd From patchwork Mon Dec 9 16:10:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11279685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56A5215AB for ; Mon, 9 Dec 2019 16:10:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34EA6207FD for ; Mon, 9 Dec 2019 16:10:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cj1Ahdzn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726687AbfLIQKP (ORCPT ); Mon, 9 Dec 2019 11:10:15 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:40231 "EHLO mail-wm1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726668AbfLIQKO (ORCPT ); Mon, 9 Dec 2019 11:10:14 -0500 Received: by mail-wm1-f43.google.com with SMTP id t14so15540772wmi.5 for ; Mon, 09 Dec 2019 08:10:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=YO1x6Bl1cN8I+2lnEXNoZiGUylTf0WKPdHrCdk7M3fg=; b=cj1AhdznYKk0+13pUR7jog/pehlXMGTj/np0AYWA7SDWQFSELSKtQDmBrEUuKbgA4T 7u4maIs4aw0RVoLkZBoWdV0liVZqNECaSCNLlzPRBUZ3cg9iotOboe8YdCbS2DvTN5ES AdaXggzC3+iefm1Vr1dyhpQ38VkHOFuk7+1VDLUx7LUTBwzUKdzkMd4DLVmEWP0ubRTE YmPCuwakiZOSq2Qmtv+wWAfLquPIpOsIv5g2poq/NjtrUfjxS2jaQ3+42WDFMfdNrppW sULrPAs0EjxgYsaUJc/pQc5DNZZ1KuebsfQf9+Q4FivGtR/5o47r9EV4pTKAQOQsF/9U udYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=YO1x6Bl1cN8I+2lnEXNoZiGUylTf0WKPdHrCdk7M3fg=; b=r+jak4eJmdudw3Gi3WPgdElkBdNUMjJ5xsQzOLGAnpaSOjAn58C6neHe60V5exD87S ed2NopXjZOy4VmpxHQDDjhxQofZuw3w3mUDcA3N3utmmjMIO8vIcAtYF0JZBrsomozb8 lg0KUs4vBM0lDkMDHU1TJxj7gBr+c5o4H6UFyAeb1ubDuEB0JTJt60dDm3FeMNyixfSL nUkaVfX8ZuIFjJiVmKL+J8Nj3CFsRXueWeOL/Phrz80GsHXSSl/Ur5CIf614qPe0dgVh sT9JnUi/RiIDYDtybzibDH6OUkYcm2c/ljc34m+niEzohCy2Sx0QXQPiO6JddHiLCM/p TpzQ== X-Gm-Message-State: APjAAAVpx6gxI1BPuxJXRI4yUE6zQwo+JM6S/JIokgW/hLVzdxwtU5Gt gszslDKM2T3PQJ+UiRfwFfv4ok0n X-Google-Smtp-Source: APXvYqy+21vr6BE1iMwUMtdjp6BewL/W/mbn1zWkXNWGw/3Imyf2xdACN8b98CLfpFbrLHGwIHkUGg== X-Received: by 2002:a1c:7215:: with SMTP id n21mr26360642wmc.154.1575907811962; Mon, 09 Dec 2019 08:10:11 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l17sm27545001wro.77.2019.12.09.08.10.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 08:10:11 -0800 (PST) Message-Id: In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Mon, 09 Dec 2019 16:10:04 +0000 Subject: [PATCH v2 8/8] test-lib: clear watchman watches at test completion Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: szeder.dev@gmail.com, ukshah2@illinois.edu, Kevin.Willford@microsoft.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee The fsmonitor feature allows an external tool such as watchman to monitor the working directory. The direct test t7619-status-fsmonitor.sh provides some coverage, but it would be better to run the entire test suite with watchman enabled. This would provide more confidence that the feature is working as intended. When running the test suite in parallel with 'prove -j ', many repos are created and deleted in parallel. When GIT_TEST_FSMONITOR points to t/t7519/fsmonitor-watchman, this can lead to watchman tracking many different folders, overloading its watch queue. As a test script completes, we can tell watchman to stop watching the directories inside the TRASH_DIRECTORY. This is particularly important on Windows where watchman keeps an open handle on the directories it watches, preventing them from being deleted. There is currently a bug in watchman [1] where this handle still is not closed, but if that is updated then these tests can be run on Windows as well. [1] https://github.com/facebook/watchman/issues/764 Signed-off-by: Derrick Stolee --- t/test-lib-functions.sh | 15 +++++++++++++++ t/test-lib.sh | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index e0b3f28d3a..ef840ce097 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1475,3 +1475,18 @@ test_set_port () { port=$(($port + ${GIT_TEST_STRESS_JOB_NR:-0})) eval $var=$port } + +test_clear_watchman () { + if test -n "$GIT_TEST_FSMONITOR" + then + watchman watch-list | + grep "$TRASH_DIRECTORY" | + sed "s/\",//g" | + sed "s/\"//g" >repo-list + + while read repo + do + watchman watch-del "$repo" + done