From unknown Wed Jun 18 00:17:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#76187 <76187@debbugs.gnu.org> To: bug#76187 <76187@debbugs.gnu.org> Subject: Status: vc-git-test-dir-branch-headers failure on Fedora Reply-To: bug#76187 <76187@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:17:34 +0000 retitle 76187 vc-git-test-dir-branch-headers failure on Fedora reassign 76187 emacs submitter 76187 Paul Eggert severity 76187 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 10 17:58:49 2025 Received: (at submit) by debbugs.gnu.org; 10 Feb 2025 22:58:49 +0000 Received: from localhost ([127.0.0.1]:52927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thcjo-00005i-Oc for submit@debbugs.gnu.org; Mon, 10 Feb 2025 17:58:49 -0500 Received: from lists.gnu.org ([2001:470:142::17]:38196) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1thcjj-00005O-8e for submit@debbugs.gnu.org; Mon, 10 Feb 2025 17:58:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1thcjd-0002bw-Ek for bug-gnu-emacs@gnu.org; Mon, 10 Feb 2025 17:58:37 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1thcjb-0001OJ-7E for bug-gnu-emacs@gnu.org; Mon, 10 Feb 2025 17:58:37 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id EE8003C011BDC for ; Mon, 10 Feb 2025 14:58:32 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id quvivm_t1uZ7 for ; Mon, 10 Feb 2025 14:58:32 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 7600D3C00FA87 for ; Mon, 10 Feb 2025 14:58:32 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 7600D3C00FA87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739228312; bh=D3s/m01PqcH6Sr48Y7S5Gi4Vc3z3kunPD6qswMPtppI=; h=Message-ID:Date:MIME-Version:To:From; b=MLKn11WUg/rcV6yV30+2Z7Y1xT606OEacXXL8xwWE1bQZwaCeacSvtaTsLDHbpxh0 5imvk2zaRk7kJaAmUuVFeQ4Ic4eWDoLZIWk5ETMUEUSnPxM3JJBEIa6+DY/OvhXgkQ qEuXUUImf6f09uZv8poHZ23Tjdvr6x/5luxDW88OuP3QqTb061PFNlPB9AjD9Uyt95 5H/37VweZBllW4IOnt65GR7FgvEKYIVKJV7z0ur7lPwn5h4MKO5AGzkhmeldRuawTW 1R0lbQ7u72QpIUZv2CEuolUdwEYMq+ViyjOMTf+sWxAumEJHypjsfH93nUh5x0o3WX 0xmylJbgMbacA== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id gNsleOpTnpyi for ; Mon, 10 Feb 2025 14:58:32 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 58BDC3C011BDC for ; Mon, 10 Feb 2025 14:58:32 -0800 (PST) Message-ID: Date: Mon, 10 Feb 2025 14:58:31 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Emacs bug reports From: Paul Eggert Subject: vc-git-test-dir-branch-headers failure on Fedora Autocrypt: addr=eggert@cs.ucla.edu; keydata= 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 Organization: UCLA Computer Science Department Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=131.179.128.66; envelope-from=eggert@cs.ucla.edu; helo=mail.cs.ucla.edu X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Fedora 41 x86-64 with the current Emacs master (commit 4936a8d5acbfee2dee6d903400eba48cb2e3a6a7) I occasionally see failures of the vc-git-test-dir-branch-headers test. Usually it works. Here are the two failures I've seen. The first was with a "make -j5 check" so it may have been a collision with some other test: > GEN lisp/vc/ediff-diff-tests.log > GEN lisp/vc/ediff-ptch-tests.log > GEN lisp/vc/log-edit-tests.log > GEN lisp/vc/smerge-mode-tests.log > GEN lisp/vc/vc-bzr-tests.log > GEN lisp/vc/vc-cvs-tests.log > GEN lisp/vc/vc-git-tests.log > GEN lisp/vc/vc-hg-tests.log > GEN lisp/vc/vc-tests.log > GEN lisp/version-tests.log > GEN lisp/wdired-tests.log > GEN lisp/which-key-tests.log > GEN lisp/whitespace-tests.log > ELC+ELN lisp/wid-edit-tests.elc > Running 8 tests (2025-02-10 14:40:44-0800, selector `(not (or (tag :expensive-test) (tag :unstable)))') > passed 1/8 vc-git-test-annotate-time (0.006682 sec) > Test vc-git-test-dir-branch-headers backtrace: > signal(error ("Failed (status 128): git --no-pager checkout -b featu > error("Failed (%s): %s" "status 128" "git --no-pager checkout -b fea > vc-do-command(t 0 "git" nil "--no-pager" "checkout" "-b" "feature/fo > apply(vc-do-command t 0 "git" nil "--no-pager" ("checkout" "-b" "fea > vc-git-command(t 0 nil "checkout" "-b" "feature/foo" "master") > apply(vc-git-command t 0 nil ("checkout" "-b" "feature/foo" "master" > vc-git-test--run("checkout" "-b" "feature/foo" "master") > #f(compiled-function () #)() > #f(compiled-function () #)() > handler-bind-1(#f(compiled-function () # > ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test > ert-run-test(#s(ert-test :name vc-git-test-dir-branch-headers :docum > ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m > ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co > ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable))) > ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un > eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) ( > command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l > command-line() > normal-top-level() > Test vc-git-test-dir-branch-headers condition: > (error > "Failed (status 128): git --no-pager checkout -b feature/foo master .") > FAILED 2/8 vc-git-test-dir-branch-headers (0.349513 sec) at lisp/vc/vc-git-tests.el:146 > passed 3/8 vc-git-test-program-version-apple (0.000109 sec) > passed 4/8 vc-git-test-program-version-general (0.000061 sec) > passed 5/8 vc-git-test-program-version-invalid-leading-dot (0.000059 sec) > passed 6/8 vc-git-test-program-version-invalid-leading-string (0.000052 sec) > passed 7/8 vc-git-test-program-version-other (0.000088 sec) > passed 8/8 vc-git-test-program-version-windows (0.000060 sec) > > Ran 8 tests, 7 results as expected, 1 unexpected (2025-02-10 14:40:45-0800, 0.544882 sec) > > 1 unexpected results: > FAILED vc-git-test-dir-branch-headers > > make[3]: *** [Makefile:185: lisp/vc/vc-git-tests.log] Error 1 > GEN lisp/x-dnd-tests.log > GEN lisp/xdg-tests.log The second failure was with "make lisp/vc/vc-git-tests" in the test directory. I repeatedly ran that test, and it failed on the 20th execution as follows: > make[1]: Entering directory '/home/eggert/src/gnu/emacs/static-checking/test' > GEN lisp/vc/vc-git-tests.log > Running 8 tests (2025-02-10 14:50:43-0800, selector `(not (tag :unstable))') > passed 1/8 vc-git-test-annotate-time (0.006192 sec) > Test vc-git-test-dir-branch-headers backtrace: > signal(error ("Failed (status 128): git --no-pager checkout -b featu > error("Failed (%s): %s" "status 128" "git --no-pager checkout -b fea > vc-do-command(t 0 "git" nil "--no-pager" "checkout" "-b" "feature/ba > apply(vc-do-command t 0 "git" nil "--no-pager" ("checkout" "-b" "fea > vc-git-command(t 0 nil "checkout" "-b" "feature/bar" "--track" "mast > apply(vc-git-command t 0 nil ("checkout" "-b" "feature/bar" "--track > (progn (apply 'vc-git-command t 0 nil args) (buffer-string)) > (unwind-protect (progn (apply 'vc-git-command t 0 nil args) (buffer- > (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn > (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current > vc-git-test--run("checkout" "-b" "feature/bar" "--track" "master") > (progn (vc-git-test--run "clone" origin-repo clone-repo) (vc-dir clo > (unwind-protect (progn (vc-git-test--run "clone" origin-repo clone-r > (let* ((coding-system-for-write nil) (temp-file (file-name-as-direct > (let ((main-branch (vc-git-test--start-branch))) (let* ((coding-syst > (let ((default-directory origin-repo) (process-environment (append ' > (progn (let ((default-directory origin-repo) (process-environment (a > (unwind-protect (progn (let ((default-directory origin-repo) (proces > (let* ((coding-system-for-write nil) (temp-file (file-name-as-direct > #f(lambda () [t] (let* ((fn-25 #'executable-find) (args-26 (conditio > #f(compiled-function () #)() > handler-bind-1(#f(compiled-function () # > ert--run-test-internal(#s(ert--test-execution-info :test ... :result > ert-run-test(#s(ert-test :name vc-git-test-dir-branch-headers :docum > ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m > ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type > ert-run-tests-batch((not (tag :unstable))) > ert-run-tests-batch-and-exit((not (tag :unstable))) > eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t) > command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l > command-line() > normal-top-level() > Test vc-git-test-dir-branch-headers condition: > (error > "Failed (status 128): git --no-pager checkout -b feature/bar --track master .") > FAILED 2/8 vc-git-test-dir-branch-headers (0.316582 sec) at lisp/vc/vc-git-tests.el:146 > passed 3/8 vc-git-test-program-version-apple (0.000139 sec) > passed 4/8 vc-git-test-program-version-general (0.000085 sec) > passed 5/8 vc-git-test-program-version-invalid-leading-dot (0.000079 sec) > passed 6/8 vc-git-test-program-version-invalid-leading-string (0.000114 sec) > passed 7/8 vc-git-test-program-version-other (0.000076 sec) > passed 8/8 vc-git-test-program-version-windows (0.000075 sec) > > Ran 8 tests, 7 results as expected, 1 unexpected (2025-02-10 14:50:44-0800, 0.508602 sec) > > 1 unexpected results: > FAILED vc-git-test-dir-branch-headers > > make[1]: *** [Makefile:185: lisp/vc/vc-git-tests.log] Error 1 > make[1]: Leaving directory '/home/eggert/src/gnu/emacs/static-checking/test' > make: *** [Makefile:251: lisp/vc/vc-git-tests] Error 2 From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 13:41:28 2025 Received: (at 76187) by debbugs.gnu.org; 11 Feb 2025 18:41:28 +0000 Received: from localhost ([127.0.0.1]:58590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thvCK-0001Ze-9U for submit@debbugs.gnu.org; Tue, 11 Feb 2025 13:41:28 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:41663) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1thvCH-0001ZO-9x for 76187@debbugs.gnu.org; Tue, 11 Feb 2025 13:41:26 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-434f398a171so6145875e9.2 for <76187@debbugs.gnu.org>; Tue, 11 Feb 2025 10:41:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739299279; x=1739904079; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hEblR/1TymiD6joBZt8zTK/OWdiUfLmmOfZmuj48ZSc=; b=FeaQzRIzQVRaSSO57bU3N4RnhyZUWvbHrta/0Xb6wf6CUFDk78JECoPxp7Wg4QAelN 0zkjZk6MP4zsDxkyn7+AhpbwjHlIUM72F70hWGKDXCmtnM3lMCPM/JrOkOoX9gwNqU8S bakV+Rjjwya0EifsdhZOUEIBQ+9wcJimbnzw8WIi18vTkQT1Lnugj/0Ro6fLv73S0Gqd /tQy1n+RqCbJnRROTjmTguNJXzmfB+YzRI9R1cLOHzsTcFiZoVTBk+Cki/sIdyOvc4/y IEzEF4YEUJ66x8apANPZQIJKzpwxQeBi84ntagJAPxSkx52SNDFAU8K9TKvhu9ZeiMA8 HbPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739299279; x=1739904079; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hEblR/1TymiD6joBZt8zTK/OWdiUfLmmOfZmuj48ZSc=; b=oGf1M4HIYFNcm6cPf4CpRLOPt9v6XTEqfPH9/CIgGYN8GOqrizAKsSb+SK1b3nx9M1 Y+AapEoShEO75scIhfg9rOjdk4jZ4Dcy/2+Qp2G9mHE5pTsXc9GD+tR8b01NRRbCNbg8 J1Swg6v5POX0jsrJ/GB5bwz2c+M7H5FhYRr0BicI4/BtzX7TYqFyfX1q9dszfhaVLzLX 96mp+cCswILgDwqFa4oYB35lBoSIFdCIxsF+89f5cUToXSRS7xVVKexE+wl9AzHkVAak XYta1qDuVydUboLmYVkdVlcg69nvkFjWnaCtmzMR2td5VTVbV69DKGl/3pyMz+J7zFfW oPdA== X-Gm-Message-State: AOJu0YyvqvMmSbB2hdfBp0CBCaMS3dQ6qlktsgqZeIKhCJwjajmdk4jE zGMnlDVcN1NU/4jeS67LlC28oeZy6uGRrcPWy1CR1pUdnThLOQYgruLOeA== X-Gm-Gg: ASbGncuiZaHf87eOZJSFZD5PIfUhFErk45AGZXQ6enyDCFl+Xe2FMW0Wimy3MTOd7Zr OTCQyiyP2D8zWElXgURs8duc1PdbnYeCithQt2PYA6NOTGvk5Vu6Ou2zW5KqT2gVKicRTlzSCZC 36nf9lsVDXtlR2e1LRolUxngh60QOj8QQb99BwogaeknrzPBWQOtL5hBcZorP9iHJSLdv9JNyn1 hM/t+gI6f7Vv4U5SrPEOl2dv1iIiZWN5UlyFRRftPuIsPZAr96sGVZ1hasgkFDvA4Lp1ZfXREw5 5HzBKZ2D+eF5zkU7Ah4= X-Google-Smtp-Source: AGHT+IERlrHNs7+2HfT+/XQEJRaE7R+MztT9pC7IFOQuxWnctKDN596PrkgNV4ZEs8oEKVZltkiGeQ== X-Received: by 2002:a05:600c:19d1:b0:434:a0fd:95d0 with SMTP id 5b1f17b1804b1-439581b819fmr1323365e9.4.1739299278712; Tue, 11 Feb 2025 10:41:18 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4394dcb43basm13464835e9.2.2025.02.11.10.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 10:41:18 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Paul Eggert Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: References: Date: Tue, 11 Feb 2025 19:41:17 +0100 Message-ID: <87a5ase33m.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Paul Eggert writes: > The second failure was with "make lisp/vc/vc-git-tests" in the test direc= tory. I repeatedly ran that test, and it failed on the 20th execution as fo= llows: > Test vc-git-test-dir-branch-headers condition: > (error > "Failed (status 128): git --no-pager checkout -b feature/bar --track= master .") > FAILED 2/8 vc-git-test-dir-branch-headers (0.316582 sec) at lisp/vc/= vc-git-tests.el:146 Interesting. I reproduced the 'checkout -b feature/foo master' failure after 300 executions. "status 128" confounds me a bit; tho there is a surprising (to me) number of hits for "git exit 128" on the net. Wondering if Git outputs anything useful=E2=80=A6 Anyhoo, no clue yet - just wanted to ACK (openSUSE Tumbleweed FWIW), what with having authored that test. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 15:44:02 2025 Received: (at 76187) by debbugs.gnu.org; 11 Feb 2025 20:44:03 +0000 Received: from localhost ([127.0.0.1]:59027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thx6w-0002zH-I4 for submit@debbugs.gnu.org; Tue, 11 Feb 2025 15:44:02 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:40100) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1thx6t-0002yd-8m for 76187@debbugs.gnu.org; Tue, 11 Feb 2025 15:44:00 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-439454602e5so3825685e9.0 for <76187@debbugs.gnu.org>; Tue, 11 Feb 2025 12:43:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739306633; x=1739911433; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r42e38++/7V+3U8LvASbyr9rVgjNTI7F5ypL13Y+Bv8=; b=e/URk3iTMxDVTLHp0H8j5WkhVVrOzdVgkG8XHlJk02uzETFBfq/hJ+BuK4p2PSBigp GNa2ZjcFiMQUMJvFkN1eUM5ugo4YF9Lapu8oFTwtGWuYymvyvypeTIMyI5jYif681/gt W8lRtRqHUJ8p4DTJLDoModWoIqTCf5CWHf0n4CTIgIfkF65HVq6x0WE4iKrzdMTtY8/D 0cK7Ja/YrRD9GKl5Zn1yISkHmissuli59IGEkDUOS2A5rxAq+2FUtM8kyaODtQwVs6r8 g2aABzd0WXgyVk6+F02viBxXzHfAjxDLoE9pv9YKEY4sCIhE1WEg7Ja9b63+Qhf9zk4W ixnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739306633; x=1739911433; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=r42e38++/7V+3U8LvASbyr9rVgjNTI7F5ypL13Y+Bv8=; b=uImdOgJtR5ibslgnAbHEwaU0J3G8ftpiEn1Bq985K8H9ybFrJ/mND69EaI0/Pw5aqQ PWy6h98nDEqkNJ/H7/4KxvqlB+crCxlzLYWVvgGTYDoUCbnRTXnup8jqVfud2WwToX4D 6HA+iC894erIGIz0coG2GBjVGHbhrL2+kDAygrY61adBdG3BPKmhWvJ5NHtjidmk//fo x7qJ48sKjzK+jJrrKVUsYHumOOQyajtZwK54jUkiXfQMxKs83PS3EqOhjqd/9a+hA7qo vGQ5Ytm9cPA0ZOjinYo+q9iRDw9EHy5YMvm0v/NRaIhklKbcrIbkO/Ve4qADKmubdB5b ZKcw== X-Gm-Message-State: AOJu0YwXIVAswl0YrORnbJ1f12LOFT5koYfsTbGzrwbSqvCaI4cftsPa XsqAjhFX+jLWiNe/3apWcPs69hkf52hhTlptoe01TJSv8+xHxIhh+uaFlQ== X-Gm-Gg: ASbGncu8P4FfFB/Ztrpio9zWe2iFf3g47f55SVUVBdSHv6AHOccRMTvAA2XhvOYEGmo wSy/+eNIxUvOA82NPPvVUEKHtuekKObDKJDPJF74GR8eoSWOGUpmNLRku5+ANoZvmae7H5I30ke adt0PEikToXqigJNNtAb6U3752cFYPd8xAtZel50pBL5u65BAYvFBGb5HHdrGZIubF/CZcDg8rv 52LKUnxHKNxb+VA+qhSiJaOkOxlRLj/gzWhyZMKF6oQKK28oa7Dy390ZB9DLh/gt5lwWB/4amWA 237GSIFTfSRSKsGKAPA= X-Google-Smtp-Source: AGHT+IEnyG21kgFZuD7OiBIO/7DUZeAnyTjh4JoPJqNBwSgGiT4M6krT9XquGCXoak0chFqZuchs4A== X-Received: by 2002:a05:600c:1c06:b0:439:4d1c:bf72 with SMTP id 5b1f17b1804b1-439581ca7abmr2471135e9.6.1739306632617; Tue, 11 Feb 2025 12:43:52 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439471bf782sm61304905e9.39.2025.02.11.12.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 12:43:51 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Paul Eggert Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <87a5ase33m.fsf@gmail.com> References: <87a5ase33m.fsf@gmail.com> Date: Tue, 11 Feb 2025 21:43:50 +0100 Message-ID: <875xlgdxfd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) K=C3=A9vin Le Gouguec writes: > Paul Eggert writes: > >> The second failure was with "make lisp/vc/vc-git-tests" in the test dire= ctory. I repeatedly ran that test, and it failed on the 20th execution as f= ollows: > >> Test vc-git-test-dir-branch-headers condition: >> (error >> "Failed (status 128): git --no-pager checkout -b feature/bar --trac= k master .") >> FAILED 2/8 vc-git-test-dir-branch-headers (0.316582 sec) at lisp/vc= /vc-git-tests.el:146 > > Interesting. I reproduced the 'checkout -b feature/foo master' failure > after 300 executions. > > "status 128" confounds me a bit; tho there is a surprising (to me) > number of hits for "git exit 128" on the net. Wondering if Git outputs > anything useful=E2=80=A6 > > Anyhoo, no clue yet - just wanted to ACK (openSUSE Tumbleweed FWIW), > what with having authored that test. Ah-ha. diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..b9d815e9a5d 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -106,7 +106,11 @@ vc-git-test--with-repo (defun vc-git-test--run (&rest args) "Run git ARGS=E2=80=A6, check for non-zero status, and return output." (with-temp-buffer - (apply 'vc-git-command t 0 nil args) + (condition-case err + (apply 'vc-git-command t 0 nil args) + (t (message "err: %s" err) + (message "buffer-string: %s" (buffer-string)) + (signal (car err) (cdr err)))) (buffer-string))) =20 (defun vc-git-test--start-branch () Yields: > err: (error Failed (status 128): git --no-pager checkout -b feature/foo m= aster .) > buffer-string: fatal: Unable to create '/tmp/emacs-test-uJtGe2-vc-git/.gi= t/index.lock': File exists. >=20 > Another git process seems to be running in this repository, e.g. > an editor opened by 'git commit'. Please make sure all processes > are terminated then try again. If it still fails, a git process > may have crashed in this repository earlier: > remove the file manually to continue. Pondering. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 16:12:56 2025 Received: (at 76187) by debbugs.gnu.org; 11 Feb 2025 21:12:56 +0000 Received: from localhost ([127.0.0.1]:59102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thxYu-000221-0h for submit@debbugs.gnu.org; Tue, 11 Feb 2025 16:12:56 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:48590) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1thxYp-00021Z-H5 for 76187@debbugs.gnu.org; Tue, 11 Feb 2025 16:12:55 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 2B49F3C00E400; Tue, 11 Feb 2025 13:12:45 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id 91NSoxIo0uek; Tue, 11 Feb 2025 13:12:45 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id E0C263C005179; Tue, 11 Feb 2025 13:12:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu E0C263C005179 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739308364; bh=ph8FRNUIPqhqmg7sYtCXmIZTK3LQhDWiuitZJeHfjUE=; h=Message-ID:Date:MIME-Version:To:From; b=P/LC88s+CEANJkdKhRYJ/eiQsGJyuiZxc/3aOCdk0NUqY3Vn+FIaN8LLzxidt6xur NasU5IFFD182STXKjPg5Wbq8OspKq2x468znQfP2s0qUkJvassk6QaopruDiT7kyw0 hNG6npgMivcYRlOvJ2r2FwM2o6RBJxnSMyI0LtqP7pwBd7yUrdds5e3cLgosJrgUwr SHdF6ALhLQU7YBaf6oIdEDb6H/lR8+R/7L6OAgSfRWJD3EiL6f2cItGiD1gXoX9Dtg KWqNErcLbtp4U/TNZz9+5/Bicasj/NEe+8dS/76PWMfVJa6GdPo4f3Ht52zNH2zoan XqZOU0oLry7Ng== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 6WKg0lc5Tdu6; Tue, 11 Feb 2025 13:12:44 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id CBC873C00E400; Tue, 11 Feb 2025 13:12:44 -0800 (PST) Message-ID: Date: Tue, 11 Feb 2025 13:12:44 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> Content-Language: en-US From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; keydata= 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 Organization: UCLA Computer Science Department In-Reply-To: <875xlgdxfd.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2/11/25 12:43, K=C3=A9vin Le Gouguec wrote: > Another git process seems to be running in this repository, I guess the test won't work with "make -j check", since some other test=20 might also be running git in that repository. If my guess is right, to=20 fix this you can arrange for the test to run in a clone instead.=20 Similarly for any other test that might want to alter that repository or=20 its working files. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 16:36:54 2025 Received: (at 76187) by debbugs.gnu.org; 11 Feb 2025 21:36:54 +0000 Received: from localhost ([127.0.0.1]:59134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thxw5-0003By-OM for submit@debbugs.gnu.org; Tue, 11 Feb 2025 16:36:54 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:40187) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1thxw3-0003Bg-Ta for 76187@debbugs.gnu.org; Tue, 11 Feb 2025 16:36:52 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-439454602e5so3890545e9.0 for <76187@debbugs.gnu.org>; Tue, 11 Feb 2025 13:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739309805; x=1739914605; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bun4DM5wDG2XNBy7EJwu20+O4Fp/qcesbClr4f5DS88=; b=k8BiQMPHfJHw8uf8e4CHJaFXCL1XQZuTxdDQXaivyDCPo8ac90THeHepveSlQN7VCn ZghKguJ1CqW7UFNAHZYMss2M5dEMNDMo9J2HC4tJwqd7WW47/NhSrkJq1bVjgYgPNObb VKyUNVv8ZuA5iJ/qmZI203Fx5vrMX854b+B3xWkX2/5UR6C0cy9Bw1+XSFyjpBMBvMXO bIMTXDj5JZiGyWSzKmBfdFCx2KLyLqHykb7LLTJNmaC3sektuFMYxazq4vJmQy4BwVg8 lYbVcEs+jQNtMXAued0iJaCf9QbRTNL65raTfa+FvZWGb/4O8iZmqZlpQa5UsgbecuOm opDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739309805; x=1739914605; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bun4DM5wDG2XNBy7EJwu20+O4Fp/qcesbClr4f5DS88=; b=T/3+xl8kjRiH4wCxNap/G+Geo50tK2PJvnku6J2jU0XpIbtVUGKtmDcoBAh+hq5bPS TZBRyvUaXNTjyM9wOmwofo6syqIBFuFa8Hspr72D5gBIn2Rmd9NNOm/5Zeha41knNT1T 5InyCz9E56GqkofoskPpWm0NUknan9gxuhkY6vZE0OgNJ9hllbSeS4AtrE6PRJg1G1ve M9ZSP5V7CGWZYlAhlnel6v0pT3GunsJVgiJJ9RGuVICFXsJ5PTdoElk+OfK2HbMCObHZ Glz7JqZ6MXsdHgta6qnEsJmDAvD56pICfLqileh4JqeSu4uJtW84X9nPIe389rEyPs8Y 6lRQ== X-Gm-Message-State: AOJu0YwIuTjswWN4fJ5XVAqRUt7l9g+SoufPFmwqMtgVnrotb+65FguZ 1VInWkpUQka/NjQN/zOgbnQysMw9Y6Rgmdo3zTBVxe0cvNygN/VR9yM4lg== X-Gm-Gg: ASbGncu9wQO9pJvo/XpsqbIsWc17jhY9HNaFjBdDMBZ1T8F/G/nuLvUMgqIr5pii8LE Y40wE00SN6JUARLby4q6bCXjZt/Nf7gRTINxul+9XPnm5cRgS0NLfLcY1UZTs0ktpOZy35Ayo5M USHbPzJHoIMC4u0EhJjkMKVATryN9WCMu9V8ksZngSqazBdWYxTBD0wBr6/79hUE1PlY2y0uAYb BIhL9F6sH/xtf0i4L4zyx8MngpI214qoenjearQyIl7RDC5c2gw+LmvClY1+5T/srNi2RfVsArA +YYW9GHOeik9/N9hQeA= X-Google-Smtp-Source: AGHT+IHPPm73O9ajacKYipc8X23LpJkcSG6hUHFradRzVTjSX7QKozsVbg6nO2EIREx3LR7TxUaw/g== X-Received: by 2002:a5d:648d:0:b0:38d:d906:dbbb with SMTP id ffacd0b85a97d-38dea250259mr207853f8f.2.1739309805065; Tue, 11 Feb 2025 13:36:45 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dc5e6f027sm13867561f8f.4.2025.02.11.13.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 13:36:44 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Paul Eggert Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> Date: Tue, 11 Feb 2025 22:36:43 +0100 Message-ID: <871pw4duz8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Paul Eggert writes: > On 2/11/25 12:43, K=C3=A9vin Le Gouguec wrote: >> Another git process seems to be running in this repository, > > I guess the test won't work with "make -j check", since some other test m= ight also be running git in that repository. If my guess is right, to fix t= his you can arrange for the test to run in a clone instead. Similarly for a= ny other test that might want to alter that repository or its working files. The test does arrange to run in isolated directories, using ert-with-temp-directory: (defmacro vc-git-test--with-repo (name &rest body) ;; =E2=80=A6 `(ert-with-temp-directory ,name (let ((default-directory ,name) ;; =E2=80=A6 ) (vc-create-repo 'Git) ,@body))) (ert-deftest vc-git-test-dir-branch-headers () ;; =E2=80=A6 ;; Create a repository that will serve as the "remote". (vc-git-test--with-repo origin-repo=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 (let ((main-branch (vc-git-test--start-branch))) ;; 'git clone' this repository and test things in this clone. (ert-with-temp-directory clone-repo ;; =E2=80=A6 )))) So unless I am missing something, 'make -j' ought not be a factor. My current working theories are: a. We fail to sync with some asynchronous processes spawned by vc before running these 'git checkout' commands; there is precedent for synchronization problems: (defun vc-git-test--dir-headers (headers) "=E2=80=A6" ;; FIXME: to reproduce interactive sessions faithfully, we would need ;; to wait for the dir-status-files process to terminate; have not ;; found a reliable way to do this. As a workaround, kill pending ;; processes and revert the `vc-dir' buffer. (vc-dir-kill-dir-status-process) (revert-buffer) ;; =E2=80=A6 ) FWIW, sticking one more speculative (vc-dir-kill-dir-status-process) after (revert-buffer) lowers the failure rate (took 10 minutes to reproduce it once; no second occurrence after >5k runs over 30min). b. One of the test's git commands spawns a=E2=80=A6 background GC job or something, and the test's next git command trips over that. I suppose either a or b would be solved by vc-git-test--run spinning for a bit while (file-exists-p "=E2=80=A6/index.lock"); ideally though I'd pref= er to catch the locking process red-handed=E2=80=A6 not sure how to achieve this though. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 16:39:55 2025 Received: (at 76187) by debbugs.gnu.org; 11 Feb 2025 21:39:55 +0000 Received: from localhost ([127.0.0.1]:59140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thxz0-0003HN-O4 for submit@debbugs.gnu.org; Tue, 11 Feb 2025 16:39:55 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:39672) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1thxyy-0003H8-8I for 76187@debbugs.gnu.org; Tue, 11 Feb 2025 16:39:53 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4393f673f76so4467135e9.2 for <76187@debbugs.gnu.org>; Tue, 11 Feb 2025 13:39:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739309986; x=1739914786; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eBYTMYPuAVQXseX/tHFDfUx5bI78pX8YmV0gZgibbXQ=; b=RjV1EN7O3R1Z3VBVOQlyWsaxlt0yxWUYFKsqXFFPiv1Rs7DZEgm6YHYzToQL8eLQ/d 08RGdOoRgyMGOF7YEI7LtrBsIwpf1rfj09B/UB0EJwaBtLoFFjdZjTCZ7ZjxKvxi2ZVW jpcnm9jq1oeGITyL0welzEYfiykEr9wzJqSfYaN6v+0nIXuSyn+5JJw5/SrUOY5mSgcG AduvK4jPwWjBVcJM8GqrEop1Y5dTqD/I4O+jVOZX/S82eM7i6QAeT8vGnzAf0KjEq10+ XquP6RXBMYo7At6vyX/3edrkYN9/VehYUP7xSuLWdIPGAxO0bVg7slVqh5V8NWs7OKJx oodw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739309986; x=1739914786; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=eBYTMYPuAVQXseX/tHFDfUx5bI78pX8YmV0gZgibbXQ=; b=q6V9pjrcexidckgnusZ8Fag0G/g+8Cb6/e0s37l13A+OFfOS3mWnYbqa6QqtqWN7iO KOpB83eN0K8FVrXP9+JG/AR4UYx0v9AFU7MJcPMMa0GhP66LulVxobnfqJiffh/w76aF ZQD2S/y/89+9noGcr3TR90CGLdXLQW1KsCfpmOVvuboLNy/gvSkwad57sYoZnnnJ6ECK 2G7Oo07mDl6lgthjSlOojUZvr0BzZhKhaWvMg/EWjby4wJ3kTLPnv23CbKcTLxCfgN65 oVDac+mxWJ2AxvMploymiDYC3J+e8F4S3i4mFJpeYSQtaeq/blLpiWRgPt96IPcaVU7z xL7Q== X-Gm-Message-State: AOJu0Ywx8wgvW/JyhEvv2cT0CVi9A953es/PznpcxLJ875vFPzmAL9XX ii1+S41VQ5h7LqmPwhnlYAjM/yj1VrmLGGPIs4DOiKYHcOZz8WHu1vWztw== X-Gm-Gg: ASbGncu1cD8e6MZfCmsvaGkHU6ZSxG4AHGziGTH50FagilgHtPRXjtbGmWcAOQkwG4t jmaJggy1XapUsp/RQSbw3bi34Yu6d8Ljm3HazPpJOVf5hb3xw9VFMRPCXmdg/+UKYGrIFnZChrT cDCwyqKZGsYIHz8CAon+oapYCorJCuldsby1BkmNfTSDNknHOkfPQ/oGwt4OZEWmPo47owPIvKE BLG3USctoVRq3lcBIXANGH4Um71gUeYTBZBbOGY4OrYJbHyS9/IHHQswrbxBqjiNtxLrm6aOdti SWKi0oFCRHH5SocC9Dw= X-Google-Smtp-Source: AGHT+IEcuDyjWWSOoVSBlT9vDkvAFO/9eVitRugsumewCENDofWNCm8Clsxjd73Q6dWtRCxPUUuOXQ== X-Received: by 2002:a05:6000:156f:b0:38d:be2c:37f with SMTP id ffacd0b85a97d-38dea26fbe0mr166939f8f.4.1739309985838; Tue, 11 Feb 2025 13:39:45 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dc7711bbbsm13298049f8f.47.2025.02.11.13.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 13:39:45 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Paul Eggert Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <871pw4duz8.fsf@gmail.com> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> Date: Tue, 11 Feb 2025 22:39:44 +0100 Message-ID: <87wmdwcg9r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) K=C3=A9vin Le Gouguec writes: > Paul Eggert writes: > >> On 2/11/25 12:43, K=C3=A9vin Le Gouguec wrote: >>> Another git process seems to be running in this repository, >> >> I guess the test won't work with "make -j check", since some other test = might also be running git in that repository. If my guess is right, to fix = this you can arrange for the test to run in a clone instead. Similarly for = any other test that might want to alter that repository or its working file= s. > > The test does arrange to run in isolated directories, using > ert-with-temp-directory: (As a matter of fact, to reproduce this issue, I have been running while make -C test lisp/vc/vc-git-tests ; do continue ; done so AFAIU 'make -j' cannot be a factor?) From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 17:09:57 2025 Received: (at 76187) by debbugs.gnu.org; 11 Feb 2025 22:09:57 +0000 Received: from localhost ([127.0.0.1]:59249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1thyS5-0004mL-7t for submit@debbugs.gnu.org; Tue, 11 Feb 2025 17:09:57 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:41154) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1thyS2-0004lz-8P for 76187@debbugs.gnu.org; Tue, 11 Feb 2025 17:09:55 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4394412e6efso3809035e9.0 for <76187@debbugs.gnu.org>; Tue, 11 Feb 2025 14:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739311788; x=1739916588; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u2BkG6AuAtWwP5m9qzkSPXinIBSd835n8pO1DIV0WAI=; b=cJUrBVZAuSSnS4fBPHvSAd5MtuNXowKTI4u59yVQiZG4V0xm7SrSRjUX/8so5Sq5FZ AP83qFPbkMLOhBE8e8dexT2BmOB9SktQKiUhfy2FhLo8jBl1lGi2BtuBr3FDbtQ8ZeE3 YOLntmGMo32puleIHhw2oYLTqBeM9o3GkN3fqQPpsM5dmffBTAbVQXPmWpMhkTlXzxHF YJYk3tmUszqy3qP3qCYnGw0Wv19adTmtZDua3ubH2PCq04uBr9t8BlXQWsOwWX9ngY0i OT/UY4FR0QD0dEl8X6WnM+RauviFtH0xg2anYaM6Jankh5Qgvog82xX2FKKKCh+9E3vq z6lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739311788; x=1739916588; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=u2BkG6AuAtWwP5m9qzkSPXinIBSd835n8pO1DIV0WAI=; b=vDywOIAwnoejVSs/fXN33wpVjpo4+AIfHxS+4/cd4lErkEAfHvJmX8jP6/1ZEXzEDI vCUd/CgpZkVXCfcX7c5ja/cMnB08dkqK3ku1dlVVtOZBPSkcNQVeZmTH9ENGu46NsM3D x0doYbC0PjyQrW5w1+FsPYv5YXABTVyDcCOIvogM6lrlIScfOEtDwrp1FCsFn1G8OUul LXLfPVEb47GBX6+m6FfdkEkKOjf369o5G8NLsIQg5AkVISQz2tDxnRxWvMgcHqJQBn1m T0KLVQrU1n0e85dTcoaUvQkxHDmm5vxcS/WmpM9W1ZfVewG1XwWOD1wvFYqgH9ydR1FA r5iQ== X-Gm-Message-State: AOJu0YycaeZ/E8iLcqSjydmKBx3qOxr+rBP81ANXLQSXFJehTjcAiSkh HcCUsiWTL/wbM1sAHd/OO8RNSnsB+Q9hTPaZ5K3xQ8Ep/N9xyN0TlVB4Xg== X-Gm-Gg: ASbGnct1+R7SVaRPEqLu12XaChz7JojtQ71d8ruM+xPWvW/TmEg7WSaguPI1zhsA1k4 5ToSZzwMp3+FVAC5Wi1UjM4FPHZX+62j8CLfChOpuQOrQQvnkIw/F9/liw1Md1OA7AIVr0UkCYo fK21jlTh+nJXqJH0aK3epJmcksYVBv3dAkFIzpFJJqIZoOIodcscuCXMDG29WBlmtwbHvqniMVS dazdYxUe1wMxSjcZ0K/VK/hBnv9TlfUZ6+s+Ao5PlUwTD7rczGmKPN6ANmSDXwL6z2T3jELUakb fp7/fUdSgPvrOXocFuE= X-Google-Smtp-Source: AGHT+IFqisQhKeAEfoJOVNAmKUkiZ+NjEu7/4zZuidnt/0Zd5zdNq7eD+hei5M7xKRwGrsv+im1gPw== X-Received: by 2002:a05:600c:46c7:b0:434:9cb7:7321 with SMTP id 5b1f17b1804b1-439581600c7mr3356025e9.1.1739311787782; Tue, 11 Feb 2025 14:09:47 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a04f8a2sm805045e9.2.2025.02.11.14.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 14:09:46 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Paul Eggert Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <871pw4duz8.fsf@gmail.com> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> Date: Tue, 11 Feb 2025 23:09:45 +0100 Message-ID: <87seokcevq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) K=C3=A9vin Le Gouguec writes: > Paul Eggert writes: > >> On 2/11/25 12:43, K=C3=A9vin Le Gouguec wrote: >>> Another git process seems to be running in this repository, >> >> I guess the test won't work with "make -j check", since some other test = might also be running git in that repository. If my guess is right, to fix = this you can arrange for the test to run in a clone instead. Similarly for = any other test that might want to alter that repository or its working file= s. > > The test does arrange to run in isolated directories, using > ert-with-temp-directory: > > (defmacro vc-git-test--with-repo (name &rest body) > ;; =E2=80=A6 > `(ert-with-temp-directory ,name > (let ((default-directory ,name) > ;; =E2=80=A6 > ) > (vc-create-repo 'Git) > ,@body))) > > (ert-deftest vc-git-test-dir-branch-headers () > ;; =E2=80=A6 > ;; Create a repository that will serve as the "remote". > (vc-git-test--with-repo origin-repo=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > (let ((main-branch (vc-git-test--start-branch))) > ;; 'git clone' this repository and test things in this clone. > (ert-with-temp-directory clone-repo > ;; =E2=80=A6 > )))) > > So unless I am missing something, 'make -j' ought not be a factor. > > My current working theories are: > > a. We fail to sync with some asynchronous processes spawned by vc before > running these 'git checkout' commands; there is precedent for > synchronization problems: > > (defun vc-git-test--dir-headers (headers) > "=E2=80=A6" > ;; FIXME: to reproduce interactive sessions faithfully, we would n= eed > ;; to wait for the dir-status-files process to terminate; have not > ;; found a reliable way to do this. As a workaround, kill pending > ;; processes and revert the `vc-dir' buffer. > (vc-dir-kill-dir-status-process) > (revert-buffer) > ;; =E2=80=A6 > ) > > FWIW, sticking one more speculative (vc-dir-kill-dir-status-process) > after (revert-buffer) lowers the failure rate (took 10 minutes to > reproduce it once; no second occurrence after >5k runs over 30min). > > b. One of the test's git commands spawns a=E2=80=A6 background GC job or > something, and the test's next git command trips over that. c. That vc-dir-kill-dir-status-process actually kills a Git process that is "holding the lock", in which case=E2=80=A6 > I suppose either a or b would be solved by vc-git-test--run spinning for > a bit while (file-exists-p "=E2=80=A6/index.lock"); ideally though I'd pr= efer to > catch the locking process red-handed=E2=80=A6 not sure how to achieve this > though. =E2=80=A6 this will not work. I'd like to believe that the present bug stems from that dodgy FIXME workaround, and addressing the latter will fix the former, but that FIXME was an admission of defeat already. Haven't grown wiser since then unfortunately. (No luck reproducing any of this under strace FWIW) From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 19:36:03 2025 Received: (at 76187) by debbugs.gnu.org; 12 Feb 2025 00:36:03 +0000 Received: from localhost ([127.0.0.1]:59639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ti0jT-0006ii-2f for submit@debbugs.gnu.org; Tue, 11 Feb 2025 19:36:03 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:59944) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ti0jO-0006i4-GQ for 76187@debbugs.gnu.org; Tue, 11 Feb 2025 19:36:00 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id AA2473C011BC5; Tue, 11 Feb 2025 16:35:51 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id wKuJ7pUCU_fh; Tue, 11 Feb 2025 16:35:51 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 6E3A13C011BD7; Tue, 11 Feb 2025 16:35:51 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 6E3A13C011BD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739320551; bh=LFuvoOkPX9x8/zQkDcK/14KX1S90+f5oDyrwxkn1D0s=; h=Message-ID:Date:MIME-Version:To:From; b=IGO72Kx1BUNU2Jf68zTpJvxOq+najxYlM+f7aZ/P/OG3/X5f7jNTHztqNaLprEolW S9JZUCtmXAJzvJDlLpC4mNmbgbJOKwVzNwGnI0EXZ0hliI8m/PhTOoTIUpYmPAV1l4 TibUjJDZNYEZlaFy0fErrzdgsIn4CVK/MqiyHApesPZsI/pUKrFJ2uWJEN53FmO3Cg z7Aggj0zonlfpbfKcndYNgdZjBDlDIuw6LtHSyzRgojbhehfkHjxTfydeznG8j6TCV VoYrB8yaPz4ayh5xr0/N/eURK+IOIarwqcm3ZIiS++gnuV8x82bIfiok1xsxxj7NXF kVcYIFATVEnig== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id OOmPuybNkDUj; Tue, 11 Feb 2025 16:35:51 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 4D7D13C011BC5; Tue, 11 Feb 2025 16:35:51 -0800 (PST) Message-ID: Date: Tue, 11 Feb 2025 16:35:51 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> Content-Language: en-US From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; keydata= 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 Organization: UCLA Computer Science Department In-Reply-To: <871pw4duz8.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2/11/25 13:36, K=C3=A9vin Le Gouguec wrote: > ;; FIXME: to reproduce interactive sessions faithfully, we woul= d need > ;; to wait for the dir-status-files process to terminate; have = not > ;; found a reliable way to do this. One way would be set up those processes with a pipe connecting them to=20 you, and then read from the pipe. Admittedly I'm just spitballing at this point. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 08:04:11 2025 Received: (at 76187) by debbugs.gnu.org; 12 Feb 2025 13:04:11 +0000 Received: from localhost ([127.0.0.1]:33211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiCPS-0002Dl-MQ for submit@debbugs.gnu.org; Wed, 12 Feb 2025 08:04:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45294) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiCPQ-0002DV-Iv for 76187@debbugs.gnu.org; Wed, 12 Feb 2025 08:04:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiCPJ-0007ow-2V; Wed, 12 Feb 2025 08:04:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Rc/uhkQDt/pRB8zD2QH/27NEdFq296jM87XTyoXf49U=; b=gpx9ufltefLkfw1JKz2W FyM8B2alD3C7Cy2oPKKb9ybpBDK1zcrG1So1bdydTBWuZ5r/gHO9SE1kLfqbYMVtfgj45ye5btXmE QQWinSWgF+TPaTGgr/WGITlz6ajIy4AHkYMgTJW0WqO1HLgxYyXXEpvTOzMAi21xBjijUxMqOGHiY 8SFw98NcPjf+4kUZwVUKeEITDi7tBRr17wTe+l4hVPJT+nxRPwynMMJhyksuoESP9tQUBsXushbGv OVcyhvnhEKMOLUBvErhWZZ8im4MrjWr4N9gwJCncFWCzgSdw93Az2nsGr672zTDHMFwKmjNZbQxzg lxyTaIdBx9f0XQ==; Date: Wed, 12 Feb 2025 15:03:57 +0200 Message-Id: <86pljnl3gi.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-Reply-To: (message from Paul Eggert on Tue, 11 Feb 2025 13:12:44 -0800) Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, kevin.legouguec@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 76187@debbugs.gnu.org > Date: Tue, 11 Feb 2025 13:12:44 -0800 > From: Paul Eggert > > On 2/11/25 12:43, Kévin Le Gouguec wrote: > > Another git process seems to be running in this repository, > > I guess the test won't work with "make -j check", since some other test > might also be running git in that repository. If my guess is right, to > fix this you can arrange for the test to run in a clone instead. > Similarly for any other test that might want to alter that repository or > its working files. Or just arrange for this test to wait for a while until the lock is freed. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 08:21:45 2025 Received: (at 76187) by debbugs.gnu.org; 12 Feb 2025 13:21:45 +0000 Received: from localhost ([127.0.0.1]:33249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiCgS-00067A-LV for submit@debbugs.gnu.org; Wed, 12 Feb 2025 08:21:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58386) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiCgQ-00066u-OW for 76187@debbugs.gnu.org; Wed, 12 Feb 2025 08:21:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiCgK-0004HS-FA; Wed, 12 Feb 2025 08:21:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ur/s5gT31+MZbYUThAmbCgH/VlU8/vt8lIvWeoatI6U=; b=Fqvhp7mUS0oX6ntTU4K4 xT7Tj9hBtoI+ZYkrf0DGjQEhj9M2RD3HVmBuraIGy7utWKnuDPLSTUTU/dWHfTEhyJQPqhhltxSYC V9txVx+BMBpq0FIc3h9kPqzmbhYi+34+vV56bvAeukOMWt7Kl+5oL1WKEfDvtafLZSuUcrUmRYwDo IvPvtEykUcWD9PMt0a01oqubIx0VHTduLq3xBHXeK92vMY4pcs40EAvj7GXWiAvSOnF43ecyyhcLQ tVMs6vBk6ah4oOrhlRs3AT9s+GTFTerKQiaQ6KKXjYWzJIxL6GAVH4+BtA/Rhdv60Ul59Q214tUnT Zunga3u93np2gQ==; Date: Wed, 12 Feb 2025 15:21:34 +0200 Message-Id: <86ikpfl2n5.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec In-Reply-To: <87seokcevq.fsf@gmail.com> (message from =?utf-8?Q?K=C3=A9vin?= Le Gouguec on Tue, 11 Feb 2025 23:09:45 +0100) Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 76187@debbugs.gnu.org > From: Kévin Le Gouguec > Date: Tue, 11 Feb 2025 23:09:45 +0100 > > Kévin Le Gouguec writes: > > > FWIW, sticking one more speculative (vc-dir-kill-dir-status-process) > > after (revert-buffer) lowers the failure rate (took 10 minutes to > > reproduce it once; no second occurrence after >5k runs over 30min). > > > > b. One of the test's git commands spawns a… background GC job or > > something, and the test's next git command trips over that. > > c. That vc-dir-kill-dir-status-process actually kills a Git process that > is "holding the lock", in which case… When we kill a Git process, we should also remove the lock file, I think. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 17:37:32 2025 Received: (at 76187) by debbugs.gnu.org; 12 Feb 2025 22:37:32 +0000 Received: from localhost ([127.0.0.1]:38811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiLMK-0008IO-6R for submit@debbugs.gnu.org; Wed, 12 Feb 2025 17:37:32 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38552) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tiLMH-0008Hw-92 for 76187@debbugs.gnu.org; Wed, 12 Feb 2025 17:37:30 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-38dc9fc48fdso33923f8f.2 for <76187@debbugs.gnu.org>; Wed, 12 Feb 2025 14:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739399843; x=1740004643; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=OdDdcTugXUSx8tNu1NB/vtYFtISFedY5veqGfbGEwpc=; b=jHSIiUZ1h1vZVgO1fY+nVgW1v07W2NFObtbIgPOWoshX0OLc68nrE+bKUswx25citR 2zdVHgwSCR0pPeAps3uHA1jUj35fXRxaJAmVpDAlwNs1ygXHx7qzH5j+XDSrWYiNtisU cfavXdqiqDLjOuqKxt0NeGGMZNt+W7PXs+HOD2KPdhM8K+H8alvu8bme8EGaTZeWKT4w ppKD2pdobO60Gocq3v4N0E66IZ7RbVDhl/nw2KPU6cpPJA+hXpcfl3lW4/brnvBquW6d 9BE3OFQg+joFf4QqyT04U0su7BpJVBs9pdov7wQ29tulFBfi0HC4jR0is14vpygcVe8j OrQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739399843; x=1740004643; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OdDdcTugXUSx8tNu1NB/vtYFtISFedY5veqGfbGEwpc=; b=YvYCmekuVakBfrH7ssK/zMkiSIrnmtUK4vlPBMOprRstHXqs3rtRMB8pz7bnqB6yaF 6BDQ8zfCtX1HcFGig7KZ2CI5RjnT9YuyHdmZOVN2TdNTRQRDzMn4v2j80R8mY0imIFwu qWptCcdHveVsT/n+/B5LGoNzZdLBop21uLngYaUH8hqGU32hJa5R7GSuzBFVeIx9BCOD cGA1payFniWFfbZFWbDaORt4lXM4EaK+fyC6nYlkLKkOgb/Qy1K8eHaR54tc/VNZQZsq /1oKOGL/4ekSkgMZqIY5PwqXkQZVbm2be3slBw7kcHI7PqLFEj7DmjjzrRBsHYAnJ3Bc EN5g== X-Gm-Message-State: AOJu0YwvLUzxW4jA5SvebluWYKQB1jEpLaXoeWEOwL/UNTzrwh+eDkV6 I7E5CN1N9SHjsQMLAveyBhNA7tunGyBBXJW6V9K0dfs0/vjFKYq/ X-Gm-Gg: ASbGncvrcbG6Iw1N+cnXdF9T255Rp3whgWlMH5REkkyvu/m+eFdmiXU7tSMBrKIgW5Z Ic0AAK8aSG4EXPp8BHuc+hYSyUN2dDrhT3dj+RTyfRXh5LqOhbJlbsEZ2DzpYd/3aQXmi+9yu0x 7+YwRKD07krFLN0YSZBK0pE2G5cLleixsJN1QFTQiVUIwpoeobPrgV8e22UC8kAj/RCJ/rtbMWS J695bo80eBWQcUQsomnvd+nuMBqCjtn4/EfhMbCdo0Qy52ggvw8guAkujZJL89xr2gG/m5KwU6X F+CEQ+EaiIIRsfq5Qk4= X-Google-Smtp-Source: AGHT+IEwOyn0rDOrnvDJp8AiDHnuMbUmfdJj3idHK2F8+H8vskxRn9qGWn44lMNF8T8RPyXdAs+wFw== X-Received: by 2002:a05:600c:1ca8:b0:434:941c:9df2 with SMTP id 5b1f17b1804b1-439582be8f4mr18015665e9.8.1739399842351; Wed, 12 Feb 2025 14:37:22 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f258ccda0sm152571f8f.27.2025.02.12.14.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2025 14:37:21 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Paul Eggert Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <87seokcevq.fsf@gmail.com> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> Date: Wed, 12 Feb 2025 23:37:19 +0100 Message-ID: <878qqardr4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable K=C3=A9vin Le Gouguec writes: >> My current working theories are: >> >> a. We fail to sync with some asynchronous processes spawned by vc before >> running these 'git checkout' commands; there is precedent for >> synchronization problems: >> [=E2=80=A6] >> >> b. One of the test's git commands spawns a=E2=80=A6 background GC job or >> something, and the test's next git command trips over that. > > c. That vc-dir-kill-dir-status-process actually kills a Git process that > is "holding the lock", in which case=E2=80=A6 > >> I suppose either a or b would be solved by vc-git-test--run spinning for >> a bit while (file-exists-p "=E2=80=A6/index.lock"); ideally though I'd p= refer to >> catch the locking process red-handed=E2=80=A6 not sure how to achieve th= is >> though. > > =E2=80=A6 this will not work. > > I'd like to believe that the present bug stems from that dodgy FIXME > workaround, and addressing the latter will fix the former, but that > FIXME was an admission of defeat already. Haven't grown wiser since > then unfortunately. Bafflement continues. With the attached patch that * removes the call to vc-dir-kill-dir-status-process to eliminate hypothesis c, * replaces it with a (while (vc-dir-busy) =E2=80=A6) loop to mitigate a, * adds a (while (file-exists-p ".git/index.lock")) loop to mitigate b, I still reproduce. Here, after 700 runs in 6min: GEN lisp/vc/vc-git-tests.log Running 8 tests (2025-02-12 23:16:08+0100, selector `(not (or (tag :uns= table) (tag :nativecomp)))') passed 1/8 vc-git-test-annotate-time (0.002284 sec) Paused 1 time(s) waiting for vc-dir-busy err in /tmp/emacs-test-dhul2y-vc-git/: (error Failed (status 128): git = --no-pager checkout -b feature/foo master .) (buffer-string: fatal: Unable to create '/tmp/emacs-test-dhul2y-vc-git/.git/index.lock'= : File exists. Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue. ) I have a hard time making sense of the sequence of events. Evidently: 1. vc-git-test--run did *not* pause for (file-exists-p ".git/index.lock"), 2. but Git *still* tripped over a preexisting .git/index.lock. Logging default-directory in the condition-case error handler confirms we are in the correct directory, so I do not understand why file-exists-p did not see the lock that Git reports. All I can think of is a stray Git process =C2=BFstarted at some point by someone? that grabs t= he lock between steps 1 & 2. Barring "turn off background processing" knobs for VC and/or Git that I missed, not sure what to try next beside catching that "index.lock exists" error and re-trying after a delay. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=debug.patch Content-Transfer-Encoding: quoted-printable diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..decfb2220d4 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -103,10 +103,32 @@ vc-git-test--with-repo (vc-create-repo 'Git) ,@body))) =20 +(defun vc-git-test--wait (what desc) + "TODO" + (let ((i 0) + (max 20)) + (while (funcall what) + (when (> (cl-incf i) max) + (error "Timed out waiting for %s" desc)) + (sleep-for .05)) + (when (> i 0) + (message "Paused %d time(s) waiting for %s" i desc)))) + (defun vc-git-test--run (&rest args) "Run git ARGS=E2=80=A6, check for non-zero status, and return output." + ;; bug#76187: Git sometimes reports an index.lock file and bails, + ;; suggesting another lingering Git process in the same repo. Since + ;; this test runs in a temporarily-generated repo, that process is + ;; probably an asynchronous one initiated earlier by this test; for + ;; lack of better understanding, wait until the lock is released. + (vc-git-test--wait (lambda () (file-exists-p ".git/index.lock")) + "index.lock") (with-temp-buffer - (apply 'vc-git-command t 0 nil args) + (condition-case err + (apply 'vc-git-command t 0 nil args) + (t (message "err in %s: %s" default-directory err) + (message "(buffer-string:\n%s\n)" (buffer-string)) + (signal (car err) (cdr err)))) (buffer-string))) =20 (defun vc-git-test--start-branch () @@ -126,10 +148,10 @@ vc-git-test--dir-headers return a list of (NAME . VALUE) pairs, where VALUE is nil if the header is absent." ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) + ;; to synchronize with the dir-status-files process; have not found a + ;; reliable way to do this. As a workaround, wait until vc-dir stops + ;; being "busy" then revert the `vc-dir' buffer. + (vc-git-test--wait #'vc-dir-busy "vc-dir-busy") (revert-buffer) (mapcar (lambda (header) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 02:06:38 2025 Received: (at 76187) by debbugs.gnu.org; 13 Feb 2025 07:06:38 +0000 Received: from localhost ([127.0.0.1]:39878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiTJ0-0003YJ-AW for submit@debbugs.gnu.org; Thu, 13 Feb 2025 02:06:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35982) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiTIy-0003Y5-TY for 76187@debbugs.gnu.org; Thu, 13 Feb 2025 02:06:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiTIs-0004y0-Qm; Thu, 13 Feb 2025 02:06:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=tNa667ezCnLzA7JckHbDzOiX97BAuM1nb3c40ZBiuDY=; b=f0ttvcpUcWKGLu9pgK73 OWx8b2jyi9WwB125djKdeOWA3TWjecdbfMMr9yCHhR3glWccLKbIwn6WOYYcumQTcq6oYrPU1bA+Q gvrnStIFgFr+abOuaJ4efJJPs+UkJ+CsSJBELnWBIHk9feWT7Z2FmMbqS5xALrLIz/EV7Tn+b0qEP dTPqO7JQqaLpJC6kZ8hZDzGkAChjFgunLqPyfVXl35rXQU4VtEY4Uc0ZPqLxwXV1TeJP2qvF+lKKP 1ZR9DPRRH1XJlZx//AOXEr20NCeHml5gTGF/VQ+kCwyg0NBsqPyTP5Q+RgiufMeuwOI0bIukeao+0 Amk/3zFzurgG8w==; Date: Thu, 13 Feb 2025 09:06:27 +0200 Message-Id: <86ed02jpcc.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec In-Reply-To: <878qqardr4.fsf@gmail.com> (message from =?utf-8?Q?K=C3=A9vin?= Le Gouguec on Wed, 12 Feb 2025 23:37:19 +0100) Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Kévin Le Gouguec > Cc: 76187@debbugs.gnu.org, Eli Zaretskii > Date: Wed, 12 Feb 2025 23:37:19 +0100 > > Bafflement continues. With the attached patch that > > * removes the call to vc-dir-kill-dir-status-process to eliminate > hypothesis c, > * replaces it with a (while (vc-dir-busy) …) loop to mitigate a, > * adds a (while (file-exists-p ".git/index.lock")) loop to mitigate b, > > I still reproduce. Here, after 700 runs in 6min: > > GEN lisp/vc/vc-git-tests.log > Running 8 tests (2025-02-12 23:16:08+0100, selector `(not (or (tag :unstable) (tag :nativecomp)))') > passed 1/8 vc-git-test-annotate-time (0.002284 sec) > Paused 1 time(s) waiting for vc-dir-busy > err in /tmp/emacs-test-dhul2y-vc-git/: (error Failed (status 128): git --no-pager checkout -b feature/foo master .) > (buffer-string: > fatal: Unable to create '/tmp/emacs-test-dhul2y-vc-git/.git/index.lock': File exists. > > Another git process seems to be running in this repository, e.g. > an editor opened by 'git commit'. Please make sure all processes > are terminated then try again. If it still fails, a git process > may have crashed in this repository earlier: > remove the file manually to continue. > > ) > > I have a hard time making sense of the sequence of events. Evidently: > > 1. vc-git-test--run did *not* pause for (file-exists-p > ".git/index.lock"), > 2. but Git *still* tripped over a preexisting .git/index.lock. > > Logging default-directory in the condition-case error handler confirms > we are in the correct directory, so I do not understand why > file-exists-p did not see the lock that Git reports. All I can think of > is a stray Git process ¿started at some point by someone? that grabs the > lock between steps 1 & 2. Yes, something like that. A.k.a. "a race condition". > Barring "turn off background processing" knobs for VC and/or Git that I > missed, not sure what to try next beside catching that "index.lock > exists" error and re-trying after a delay. How about just ignoring the error in this case? AFAIU, it's rare enough to not be important, right? AFAIK, you cannot have more than one Git instance modifying the repository at any given time, so this problem cannot be fixed in principle if we are running tow or more Git sessions in parallel. IOW, these tests must NOT be run via parallel make processing. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 13:23:25 2025 Received: (at 76187) by debbugs.gnu.org; 13 Feb 2025 18:23:25 +0000 Received: from localhost ([127.0.0.1]:45437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tidrx-0002zD-6v for submit@debbugs.gnu.org; Thu, 13 Feb 2025 13:23:25 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:39874) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tidrv-0002yx-7B for 76187@debbugs.gnu.org; Thu, 13 Feb 2025 13:23:23 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4395e234c02so1615185e9.3 for <76187@debbugs.gnu.org>; Thu, 13 Feb 2025 10:23:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739470997; x=1740075797; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dhRq55APrwHVfl/qMRfK9x4gAUX4WZZ53ltHH+MTl5o=; b=SGToW3pTe44inWBZRSkJgwlMHEJUKYcZXPfexmjCUg2JoAXPfGcHYa+0AqOfwgexW2 TrYQJi38dw0cuGXTaG7r3UwmKcawqu0YPdGAo8cW7Afnd0wUfhu+3/OFcHOTM9C+MDjy vw5yYIT7ljX5D+RbmQvT5UF1NZhvDr0YP390zG+0GQjKY6R571d68Nm+u0Grv5nd7cWI J9ujhbZCT4b5EK9uEX9MJumWlssGOnqWnuWdm9n5KE2VuhOFClJzUszTd81qEJcW2z7/ xBs5rix+TzKiPNAUCOsNUpMVqMIhxJ0c90Vn5V5jvesPe/XxsZNHFDAdEr/RYZh21LmM Orxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739470997; x=1740075797; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dhRq55APrwHVfl/qMRfK9x4gAUX4WZZ53ltHH+MTl5o=; b=wh9DKZYiUxRgIuI0OJjsmLZJ+GFxi7Ip3RAobcPhSg2SQSUzwnVSy1+FDNFiaNhonp xJAvwEIr1DQZiQNuVcm5KF6HY+1Ez1gJdDQl0R3zld0PNcLbIqMrDNrYII8K/v5D/BhH RfE09X0ZCH1IWqHdihZ/NbM8ovM8lEfuydIPkT53XVYiTod+wf6Q1g8KpP8BdR0l1EGY LL6eB5C29Vby/jJnTiBut0L6Ap/He0loYFwQjgucTQ9yHUx2ynrFh2mRXb2q2zRkW/jt FrB8+43rp0LO4ukZ4DV4X6AC529oNI1tB/aKjdNPeWXhD0NaHHunYxvacyMGZb6+ghHu ppow== X-Forwarded-Encrypted: i=1; AJvYcCXiAcqugZzdyFW05atToOou/EDgdc4ygSK6t0O6NGqWKBNHA8OjtP86wKTtsdQFe2HrcS4rqw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy39KXI7PBb2DcOK/U2GhQhPx86xLgBB3qdHUmlFjgrpVtRZhAF AWK9jZoZWDEV1BuS4yQYyFwOpWY3gOf7nZMUq3U9nq6fZvreXMyvqZjjBg== X-Gm-Gg: ASbGncu/4VSoJST7LBxoQz/l0VYrwkFJSQSlDMnPpLHUheT55rwF3Zly8Oe8C+LwjVB ANCF/artX4RBtLA/Rgc5uNzWzI3roCvEJBG7wFLl6DyWVjyMLXvSlqp4xnW8o+LuCM989o4guvK QnOx623pHkKCBre0cpXLY+1MB+9QCRsteowKWZirzIqpbe953oc38+7PujkjLn5G9nBCeycVhbu pd73Grj999eJ3u+aa1MweL75cE1RnzWjVZouEaYAex1wclZRUSoUCx3Yo3UIOmfaclQdXmdCxDQ c8rR8OAoliIZwCo4Qoo= X-Google-Smtp-Source: AGHT+IFf0l5DxCh3JxFoXxmRUhDfPtmvGRpVAkSclwqB/UoHCYxkc11S4gifzXjJQAol6VyufkFLxA== X-Received: by 2002:a05:600c:35c2:b0:439:5a37:814e with SMTP id 5b1f17b1804b1-439671480f1mr348405e9.7.1739470996659; Thu, 13 Feb 2025 10:23:16 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f259fdce7sm2539546f8f.96.2025.02.13.10.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 10:23:16 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <86ed02jpcc.fsf@gnu.org> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> Date: Thu, 13 Feb 2025 19:23:15 +0100 Message-ID: <87jz9tr9f0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> I have a hard time making sense of the sequence of events. Evidently: >>=20 >> 1. vc-git-test--run did *not* pause for (file-exists-p >> ".git/index.lock"), >> 2. but Git *still* tripped over a preexisting .git/index.lock. >>=20 >> Logging default-directory in the condition-case error handler confirms >> we are in the correct directory, so I do not understand why >> file-exists-p did not see the lock that Git reports. All I can think of >> is a stray Git process =C2=BFstarted at some point by someone? that grab= s the >> lock between steps 1 & 2. > > Yes, something like that. A.k.a. "a race condition". > >> Barring "turn off background processing" knobs for VC and/or Git that I >> missed, not sure what to try next beside catching that "index.lock >> exists" error and re-trying after a delay. > > How about just ignoring the error in this case? AFAIU, it's rare > enough to not be important, right? AFAIK, you cannot have more than > one Git instance modifying the repository at any given time, so this > problem cannot be fixed in principle if we are running tow or more Git > sessions in parallel. IOW, these tests must NOT be run via parallel > make processing. Apologies if my brain is too fried and I misunderstood: didn't I show that this error shows up without parallelism? $ while make -j1 -C test lisp/vc/vc-git-tests ; do continue ; done [=E2=80=A6 800 iterations later =E2=80=A6] Running 8 tests (2025-02-13 19:12:17+0100, selector `(not (or (tag :unsta= ble) (tag :nativecomp)))') passed 1/8 vc-git-test-annotate-time (0.002258 sec) Test vc-git-test-dir-branch-headers backtrace: [=E2=80=A6] vc-git-command(t 0 nil "checkout" "-b" "feature/foo" "master") [=E2=80=A6] vc-git-test--run("checkout" "-b" "feature/foo" "master") [=E2=80=A6] Test vc-git-test-dir-branch-headers condition: (error "Failed (status 128): git --no-pager checkout -b feature/foo master = .") (That was run on a fresh master checkout, to dispel interference from my debugging changes. See previous messages for more logs, in particular proof that (a) checking for index.lock presence before invoking vc-git-command does not save us, (b) replacing vc-dir-kill-dir-status-process with a busy loop on vc-dir-busy does not save us either, (a+b) together do not save us either) At any rate, to hopefully contribute something to the discussion if I misunderstood your comment: given the goals of this test, wondering if it would be acceptable to have it invoke vc-git-dir-extra-headers directly, instead of "pretending to be a user" and invoking vc-dir. If vc-dir is indeed responsible for whatever async process is thwarting that test, cutting that middle man out would work around that (and let us remove some scaffolding from the test to boot). (If Git is responsible for that async process, then that change alone will not help, although the scaffolding simplification would still be nice TBH) From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 13:56:38 2025 Received: (at 76187) by debbugs.gnu.org; 13 Feb 2025 18:56:38 +0000 Received: from localhost ([127.0.0.1]:45476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tieO5-0004Qw-Ad for submit@debbugs.gnu.org; Thu, 13 Feb 2025 13:56:38 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:40981) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tieO3-0004Qi-4V for 76187@debbugs.gnu.org; Thu, 13 Feb 2025 13:56:36 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4395cf61014so1322615e9.0 for <76187@debbugs.gnu.org>; Thu, 13 Feb 2025 10:56:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739472988; x=1740077788; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=HTHjeWn5Pyb7XX2o3ueK8PhzHxsIj6j48RbIjk052zE=; b=it4C8vVPqKhLvL+w01tAEtOSQ/cBHAGQxp0jT6MmBSqnKV1nh0csjYNgqLeuQo0OOD a/XyOueM1Zip3NWVk8ec/X3X+mmUvPGUxSQVYMzEmGrJdVn+vAnXbNzNjWOIY630s4fV CEeCZ37bupn9taVJhOTjR0e60pN8MOxLNKMEAoAJLJ1DrfcQ4ylvco/xDFfmxMvSM7rY Gr80NOkQ9Xra11mpuwL6NJJ1uInxY1qrXn39XJPmOg/XqZm4/PNrjZm9nSosPYnYWKTy CeXv5YhDaGBYhBCtB6CmBT2KYkYVScID0FDENDGh86EsSzv5KeBdmeTPOyZD7IIJtWNh S1cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739472988; x=1740077788; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HTHjeWn5Pyb7XX2o3ueK8PhzHxsIj6j48RbIjk052zE=; b=JAKZKHZBHymCKO5Wj/lw7qJ/0qosKgl1Pboihp1WJxJrw416ln0jS3kII9ECPKK3HR 4ZUNLhzbvcxjFVKXvYc4Pmi1+Mm/BnpQLb1TcXuNhATf33+nHam0vplT2nkGeXQF8Y/a 4QJPhBMrsaq9QD/KqjSZKmkVgBrUee+FFtfuIii85WiaMrq6e3JewUmYzIZfZx6pR/LD OjKKq1uriBqiXVTcsUTttbAQ9oayjlnDchsyt/JNTuooxLXYJ7mmZ90r+PDRsRnd8NlP tSo8hewGVVavqC5dsrTnzzhdi4bcfngPqJE1++UPDsnwdwhqg0/03uJlUqCPKtVYZ+TL gRkg== X-Gm-Message-State: AOJu0YxNpaJl3H7H6Ea4vjYX6kTX98V3Kjljp5MEh7OfG6wHwB07uj64 akm0b6XntKYyhySGUNZVm9u1j9283n/o7S5ptVJd+6/ocujkaoM6 X-Gm-Gg: ASbGnctsf6CxJrHQgzQqkRKnOrzv9SAVOVJMAGCySRjaodqEyWoP1FsCFUru8ISJeg3 ZJ6o5RlE4Vub7v46GcV0NxBgSmbpzWvKQ0Jg2zUbCNgo2JnPzDf23j5x6utbg8lwrWEJjGgcag7 dPgJhGEVamHf+kSrmAYIcbIEBbMvN2HlvWhQ3zl3HvJTWNuoxOCOTygVLwAxJCrm0xi4JI5igsR HMJsA+hWv1wQE1OG/0bDb9v0Tffcgqh2fUSLj2bzV3gf3CPYh2NlzmZG4xbrevvwj/8waVAY1Xq Q6HisnjbzXv2esbX5bM= X-Google-Smtp-Source: AGHT+IGBbYLoA3ztodrKAXoraNLj6ZYNgP6oJxm7MgYUBodUUn9QCCS2L2b39BXkUMJJfxHoVYSI/g== X-Received: by 2002:a05:600c:3ba4:b0:434:a0fd:95d0 with SMTP id 5b1f17b1804b1-439670f86camr1009565e9.4.1739472988273; Thu, 13 Feb 2025 10:56:28 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a06d1f2sm55535645e9.18.2025.02.13.10.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 10:56:27 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <87jz9tr9f0.fsf@gmail.com> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> Date: Thu, 13 Feb 2025 19:56:26 +0100 Message-ID: <87cyflr7vp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable K=C3=A9vin Le Gouguec writes: >> How about just ignoring the error in this case? AFAIU, it's rare >> enough to not be important, right? AFAIK, you cannot have more than >> one Git instance modifying the repository at any given time, so this >> problem cannot be fixed in principle if we are running tow or more Git >> sessions in parallel. IOW, these tests must NOT be run via parallel >> make processing. > > Apologies if my brain is too fried and I misunderstood: didn't I show > that this error shows up without parallelism? > > $ while make -j1 -C test lisp/vc/vc-git-tests ; do continue ; done [=E2=80=A6 snip demo =E2=80=A6] > > > At any rate, to hopefully contribute something to the discussion if I > misunderstood your comment: given the goals of this test, wondering if > it would be acceptable to have it invoke vc-git-dir-extra-headers > directly, instead of "pretending to be a user" and invoking vc-dir. If > vc-dir is indeed responsible for whatever async process is thwarting > that test, cutting that middle man out would work around that (and let > us remove some scaffolding from the test to boot). Attaching what I have in mind (including an --ignore-all-space variant). Mainly FTR and to clarify my yammering ; ATM it is not clear that it solves the problem. (=E2=89=883k iterations in 12min and counting; =F0=9F= =A4=9E but I had to wait an actual hour once or twice to reproduce the error=E2=80=A6) > (If Git is responsible for that async process, then that change alone > will not help, although the scaffolding simplification would still be > nice TBH) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=test-extra-headers-directly.patch diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..771be45b4f4 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -120,28 +120,23 @@ vc-git-test--start-branch (string-trim (vc-git-test--run "branch" "--show-current"))) (defun vc-git-test--dir-headers (headers) - "Return an alist of header values for the current `vc-dir' buffer. - + "Return an alist of header values as they would appear in `vc-dir'. HEADERS should be a list of (NAME ...) strings. This function will return a list of (NAME . VALUE) pairs, where VALUE is nil if the header is absent." - ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) - (revert-buffer) - (mapcar - (lambda (header) - (let* ((pattern - (rx bol - (literal header) (* space) ": " (group (+ nonl)) - eol)) - (value (and (goto-char (point-min)) - (re-search-forward pattern nil t) - (match-string 1)))) - (cons header value))) - headers)) + (with-temp-buffer + (insert (vc-git-dir-extra-headers default-directory) "\n") + (mapcar + (lambda (header) + (let* ((pattern + (rx bol + (literal header) (* space) ": " (group (+ nonl)) + eol)) + (value (and (goto-char (point-min)) + (re-search-forward pattern nil t) + (match-string 1)))) + (cons header value))) + headers))) (ert-deftest vc-git-test-dir-branch-headers () "Check that `vc-dir' shows expected branch-related headers." @@ -152,42 +147,42 @@ vc-git-test-dir-branch-headers ;; 'git clone' this repository and test things in this clone. (ert-with-temp-directory clone-repo (vc-git-test--run "clone" origin-repo clone-repo) - (vc-dir clone-repo) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . ,main-branch) - ("Tracking" . ,(concat "origin/" main-branch)) - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch: no tracking information. - (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - '(("Branch" . "feature/foo") - ("Tracking" . nil) - ("Remote" . nil)))) - ;; Push with '--set-upstream origin': tracking information - ;; should be updated. - (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/foo") - ("Tracking" . "origin/feature/foo") - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch tracking the _local_ main branch. - ;; Bug#68183. - (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-branch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/bar") - ("Tracking" . ,main-branch) - ("Remote" . "none (tracking local branch)")))))))) + (let ((default-directory clone-repo)) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . ,main-branch) + ("Tracking" . ,(concat "origin/" main-branch)) + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch: no tracking information. + (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + '(("Branch" . "feature/foo") + ("Tracking" . nil) + ("Remote" . nil)))) + ;; Push with '--set-upstream origin': tracking information + ;; should be updated. + (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/foo") + ("Tracking" . "origin/feature/foo") + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch tracking the _local_ main branch. + ;; Bug#68183. + (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/bar") + ("Tracking" . ,main-branch) + ("Remote" . "none (tracking local branch)"))))))))) ;;; vc-git-tests.el ends here --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=test-extra-headers-directly-w.patch diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..771be45b4f4 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -120,17 +120,12 @@ vc-git-test--start-branch (string-trim (vc-git-test--run "branch" "--show-current"))) (defun vc-git-test--dir-headers (headers) - "Return an alist of header values for the current `vc-dir' buffer. - + "Return an alist of header values as they would appear in `vc-dir'. HEADERS should be a list of (NAME ...) strings. This function will return a list of (NAME . VALUE) pairs, where VALUE is nil if the header is absent." - ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) - (revert-buffer) + (with-temp-buffer + (insert (vc-git-dir-extra-headers default-directory) "\n") (mapcar (lambda (header) (let* ((pattern @@ -141,7 +136,7 @@ vc-git-test--dir-headers (re-search-forward pattern nil t) (match-string 1)))) (cons header value))) - headers)) + headers))) (ert-deftest vc-git-test-dir-branch-headers () "Check that `vc-dir' shows expected branch-related headers." @@ -152,7 +147,7 @@ vc-git-test-dir-branch-headers ;; 'git clone' this repository and test things in this clone. (ert-with-temp-directory clone-repo (vc-git-test--run "clone" origin-repo clone-repo) - (vc-dir clone-repo) + (let ((default-directory clone-repo)) (should (equal (vc-git-test--dir-headers @@ -188,6 +183,6 @@ vc-git-test-dir-branch-headers '("Branch" "Tracking" "Remote")) `(("Branch" . "feature/bar") ("Tracking" . ,main-branch) - ("Remote" . "none (tracking local branch)")))))))) + ("Remote" . "none (tracking local branch)"))))))))) ;;; vc-git-tests.el ends here --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 15:45:14 2025 Received: (at 76187) by debbugs.gnu.org; 13 Feb 2025 20:45:14 +0000 Received: from localhost ([127.0.0.1]:45665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tig5B-0000sQ-QE for submit@debbugs.gnu.org; Thu, 13 Feb 2025 15:45:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36486) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tig57-0000mj-DG for 76187@debbugs.gnu.org; Thu, 13 Feb 2025 15:45:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tig51-0007zW-OF; Thu, 13 Feb 2025 15:45:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Vaf5cbx5IXjK7dkefASpm/6w9/cNi1STljqO60PgaJ0=; b=qJj+sG06C++jcUJXALes qU1XYwhZtbzXKWL/NS4gUPqWZVLOYt0bRKf+M2nI/wyNQQxYM6/ZDIp6Ju7d7QVId4Vg6j1kRAtmz 5Hs0TBVbUMR1SryKVIjLd5YvAGTcZFNX4MT26oWeoRzW42/SZmn40jbFTedp6hwTc1A+pa6Wov5gC EIVA7DtIgy7rgs1wg/3UxiT90npui8bBKDsjFnxI/RP+/F59N1/E2GXFdSGCkgK9qZt7fOlsZNhMo gB73HmBTPFI/M+NiXNA9Mmv8x5XMIUbPQpHdOArW/q6I57mEcLnu5/oV8PytDv9TjQQjMR7OzFIAK iO7LpZY0fyBEIw==; Date: Thu, 13 Feb 2025 22:44:32 +0200 Message-Id: <86ed01h8wf.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec In-Reply-To: <87jz9tr9f0.fsf@gmail.com> (message from =?utf-8?Q?K=C3=A9vin?= Le Gouguec on Thu, 13 Feb 2025 19:23:15 +0100) Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Kévin Le Gouguec > Cc: eggert@cs.ucla.edu, 76187@debbugs.gnu.org > Date: Thu, 13 Feb 2025 19:23:15 +0100 > > Eli Zaretskii writes: > > > How about just ignoring the error in this case? AFAIU, it's rare > > enough to not be important, right? AFAIK, you cannot have more than > > one Git instance modifying the repository at any given time, so this > > problem cannot be fixed in principle if we are running tow or more Git > > sessions in parallel. IOW, these tests must NOT be run via parallel > > make processing. > > Apologies if my brain is too fried and I misunderstood: didn't I show > that this error shows up without parallelism? If that is true, it means _my_ brain is fried, but then how is that other Git process invoked, and by whom? IOW, which process locked the repository exactly while we were running Git from the test? > (a) checking for index.lock presence before invoking vc-git-command does > not save us, > (b) replacing vc-dir-kill-dir-status-process with a busy loop on > vc-dir-busy does not save us either, > (a+b) together do not save us either) My suggestion was to ignore the error, not to do any of the above. IOW, treat this test as if it were skipped, if this error happens. > (If Git is responsible for that async process, then that change alone > will not help, although the scaffolding simplification would still be > nice TBH) The only way I can think of that Git itself causes this is if the automatic GC is invoked. But AFAIR automatic GC doesn't lock the repository, does it? If it does, perhaps disabling GC for the duration of the test will solve this? From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 16:47:38 2025 Received: (at 76187) by debbugs.gnu.org; 13 Feb 2025 21:47:38 +0000 Received: from localhost ([127.0.0.1]:45893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tih3Z-0003lf-JO for submit@debbugs.gnu.org; Thu, 13 Feb 2025 16:47:38 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38716) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tih3W-0003lQ-Q9 for 76187@debbugs.gnu.org; Thu, 13 Feb 2025 16:47:35 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-38c62ef85daso182962f8f.3 for <76187@debbugs.gnu.org>; Thu, 13 Feb 2025 13:47:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739483248; x=1740088048; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KU2CVMM8rmAnDuJlDDPTOLUy6Qtmoz/YZZGgGQpDgos=; b=FMrS0M4vZLyZfpZrQIUdspsHi67seNEAGsH/k84i1ILY8m0WSmvslMZOnDRwZePH7G xevTFwNjCF2Koz9bbyHcItXDE9OrRN5Tk6L5vqpvVgwieka0QdbmAn3bpwMe7v8q4LOH OWD0f8C2X/ZcuV5itv/v5brGP4ciB854hFt1QK1s7yBRMI4XSLf3lUNbYVp7BC2Rye7+ WaF/RX6xOiW0C06IgBPHKT5EHgAU7Sz9WUJRTmF0Jm55/6LzbTjUqAupCq7waqNIw99X 7XUFnIBKF/mQqY+ZMnzpJf3KdLXbuTOf4ymnB4JXOHOnYxwp0zaBobzuFmIf7+Cesn7m Smxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739483248; x=1740088048; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KU2CVMM8rmAnDuJlDDPTOLUy6Qtmoz/YZZGgGQpDgos=; b=l2pDtU9nvKHz4B/BW048+Xh+eI6VekkwODxy84wujdsfDMWPjhc+hjEawKAfQBt1oe Dw1m9m4w9k3vvvf/NuzHeU9OkUQEouJPRFAsr58E82hBONr9QvX8gw85yWAuz9SyqHPi oy7kwvXii8hU5yUxqrbMkSOfTT9UJyGUiVmbfwmdpPLAxYi42PoLmpx3wCHRGicdJYkr u7BwZZmc3u1burIkIbmWDV+dkGHPP0vFyTjGXUZRN0bvYEaD6G2XGvlQO6fIIA8yq7Dk ykC74vwFLWVrwK20HCLMGMlF2JLPk7hJ+h/ErFRClkaliijx/tI2hu1m2r6ZGR1SORG2 og0A== X-Forwarded-Encrypted: i=1; AJvYcCWib9X6X1h+fGw0sUO1YvbiBD244bPUNnEXR7YkCMcaXlCqXYW8SnRXYmSTTHmJExZrNkBzNg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx4LFO8TUPyTlRmHiYNEr4bbxFwIgIKCnc932pNCo011cDYX1Qi +Q5Zn/UzczflpiUX9aI7SoE5HatgvM10UMwREjyCd7fbJ8GcvlABmY8lvQ== X-Gm-Gg: ASbGnct3IWsaqqVyvarnegl6xy8G1NJqU5WRrxp2dMegOm5x51BALmZSwo29pqiCh4P gML/wK9ppxo/wAKSo9df/fVdgR09A8I9QQIZbT4rbqKyljl2fRpIdfFQvC8CymO8oJhq6MJns3F 79anS+jDfMo9fkN3gVfSmMqIzUZbNfI7L1JW+yfajlDta/s2knazrO93Bl7vBCW88RuA+pXKaeZ nnqwRaBjPXufGEWZ+THycp2aFk5TEm+KKEosgNfD1b6s9dp2UisRuud2a0d5ZGPqqDP8umyJ9Ba /uU2V9IGFAo7ktFPyoo= X-Google-Smtp-Source: AGHT+IG7xRnGmwW3g4SdnU+hDzTk/5qBA0PXZFd8H5zVHRS/90yIRTcgmLg1EqkH5qN0aK87WO4Hlw== X-Received: by 2002:a05:6000:1fa1:b0:38f:2ad4:6b1b with SMTP id ffacd0b85a97d-38f2ad46defmr817800f8f.13.1739483248286; Thu, 13 Feb 2025 13:47:28 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f258ccd95sm2891358f8f.25.2025.02.13.13.47.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 13:47:27 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <86ed01h8wf.fsf@gnu.org> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> Date: Thu, 13 Feb 2025 22:47:25 +0100 Message-ID: <878qq9qzyq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: K=C3=A9vin Le Gouguec >> Cc: eggert@cs.ucla.edu, 76187@debbugs.gnu.org >> Date: Thu, 13 Feb 2025 19:23:15 +0100 >>=20 >> Eli Zaretskii writes: >>=20 >> > How about just ignoring the error in this case? AFAIU, it's rare >> > enough to not be important, right? AFAIK, you cannot have more than >> > one Git instance modifying the repository at any given time, so this >> > problem cannot be fixed in principle if we are running tow or more Git >> > sessions in parallel. IOW, these tests must NOT be run via parallel >> > make processing. >>=20 >> Apologies if my brain is too fried and I misunderstood: didn't I show >> that this error shows up without parallelism? > > If that is true, it means _my_ brain is fried, but then how is that > other Git process invoked, and by whom? IOW, which process locked the > repository exactly while we were running Git from the test? No clue thus far. You mention Git's automatic GC and that's one of my scapegoats; another is vc-dir spawning more things than I realize. FWIW, with that last patch I posted, the test has been passing on repeat for 3h (47k iterations) and counting. Maybe we have a winner? Let me know if it looks acceptable, I'll add commentary & a changelog entry. >> (a) checking for index.lock presence before invoking vc-git-command does >> not save us, >> (b) replacing vc-dir-kill-dir-status-process with a busy loop on >> vc-dir-busy does not save us either, >> (a+b) together do not save us either) > > My suggestion was to ignore the error, not to do any of the above. > IOW, treat this test as if it were skipped, if this error happens. Right, I only mentioned the above to recap previous findings - since "I can repro at -j1" did not get through, I figured I might have failed to convey other things that bore repeating. Was not suggesting that this should be the solution. (My main takeaway from the above being: "no, this is not about us killing a VC process which in turn kills a Git process which leaves a stray lock") >> (If Git is responsible for that async process, then that change alone >> will not help, although the scaffolding simplification would still be >> nice TBH) > > The only way I can think of that Git itself causes this is if the > automatic GC is invoked. But AFAIR automatic GC doesn't lock the > repository, does it? If it does, perhaps disabling GC for the > duration of the test will solve this? Worth exploring, though my current conclusion from failing to reproduce with my last patch (=F0=9F=A4=9E) is that vc-dir is the likely cause of the problem. That too could be worth exploring, though I don't know how valuable the findings would be - the testcase does not mean to test vc-dir, only the logic computing extra-headers from branch metadata (mainly to check for regressions re. bug#68183). Doubtful users would experience the failure we are observing? ISTM it stems from running swaths of Git branching commands while playing with vc-dir - if users invoke VC commands instead of the Git CLI, presumably these commands synchronize with vc-dir correctly? ("Then why not rewrite the testcase to use VC commands too instead of the Git CLI?" That was my initial intention, but bug#68183 was about a specific branch arrangement, and I remember giving up on re-creating that arrangement purely with VC commands =F0=9F=A4=B7) From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 17:58:33 2025 Received: (at 76187) by debbugs.gnu.org; 13 Feb 2025 22:58:34 +0000 Received: from localhost ([127.0.0.1]:46051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiiAD-0001WW-CK for submit@debbugs.gnu.org; Thu, 13 Feb 2025 17:58:33 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:39552) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tiiAA-0001WF-Ha for 76187@debbugs.gnu.org; Thu, 13 Feb 2025 17:58:31 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4395f645200so1691205e9.2 for <76187@debbugs.gnu.org>; Thu, 13 Feb 2025 14:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739487504; x=1740092304; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=QkWY1HM3y84o+BTF+WR8sdoZ5oppmOvnW0NyC7lGCe4=; b=Lcyo4j8EWJbCs9reuXSvmA4zAzS4e7TFDgJNcG0OMnW/CVa0lQCW+1IOHM4iSlEfj4 kygVr9xvKYa5lRH9lEg9hJfmzhvR6tb5QxEllkmQYio8AIGTOsm47FeROwJSY3MK23Xp E6xUI5lPioNYLnhrVUgScqxz+nSFGk6Tmoik7/lJoXkZKiONC6YPeXFtv/q1MJQ9UQyB K/JI+1aGFXAMOP5vaNqDfiYeDQpDGlVBNTT52TMzuoZT7FbczkkEigS3+omIVhvyfxpo rvB6EHC7Q+r6Y83P/20ncvCGPY0gLRV8povU5OoWESt5YkdVw9TUxDkkDMOE4QENk4+2 hZ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739487504; x=1740092304; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QkWY1HM3y84o+BTF+WR8sdoZ5oppmOvnW0NyC7lGCe4=; b=uIu/8/VZ/pKPE+RMBxfxBzqt6yY/Az1dSzwIjbSviP57gv/YUNKSlPEpTcwUxVGir+ ryvOM3M3+AtnR93NgwczCsyaNYxF2SdeF3w6FnksO4kA+d/0bZ2CUOcgy9e+7jwYQSds Hd7Qzp4c/iqur/nl9z7WhwA7qRyQPdfqOCsaRK5a6MQbnd4ZlgyWfglr2Ub+2aJteSek OJOOC2JOG4QpBcRq2lm2vzOuifCAA2VLot6xrJ1O20TBd2amhUiBFt0d0h7wx8f0cr3/ FM1/GV672Z2X1iuhMqUHkQQxdA006U+hCwh4k7JXUn7bkOQLNSY2Nrg13nEiB0KPT3hX PtiQ== X-Gm-Message-State: AOJu0YzSdzcSHBXNwqzlwXhn/MIFCoDKCJ25SEVJqf3hKi0aY4m4MxoX e2uTJmORPiqBjYYZ7Be3bYzG0fmeI7hplgogQkfQFo2LABeZlcYq X-Gm-Gg: ASbGncsjDdzBysif8tdLNmPG4QqNhkciodFrWqOLhlHQM50FY9SUElw7EjlHL5UFkT/ S1Xc5aVp97NO5x16F9ntErSMD6r/jZdL+v0nH0G3CzuMbsKV5Viqnx39atWkuTX/E0e6epUbWRB IoNtBk9X/+0bbX9WEeIRaHWzael6WA6ZpTC4Enc418Ee362eQfLXF2mHPW0n+KdLqp4REcxZKYZ cE2dJa0mdVxw/mDH60evUGZbrD9aLKs+LtodHG4ErlkJcOe1JZHaosW0rk0uusuEedmstIPuXfj l3Gt+1KUC+718gndUqY= X-Google-Smtp-Source: AGHT+IGnPIN3K4IdoFcSHohf403taee39ww2jOgCy5kc8RJsQmbrcKi33hz1uXvXPlawA0RRGL4UPw== X-Received: by 2002:a05:600c:1d21:b0:439:6361:61ca with SMTP id 5b1f17b1804b1-43967099603mr4428255e9.1.1739487504180; Thu, 13 Feb 2025 14:58:24 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439653f0556sm12146715e9.1.2025.02.13.14.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:58:22 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <878qq9qzyq.fsf@gmail.com> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> Date: Thu, 13 Feb 2025 23:58:21 +0100 Message-ID: <874j0xqwoi.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable K=C3=A9vin Le Gouguec writes: > FWIW, with that last patch I posted, the test has been passing on repeat > for 3h (47k iterations) and counting. Maybe we have a winner? 4h10min, 66k iterations, no failures. Stopping the count because this brain needs zzz's. > Let me know if it looks acceptable, I'll add commentary & a changelog > entry. Done; attached for your consideration. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Test-vc-git-dir-extra-headers-directly-bug-76187.patch >From 6c38e17745b422cf65110d4c7ee6f2cd065d5ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Thu, 13 Feb 2025 23:52:06 +0100 Subject: [PATCH] Test vc-git-dir-extra-headers directly (bug#76187) * test/lisp/vc/vc-git-tests.el (vc-git-test--dir-headers): Stop bothering with vc-dir internals and just invoke the branch-munging and header-formatting code we mean to test. (vc-git-test-dir-branch-headers): Stop invoking vc-dir; just set default-directory to be able to pass it to the backend function. --- test/lisp/vc/vc-git-tests.el | 113 +++++++++++++++++------------------ 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..98d1fc4ef44 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -120,31 +120,30 @@ vc-git-test--start-branch (string-trim (vc-git-test--run "branch" "--show-current"))) (defun vc-git-test--dir-headers (headers) - "Return an alist of header values for the current `vc-dir' buffer. - + "Return an alist of header values as they would appear in `vc-dir'. HEADERS should be a list of (NAME ...) strings. This function will return a list of (NAME . VALUE) pairs, where VALUE is nil if the header is absent." - ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) - (revert-buffer) - (mapcar - (lambda (header) - (let* ((pattern - (rx bol - (literal header) (* space) ": " (group (+ nonl)) - eol)) - (value (and (goto-char (point-min)) - (re-search-forward pattern nil t) - (match-string 1)))) - (cons header value))) - headers)) + (with-temp-buffer + ;; We invoke the backend's dir-extra-headers function directly + ;; because (a) that covers the logic we mean to test (b) going + ;; through vc-dir "like a user would" has proven fraught; see + ;; bug#76187 for hard-to-reproduce and hard-to-diagnose errors. + (insert (vc-git-dir-extra-headers default-directory) "\n") + (mapcar + (lambda (header) + (let* ((pattern + (rx bol + (literal header) (* space) ": " (group (+ nonl)) + eol)) + (value (and (goto-char (point-min)) + (re-search-forward pattern nil t) + (match-string 1)))) + (cons header value))) + headers))) (ert-deftest vc-git-test-dir-branch-headers () - "Check that `vc-dir' shows expected branch-related headers." + "Check that dir-extra-headers recognizes various branch arrangements." (skip-unless (executable-find vc-git-program)) ;; Create a repository that will serve as the "remote". (vc-git-test--with-repo origin-repo @@ -152,42 +151,42 @@ vc-git-test-dir-branch-headers ;; 'git clone' this repository and test things in this clone. (ert-with-temp-directory clone-repo (vc-git-test--run "clone" origin-repo clone-repo) - (vc-dir clone-repo) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . ,main-branch) - ("Tracking" . ,(concat "origin/" main-branch)) - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch: no tracking information. - (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - '(("Branch" . "feature/foo") - ("Tracking" . nil) - ("Remote" . nil)))) - ;; Push with '--set-upstream origin': tracking information - ;; should be updated. - (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/foo") - ("Tracking" . "origin/feature/foo") - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch tracking the _local_ main branch. - ;; Bug#68183. - (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-branch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/bar") - ("Tracking" . ,main-branch) - ("Remote" . "none (tracking local branch)")))))))) + (let ((default-directory clone-repo)) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . ,main-branch) + ("Tracking" . ,(concat "origin/" main-branch)) + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch: no tracking information. + (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + '(("Branch" . "feature/foo") + ("Tracking" . nil) + ("Remote" . nil)))) + ;; Push with '--set-upstream origin': tracking information + ;; should be updated. + (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/foo") + ("Tracking" . "origin/feature/foo") + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch tracking the _local_ main branch. + ;; Bug#68183. + (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/bar") + ("Tracking" . ,main-branch) + ("Remote" . "none (tracking local branch)"))))))))) ;;; vc-git-tests.el ends here -- 2.48.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 14 02:51:50 2025 Received: (at 76187) by debbugs.gnu.org; 14 Feb 2025 07:51:50 +0000 Received: from localhost ([127.0.0.1]:46864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiqUH-0004LW-DS for submit@debbugs.gnu.org; Fri, 14 Feb 2025 02:51:50 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:40727) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tiqUF-0004LG-AK for 76187@debbugs.gnu.org; Fri, 14 Feb 2025 02:51:48 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4394a2af558so2645385e9.3 for <76187@debbugs.gnu.org>; Thu, 13 Feb 2025 23:51:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739519501; x=1740124301; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=RkU9QbiVUhomjmWI3bLHRLWNcF4XC25Mc32fCWfthEY=; b=hiZAqjulKrNAoEySJj5rdaBpyBPZrfC992r2Z8cWUyQobNxcWnxgwovAduWDlcInEi Q5EGfQlaglxE4AGrYCOHvtGQCnGMXlk08A1JFS+w7kFXuONLgZTgyORtW0w32AiDVixL HjafaOtY9RU+u1LpdlaI6asIiYdlcl6l1LhIJCddEDRRUPAhW7R86TnROhPXF3zDhBN+ uc0V5qW28Hq6GG10ZKpJrVJCfmPvoMGsRjzEvAEcw3DoJ46EcEFkn11n/xxVCkPgNdLQ 9KtXQx38/xBU7RdayVGU7GlJyN9L+hcGA0akoB4l5uVf3BUf8HBHCdQcEc8rQx+v/mxv h1NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739519501; x=1740124301; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RkU9QbiVUhomjmWI3bLHRLWNcF4XC25Mc32fCWfthEY=; b=UCiiO5IEnRsDXDEbi5ufszbWdUMREs4W+KlmdJGJjo1fsQbmQm1cl9QpgtyODfCWJt jXGMJeeR5Jem5Wj01NaqAHL4lxlUk3Wvb73uAj7gJZysnwwH8d6QS3EYzA9A50+IhR/R 2AdIa9awoDgS9oPYxwHRND0O4q78u+QYv7Axed7oVUCsembz7r0hEtgwSfylgaMTdEAy ImscSg91pwvNozKHck2IZ/y9TCojF0BIZRXc65Cdapnu5i0BRBpqDdAcLKSmL+75ISAd wddxHFwPr4/Fw2qcs7CkR8ms6MekZPwM55YyV/YQCbTqdCkOQsVkIV2nDyHRQ80rn/6U w+pg== X-Gm-Message-State: AOJu0Yx8SFbDxV8lUY6C43kxwzKZiOFg/TQ+UkcQTruQgBvmdl3zErbY I2lxXwR/DxWXJB7OH8bk/aI1Z5vE/i7Y67FLDHzyj2gLJLGHcU9y X-Gm-Gg: ASbGncv7pFho19cLS/sgi2jZqMHwVvcHmV5/3pMkGS8JU2rHc8s/JzmZUMRxA0CtFc6 sd96FM1HDiA4IcJrNwlrVR5zy7uCKrwDIQS1AgOsPfkCHYzQMjdYSb0Y5mXcfM3TBDOvY1ELLpa 5I76eyylDqbswipQmBpb8GxkMi9qUTA8EZfVfOflnVcJxa1+BBFfCvrkU+BIJfmSz1czef62jvx fRVqCSB+99BcyHtO7hK3H4zvy9LajIKgvUQuJg/oWtaT0uwQozfRcMBXzbJ+5Co1NkHicVyQaYI VEQ6tu8ADngig4lg2cw= X-Google-Smtp-Source: AGHT+IGDGYqVa+fLGLNU1mdFIhsxCZ3QJQ7oqsy2qYJZDQ0ukv24P/Y4irDEYenirijRrVyE+QB0KA== X-Received: by 2002:a5d:64ef:0:b0:38d:e472:e6a0 with SMTP id ffacd0b85a97d-38f2c7f7e07mr936038f8f.9.1739519500782; Thu, 13 Feb 2025 23:51:40 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f258fc7e0sm3864114f8f.48.2025.02.13.23.51.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 23:51:40 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <878qq9qzyq.fsf@gmail.com> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> Date: Fri, 14 Feb 2025 08:51:39 +0100 Message-ID: <87msep7ylw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable K=C3=A9vin Le Gouguec writes: >>> Eli Zaretskii writes: >>>=20 >>> > How about just ignoring the error in this case? AFAIU, it's rare >>> > enough to not be important, right? AFAIK, you cannot have more than >>> > one Git instance modifying the repository at any given time, so this >>> > problem cannot be fixed in principle if we are running tow or more Git >>> > sessions in parallel. IOW, these tests must NOT be run via parallel >>> > make processing. >>>=20 >>> Apologies if my brain is too fried and I misunderstood: didn't I show >>> that this error shows up without parallelism? >> >> If that is true, it means _my_ brain is fried, but then how is that >> other Git process invoked, and by whom? IOW, which process locked the >> repository exactly while we were running Git from the test? > > No clue thus far. You mention Git's automatic GC and that's one of my > scapegoats; another is vc-dir spawning more things than I realize. With the attached debugging patch (same as [1], plus binding vc-command-messages to t), I get these traces when the failure happens: Running 8 tests (2025-02-14 08:17:56+0100, selector `(not (or (tag :uns= table) (tag :nativecomp)))') passed 1/8 vc-git-test-annotate-time (0.002302 sec) Running in foreground: git --no-pager clone /tmp/emacs-test-go8R94-vc-g= it/ /tmp/emacs-test-NVSvcg-vc-git/ . Done (status=3D0): git --no-pager clone /tmp/emacs-test-go8R94-vc-git/ = /tmp/emacs-test-NVSvcg-vc-git/ . Running in foreground: git --no-pager config --get remote.origin.url Done (status=3D0): git --no-pager config --get remote.origin.url Running in background: git --no-pager update-index --refresh . Done in background: git --no-pager update-index --refresh . Running in background: git --no-pager diff-index --relative -z -M HEAD = -- . Done in background: git --no-pager diff-index --relative -z -M HEAD -- . Running in background: git --no-pager ls-files -z -u -- . Done in background: git --no-pager ls-files -z -u -- . Running in background: git --no-pager ls-files -z -o --exclude-standard= -- . Done in background: git --no-pager ls-files -z -o --exclude-standard --= . Paused 1 time(s) waiting for vc-dir-busy Running in foreground: git --no-pager config --get remote.origin.url Done (status=3D0): git --no-pager config --get remote.origin.url Running in background: git --no-pager update-index --refresh . Running in foreground: git --no-pager checkout -b feature/foo master . err in /tmp/emacs-test-NVSvcg-vc-git/: (error Failed (status 128): git = --no-pager checkout -b feature/foo master .) (buffer-string: fatal: Unable to create '/tmp/emacs-test-NVSvcg-vc-git/.git/index.lock'= : File exists. Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue. ) Looking at vc-dir-refresh (invoked from vc-dir-revert-buffer-function, invoked by the testcase reverting the vc-dir buffer), I'd conclude that the sequence of events is (lighting a candle to the Muse of Manual Whitespace Adjustment; citing evidence with "> TRACES") * vc-git-test--dir-headers * revert-buffer * vc-dir-refresh * vc-dir-headers * vc-git-dir-extra-headers (=F0=9F=91=88 the code under test) > Running in foreground: git --no-pager config --get remote.origi= n.url > Done (status=3D0): git --no-pager config --get remote.origin.url * "asynchronous-looking things" > Running in background: git --no-pager update-index --refresh . (=E2=9A=A0=EF=B8=8F no proof of termination)=20 * vc-git-test--run "checkout" "-b" "feature/foo" main-branch * vc-git-test--wait (lambda () (file-exists-p ".git/index.lock")) > =F0=9F=A6=97 [no log, ergo no lock file detected] * vc-git-command=20 > Running in foreground: git --no-pager checkout -b feature/foo master . (=E2=9A=A0=EF=B8=8F presumably the concurrent locking happens around he= re) > fatal: Unable to create '/tmp/emacs-test-NVSvcg-vc-git/.git/index.loc= k': File exists. I think 'git update-index' is a good suspect: cursory glance at builtin/update-index.c:cmd_update_index confirms that it unconditionally does: newfd =3D repo_hold_locked_index(the_repository, &lock_file, 0); Bottomline: * maybe we could amend the testcase to sync with this background command, * unclear whether we should; barring fault in my logic, I stand by my opinion in [2] and would prefer to install the patch in that message, on the grounds that contending with vc-dir's asynchrony is outside the scope of this test (to wit: testing the extra-headers logic). [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76187#35 [2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76187#53 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=more-debug.patch Content-Transfer-Encoding: quoted-printable diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..1212186d00d 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -103,10 +103,32 @@ vc-git-test--with-repo (vc-create-repo 'Git) ,@body))) =20 +(defun vc-git-test--wait (what desc) + "TODO" + (let ((i 0) + (max 20)) + (while (funcall what) + (when (> (cl-incf i) max) + (error "Timed out waiting for %s" desc)) + (sleep-for .05)) + (when (> i 0) + (message "Paused %d time(s) waiting for %s" i desc)))) + (defun vc-git-test--run (&rest args) "Run git ARGS=E2=80=A6, check for non-zero status, and return output." + ;; bug#76187: Git sometimes reports an index.lock file and bails, + ;; suggesting another lingering Git process in the same repo. Since + ;; this test runs in a temporarily-generated repo, that process is + ;; probably an asynchronous one initiated earlier by this test; for + ;; lack of better understanding, wait until the lock is released. + (vc-git-test--wait (lambda () (file-exists-p ".git/index.lock")) + "index.lock") (with-temp-buffer - (apply 'vc-git-command t 0 nil args) + (condition-case err + (apply 'vc-git-command t 0 nil args) + (t (message "err in %s: %s" default-directory err) + (message "(buffer-string:\n%s\n)" (buffer-string)) + (signal (car err) (cdr err)))) (buffer-string))) =20 (defun vc-git-test--start-branch () @@ -126,10 +148,10 @@ vc-git-test--dir-headers return a list of (NAME . VALUE) pairs, where VALUE is nil if the header is absent." ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) + ;; to synchronize with the dir-status-files process; have not found a + ;; reliable way to do this. As a workaround, wait until vc-dir stops + ;; being "busy" then revert the `vc-dir' buffer. + (vc-git-test--wait #'vc-dir-busy "vc-dir-busy") (revert-buffer) (mapcar (lambda (header) @@ -148,7 +170,8 @@ vc-git-test-dir-branch-headers (skip-unless (executable-find vc-git-program)) ;; Create a repository that will serve as the "remote". (vc-git-test--with-repo origin-repo - (let ((main-branch (vc-git-test--start-branch))) + (let ((main-branch (vc-git-test--start-branch)) + (vc-command-messages t)) ;; 'git clone' this repository and test things in this clone. (ert-with-temp-directory clone-repo (vc-git-test--run "clone" origin-repo clone-repo) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 14 03:07:32 2025 Received: (at 76187) by debbugs.gnu.org; 14 Feb 2025 08:07:32 +0000 Received: from localhost ([127.0.0.1]:46889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiqjU-00054Y-5E for submit@debbugs.gnu.org; Fri, 14 Feb 2025 03:07:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45232) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiqjR-00054G-23 for 76187@debbugs.gnu.org; Fri, 14 Feb 2025 03:07:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiqjK-0001W0-MO; Fri, 14 Feb 2025 03:07:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=8vqkVyF4fH88vGPtpwhPC2QZhz32MMfA0Ts9ZuG1gVQ=; b=mUmJqDMjMiP/E6sJ8RjW 2PwOyVmAd6E+eO/KoFgPZDhT6fR4LKR2y/jxFkb5UkkQ3C27J/3bMr9GeuPcgkOFxe9/MZf/e7KMm ninp2dOFqu57rIbCVgH1Ho369t2Xgmb/gn8BqT/q3rZG0TFToHvx3DydQX+thnurb5xjwjkAZLtqb rTigm2cS+9mQCDQTp+qXxGumDihOdFMZjVJzyZBEJ7JnZzKTH90OCJTZH9fFfXJ7Ycf7ynWlbb+Ip 4UO4LRwQdCDYl0E/6q1+nZT4i9LXYei2EFPg7RVu9AWQ167JQDxDK1mtZk5niAYqqqzlrJiubNsWH f0YgXgWvSWTrZw==; Date: Fri, 14 Feb 2025 10:07:19 +0200 Message-Id: <868qq9gdag.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec , Dmitry Gutov In-Reply-To: <874j0xqwoi.fsf@gmail.com> (message from =?utf-8?Q?K=C3=A9vin?= Le Gouguec on Thu, 13 Feb 2025 23:58:21 +0100) Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> <874j0xqwoi.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Kévin Le Gouguec > Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu > Date: Thu, 13 Feb 2025 23:58:21 +0100 > > Kévin Le Gouguec writes: > > > FWIW, with that last patch I posted, the test has been passing on repeat > > for 3h (47k iterations) and counting. Maybe we have a winner? > > 4h10min, 66k iterations, no failures. Stopping the count because this > brain needs zzz's. > > > Let me know if it looks acceptable, I'll add commentary & a changelog > > entry. > > Done; attached for your consideration. I'm okay with this if Dmitry agrees. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 15 05:42:45 2025 Received: (at 76187) by debbugs.gnu.org; 15 Feb 2025 10:42:45 +0000 Received: from localhost ([127.0.0.1]:53536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjFdE-0003a8-Ph for submit@debbugs.gnu.org; Sat, 15 Feb 2025 05:42:45 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:41705) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tjFdB-0003Zs-PQ for 76187@debbugs.gnu.org; Sat, 15 Feb 2025 05:42:43 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43979038df6so29565e9.2 for <76187@debbugs.gnu.org>; Sat, 15 Feb 2025 02:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739616155; x=1740220955; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=53VivpgLkS3Q/YOwpnmDL6Za93Vh9j6zz64yJCORcnU=; b=SYDGNYtjmbKH86QrDzPkGZNZd23ztZChPdvl28w+tKuYzgCQAz2+ErQaHnK9w3vrd9 u/JyMf8qYbyOsDILj/eD0aGCo4KdNWGHnNi5zw8fC2gAGlcxbQ/9PIALvSSVN2cChjSg b7cRSgDzAyM7DdsZcb5kFGWvhHJOuQpBRNjDS0SQ0Mnfrt4XrWP8cMozZo+3NH8/MG23 /6Gesi6G/+5xGWPFLdtRDaILKUChOohevBCJGYqciNN3ibYtoeADajqZ3V4vkEMNfDCn A3HQ9nExj3hdS/qM6CINu8KxByyCoF934zieKfBaaES0B1QNfaLfPB64y+d0HwAHsbxF 6BwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739616155; x=1740220955; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=53VivpgLkS3Q/YOwpnmDL6Za93Vh9j6zz64yJCORcnU=; b=lU9dSHUT5T/1e9kG5EwB9ZuU2rRNr21+/VZz32smoH3YZc26H8qbLOli+yqoq0YnKy UwTm9rtj/34AB8axT4x8GSQiBE3y2it4bMcgwVZxmmEHYzkNyzh4LoFXylfIRubViZly VPj1BSXS6M+kQEPgRe0Gklq0Sst1UE6tSCt5rLlsRmvN8K4HFrBNe0yQSGsQV2sHCp2/ BGZqYovJAFWdosA4IwvxnddCboq7weYSwu8Rj3GG6JyPjFoGWpHKKZSg3Y219o4HhF/h 9zDVMlnJpPU/xpu8X0aSTW3f8dATDpyZF10IsyoCmPkJCyTkGPa/xPoCjVyhuaKc9VQv IQ6w== X-Forwarded-Encrypted: i=1; AJvYcCWYegiJnlASHc7vLi7o8pB2IgTr0J5NC2H3u+hAJLMaLHJO2tPfN9EJhg2bhXqpsCjjiGuoRA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxWINwJl+XerLnw3R04Vik1Lppd6LuAAQWhPRoVhLpUtfCh3DgI +4M6tPUFIR2xYzZwMlta8JZyo451Pkf1aCZDS7t13uqqECare1eF X-Gm-Gg: ASbGncuTPYnSbXE14WZKbd94n+VNh0puTwWLBs8S+cSI6SmBRoaXR7kj1VxnOJqszj9 IMpuZRMGFIR5xQEEKUQp6DMUCTANFf26zq8MZdhpMfhsIgdKJoRs2YNVtZj3uvm9le2zPhF0lLn SKyM14VatU7Jpfuqqe0nQI31i/2vAeSbX9Ld2R9jrYdXt1OAiYAZIG+KhSgC6tHw+uIMSoLNTZn EkJZZtCIlksBvHpUT7T9wfO5pOa63MVQnTTAjkkmLl1BN12l+YyO47g25K+KQIMo64RblKsKn6C CPN9jwdIrwmfeFaHOy0= X-Google-Smtp-Source: AGHT+IE2yVZgcCfVjS5bFVmqBWUi6IbnvyYSS5z3qOFRU0xPtYaFujWlhxVupJvLa19yqaDGPSPHiQ== X-Received: by 2002:a5d:5888:0:b0:38d:c2f8:d914 with SMTP id ffacd0b85a97d-38f33f13167mr994723f8f.2.1739616155277; Sat, 15 Feb 2025 02:42:35 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f258f5fabsm6847780f8f.45.2025.02.15.02.42.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2025 02:42:33 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Eli Zaretskii Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <868qq9gdag.fsf@gnu.org> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> <874j0xqwoi.fsf@gmail.com> <868qq9gdag.fsf@gnu.org> Date: Sat, 15 Feb 2025 11:42:33 +0100 Message-ID: <87seoftrom.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, Dmitry Gutov , eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: K=C3=A9vin Le Gouguec >> Cc: 76187@debbugs.gnu.org, eggert@cs.ucla.edu >> Date: Thu, 13 Feb 2025 23:58:21 +0100 >>=20 >> K=C3=A9vin Le Gouguec writes: >>=20 >> > FWIW, with that last patch I posted, the test has been passing on repe= at >> > for 3h (47k iterations) and counting. Maybe we have a winner? >>=20 >> 4h10min, 66k iterations, no failures. Stopping the count because this >> brain needs zzz's. >>=20 >> > Let me know if it looks acceptable, I'll add commentary & a changelog >> > entry. >>=20 >> Done; attached for your consideration. > > I'm okay with this if Dmitry agrees. For the sake of intellectual honesty (and to prove, if need be, that I am a clown), while I do still prefer getting vc-dir out of the equation for the purpose of testing vc-git-dir-extra-headers (and so, applying the patch to which you reply), I should note that with the alternative attached patch, the test has been passing 7k times for 1h, with reassuring traces such as: Running in foreground: git --no-pager clone /tmp/emacs-test-Aoc9gk-vc-g= it/ /tmp/emacs-test-qRZ6nt-vc-git/ . Done (status=3D0): git --no-pager clone /tmp/emacs-test-Aoc9gk-vc-git/ = /tmp/emacs-test-qRZ6nt-vc-git/ . Running in foreground: git --no-pager config --get remote.origin.url Done (status=3D0): git --no-pager config --get remote.origin.url Running in background: git --no-pager update-index --refresh . Done in background: git --no-pager update-index --refresh . Running in background: git --no-pager diff-index --relative -z -M HEAD = -- . Done in background: git --no-pager diff-index --relative -z -M HEAD -- . Running in background: git --no-pager ls-files -z -u -- . Done in background: git --no-pager ls-files -z -u -- . Running in background: git --no-pager ls-files -z -o --exclude-standard= -- . Done in background: git --no-pager ls-files -z -o --exclude-standard --= . Paused 50 ms waiting for vc-dir-busy Running in foreground: git --no-pager checkout -b feature/foo master . IOW waiting for vc-dir-busy *after* invoking vc-dir seems to work fine, which makes complete sense, and I am not sure why I never thought about this in the first place? Let me know if we favor this approach, in which case I'll add the finishing touches on that patch (docstring, changelog). --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename="=?utf-8?Q?wait-AFTER-dir-=F0=9F=A4=A6=2Epatch?=" Content-Transfer-Encoding: quoted-printable diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..78af4d1665c 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -106,7 +106,11 @@ vc-git-test--with-repo (defun vc-git-test--run (&rest args) "Run git ARGS=E2=80=A6, check for non-zero status, and return output." (with-temp-buffer - (apply 'vc-git-command t 0 nil args) + (condition-case err + (apply 'vc-git-command t 0 nil args) + (t (message "err in %s: %s" default-directory err) + (message "(buffer-string:\n%s\n)" (buffer-string)) + (signal (car err) (cdr err)))) (buffer-string))) =20 (defun vc-git-test--start-branch () @@ -119,18 +123,28 @@ vc-git-test--start-branch (vc-git-test--run "commit" "-mFirst") (string-trim (vc-git-test--run "branch" "--show-current"))) =20 +(defun vc-git-test--vc-dir () + "TODO" + (vc-dir default-directory) + ;; Wait until background processes are finished; some of them hold + ;; index.lock files that would trip the next Git commands. + (let ((i 0) + (step 50) + (max 1000)) + (while (vc-dir-busy) + (when (> (cl-incf i step) max) + (error "Timed out waiting for vc-dir-busy")) + (sleep-for (/ (float step) max))) + (when (> i 0) + (message "Paused %d ms waiting for vc-dir-busy" i)))) + (defun vc-git-test--dir-headers (headers) "Return an alist of header values for the current `vc-dir' buffer. =20 HEADERS should be a list of (NAME ...) strings. This function will return a list of (NAME . VALUE) pairs, where VALUE is nil if the header is absent." - ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) - (revert-buffer) + (vc-git-test--vc-dir) (mapcar (lambda (header) (let* ((pattern @@ -148,46 +162,47 @@ vc-git-test-dir-branch-headers (skip-unless (executable-find vc-git-program)) ;; Create a repository that will serve as the "remote". (vc-git-test--with-repo origin-repo - (let ((main-branch (vc-git-test--start-branch))) + (let ((main-branch (vc-git-test--start-branch)) + (vc-command-messages t)) ;; 'git clone' this repository and test things in this clone. (ert-with-temp-directory clone-repo (vc-git-test--run "clone" origin-repo clone-repo) - (vc-dir clone-repo) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . ,main-branch) - ("Tracking" . ,(concat "origin/" main-branch)) - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch: no tracking information. - (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - '(("Branch" . "feature/foo") - ("Tracking" . nil) - ("Remote" . nil)))) - ;; Push with '--set-upstream origin': tracking information - ;; should be updated. - (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/foo") - ("Tracking" . "origin/feature/foo") - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch tracking the _local_ main branch. - ;; Bug#68183. - (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-bra= nch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/bar") - ("Tracking" . ,main-branch) - ("Remote" . "none (tracking local branch)")))))))) + (let ((default-directory clone-repo)) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . ,main-branch) + ("Tracking" . ,(concat "origin/" main-branch)) + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch: no tracking information. + (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + '(("Branch" . "feature/foo") + ("Tracking" . nil) + ("Remote" . nil)))) + ;; Push with '--set-upstream origin': tracking information + ;; should be updated. + (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/foo") + ("Tracking" . "origin/feature/foo") + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch tracking the _local_ main branch. + ;; Bug#68183. + (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-b= ranch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/bar") + ("Tracking" . ,main-branch) + ("Remote" . "none (tracking local branch)"))))))))) =20 ;;; vc-git-tests.el ends here --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 15 13:25:40 2025 Received: (at 76187) by debbugs.gnu.org; 15 Feb 2025 18:25:40 +0000 Received: from localhost ([127.0.0.1]:57850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjMrE-0002JG-IL for submit@debbugs.gnu.org; Sat, 15 Feb 2025 13:25:40 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:51588) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjMrA-0002Iv-C9 for 76187@debbugs.gnu.org; Sat, 15 Feb 2025 13:25:37 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 214183C00E40E; Sat, 15 Feb 2025 10:25:30 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id pJV7cwasL5Hm; Sat, 15 Feb 2025 10:25:29 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id CC6CB3C00E410; Sat, 15 Feb 2025 10:25:29 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu CC6CB3C00E410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739643929; bh=xbbr8JIjcva27LwI44f84rdNVSp/KBJPz/q9CdYMkvY=; h=Message-ID:Date:MIME-Version:To:From; b=UiyPUS7O5GOThIQnBb897VX07OATkH8TchXUMD0pApkoENu7azR94zIviV/PBEV50 3mD4K2UzOjHk0v4ivscbsX69Db4i9nicEkOcvtdg+86NmZ6Y5joofB4PVm967WL0Z/ hbW9CWrvIT+kYBayFdkeuBPsPzXoYQW81sUzc1U3BC/UUGRlWxA0K8n+Nfe4dI+Qnu TNl2EbQT8yY6P1KjrYoH+kk0vRw2VoAoG1Q/MhQSrHwkmS6kdaTesOvocXauU+GQGm E4Qqir2ODq85D1JiQhHNAMCdCYVjDTvU+ly7gPdIU+ziryj8w992SwACQRvY8tXhAN BFPdO/X6pL7Pw== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 6cJ_9hW0pA40; Sat, 15 Feb 2025 10:25:29 -0800 (PST) Received: from [192.168.254.12] (unknown [47.147.225.25]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id A941D3C00E40E; Sat, 15 Feb 2025 10:25:29 -0800 (PST) Message-ID: Date: Sat, 15 Feb 2025 10:25:29 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= , Eli Zaretskii References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> <874j0xqwoi.fsf@gmail.com> <868qq9gdag.fsf@gnu.org> <87seoftrom.fsf@gmail.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <87seoftrom.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2025-02-15 02:42, K=C3=A9vin Le Gouguec wrote: > waiting for vc-dir-busy*after* invoking vc-dir seems to work fine, > which makes complete sense Makes sense to me too. I didn't look at the patch in detail, but did=20 notice a "TODO" comment. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 15 17:17:58 2025 Received: (at 76187) by debbugs.gnu.org; 15 Feb 2025 22:17:58 +0000 Received: from localhost ([127.0.0.1]:58397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjQU1-0005jV-Li for submit@debbugs.gnu.org; Sat, 15 Feb 2025 17:17:58 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:38114) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tjQTz-0005jF-1q for 76187@debbugs.gnu.org; Sat, 15 Feb 2025 17:17:56 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-38f20fc478dso484804f8f.0 for <76187@debbugs.gnu.org>; Sat, 15 Feb 2025 14:17:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739657869; x=1740262669; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=6+vPEMhwBALVNNrmj/9Tnqnh72PYc9DFyWgbJmoHoPI=; b=m06IgBb1HIre6Cxjv8dHNLtCLyMm64liIhzlWgy13RTfa5szy0/zSvFVmJOJY+Ubdu mvl2ifXZPc8qKvCZBWcWiWcQFqMZfJzQsT0HWX38o8DbM/iAxSIRVk27mlunDYcg61rR zEmkemnPncKXkJ+P9l3ma17CZN1zMuEEeWmshzGUhLfRKGVmKtl99BCF/5ZXkzjedEex Kc7JEW29E3te4+sVqMml70ILfzala8poPQHv3t804AXFHtqroEMLnGzyoVcyjVRzQ5tt VHggWjAPGklbW2LHC0O/k13+E/fVVU1aF4qPW7HRJxawqbA3P+67MfVkWVIPnHN5EU5G 4U9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739657869; x=1740262669; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6+vPEMhwBALVNNrmj/9Tnqnh72PYc9DFyWgbJmoHoPI=; b=fuGAoFimy5q2hkFNAuhYl+/YzSPiJi++xuXu8R7CU//jn+YyaJg+ah8JxRmmflN8kq uDMGlMG6l6Qr1tIXQ+i/u3/rn9R6YxYTdhFRausM+oR24C82erD5QhBnz8c2mv3zd57X PHsA3CvSmJHA4c5W4u7IVZ0tzaTaCM1CEwDjKqP3Mhx+1uB63Ko1uAr4RzwLuoW9I+yh qv7FOjzTKFDlN8YgdtH/0COdOHpcBiY5/V9KSloBQRmZZo1cm4ntxwg0I8gp/fT0AXVu UsWr0XvL5jdgHL/+fZO4YbFC3yx5ty3dj3AKxwewvQVOSrPpHyXKXTOlpRT1saxeH5UL NrSA== X-Forwarded-Encrypted: i=1; AJvYcCVBE/HAYXGeC9hEZYIu7iNL85DY0HuW/dcbLG3nRNX7BIbNPuO56jptre6+114gOC67O5b2bw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwE844hJJA5r7D4Om7Hx2b/RzENJVPGiM0TZfZZoJSYuTUsPWdW UYPCa8u4aQ97x6sDPQVJJsXPkIjwxGScJJmZvjtIKoO2VQOKUgfw X-Gm-Gg: ASbGncvYiZi7/6V0PUf9u9ibD/fA2kQ3FRbvszm6VHv7NzqsumkjY+jG68N0AHTC3Dw FUZwesPKhBgLTZqVHTfC8+Xzx150dHNHRq09MlssqflQENddl+wMuao24rvH8GB7Xp9CaXFUHcH kVOKzoAIe0eVOh+98BOnl4VQkxqgTXya0hbnZVh79L7fiEwCoxDwIfd4eC8G2CCZg8Hk6h4IVCf wk3BDFKkQM+KuI50oumgonz13p4+R8QCffIjKZrE2HgWO8F3h0CZGUkC7A9dPKYtnohqroeOSBX b6ykokNayGDWNOqzEpE= X-Google-Smtp-Source: AGHT+IF+iIMb3Ji3A44LOMiwixuyP9QDMaXPcEFSGTzmmn50/SWqSfQop7lvcprWzCkCs3wU3onQkw== X-Received: by 2002:a05:600c:1d23:b0:439:4944:eee7 with SMTP id 5b1f17b1804b1-4396e7a6a76mr16541385e9.6.1739657868383; Sat, 15 Feb 2025 14:17:48 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a06e309sm111053405e9.24.2025.02.15.14.17.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2025 14:17:47 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Paul Eggert Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> <874j0xqwoi.fsf@gmail.com> <868qq9gdag.fsf@gnu.org> <87seoftrom.fsf@gmail.com> Date: Sat, 15 Feb 2025 23:17:45 +0100 Message-ID: <87ikpaetti.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Paul Eggert writes: > On 2025-02-15 02:42, K=C3=A9vin Le Gouguec wrote: >> waiting for vc-dir-busy*after* invoking vc-dir seems to work fine, >> which makes complete sense > > Makes sense to me too. I didn't look at the patch in detail, but did noti= ce a "TODO" comment. One of these "finishing touches" I mentioned, yup. Attaching for your consideration: 1. a patch that fixes the vc-dir synchronization, 2. a patch that ditches vc-dir entirely. Either fixes the issue, as far as I can validate. I still have a slight preference for the second one=C2=B9. FWIW, here the test takes =E2=89=8833= 0ms with patch 1, and =E2=89=8868ms with patch 2=C2=B2. Happy to install whichever. =C2=B9 tl;dr vc-dir is a middleman with no added value for the purposes of this test. =C2=B2 Which is only worth consideration if you happen to need run that test repeatedly to reproduce a weird race condition =F0=9F=A5=B2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Fix-race-condition-in-vc-git-tests.el-bug-76187.patch Content-Transfer-Encoding: quoted-printable >From e835d68f43f652e5f179a7fc005b224265d86558 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?K=3DC3=3DA9vin=3D20Le=3D20Gouguec?=3D Date: Sat, 15 Feb 2025 22:42:33 +0100 Subject: [PATCH] Fix race condition in vc-git-tests.el (bug#76187) * test/lisp/vc/vc-git-tests.el (vc-git-test--run): Make sure to log output from failing Git commands. (vc-git-test--vc-dir): New function to invoke vc-dir, then wait for background processes to complete before returning. (vc-git-test--dir-headers): Remove kludge to kill these background processes, and call the new function. (vc-git-test-dir-branch-headers): Let the header-parsing function invoke vc-dir; set default-directory to the "cloned repo" to simplify bookkeeping. --- test/lisp/vc/vc-git-tests.el | 109 ++++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 47 deletions(-) diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..655b3b54bc0 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -104,9 +104,14 @@ vc-git-test--with-repo ,@body))) =20 (defun vc-git-test--run (&rest args) - "Run git ARGS=E2=80=A6, check for non-zero status, and return output." + "Run git ARGS=E2=80=A6, check for non-zero status, and return output. +If the exit status is non-zero, log the command output and re-throw." (with-temp-buffer - (apply 'vc-git-command t 0 nil args) + (condition-case err + (apply 'vc-git-command t 0 nil args) + (t (message "Error running Git: %s" err) + (message "(buffer-string:\n%s\n)" (buffer-string)) + (signal (car err) (cdr err)))) (buffer-string))) =20 (defun vc-git-test--start-branch () @@ -119,18 +124,28 @@ vc-git-test--start-branch (vc-git-test--run "commit" "-mFirst") (string-trim (vc-git-test--run "branch" "--show-current"))) =20 -(defun vc-git-test--dir-headers (headers) - "Return an alist of header values for the current `vc-dir' buffer. +(defun vc-git-test--vc-dir () + "Invoke `vc-dir' in the current repository. +Wait until all asynchronous processes are complete before returning: +some of them hold index.lock files that may trip the next Git commands." + (vc-dir default-directory) + ;; Wait at most 1s, checking every 50ms. + (let ((max-pause 1.0) + (step 0.05) + (paused 0.0)) + (while (vc-dir-busy) + (when (> (cl-incf paused step) max-pause) + (error "Timed out waiting for vc-dir-busy")) + (sleep-for step)) + (when (> paused 0) + (message "Paused %.2f s waiting for vc-dir-busy" paused)))) =20 +(defun vc-git-test--dir-headers (headers) + "Invoke `vc-dir' and return an alist of header values. HEADERS should be a list of (NAME ...) strings. This function will return a list of (NAME . VALUE) pairs, where VALUE is nil if the header is absent." - ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) - (revert-buffer) + (vc-git-test--vc-dir) (mapcar (lambda (header) (let* ((pattern @@ -152,42 +167,42 @@ vc-git-test-dir-branch-headers ;; 'git clone' this repository and test things in this clone. (ert-with-temp-directory clone-repo (vc-git-test--run "clone" origin-repo clone-repo) - (vc-dir clone-repo) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . ,main-branch) - ("Tracking" . ,(concat "origin/" main-branch)) - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch: no tracking information. - (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - '(("Branch" . "feature/foo") - ("Tracking" . nil) - ("Remote" . nil)))) - ;; Push with '--set-upstream origin': tracking information - ;; should be updated. - (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/foo") - ("Tracking" . "origin/feature/foo") - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch tracking the _local_ main branch. - ;; Bug#68183. - (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-bra= nch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/bar") - ("Tracking" . ,main-branch) - ("Remote" . "none (tracking local branch)")))))))) + (let ((default-directory clone-repo)) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . ,main-branch) + ("Tracking" . ,(concat "origin/" main-branch)) + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch: no tracking information. + (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + '(("Branch" . "feature/foo") + ("Tracking" . nil) + ("Remote" . nil)))) + ;; Push with '--set-upstream origin': tracking information + ;; should be updated. + (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/foo") + ("Tracking" . "origin/feature/foo") + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch tracking the _local_ main branch. + ;; Bug#68183. + (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-b= ranch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/bar") + ("Tracking" . ,main-branch) + ("Remote" . "none (tracking local branch)"))))))))) =20 ;;; vc-git-tests.el ends here --=20 2.48.1 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Test-vc-git-dir-extra-headers-directly-bug-76187.patch Content-Transfer-Encoding: quoted-printable >From 300adf2f1008aad71ec18c7c319888b0de14800e Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?K=3DC3=3DA9vin=3D20Le=3D20Gouguec?=3D Date: Thu, 13 Feb 2025 23:52:06 +0100 Subject: [PATCH] Test vc-git-dir-extra-headers directly (bug#76187) * test/lisp/vc/vc-git-tests.el (vc-git-test--run): Make sure to log output from failing Git commands. (vc-git-test--dir-headers): Stop bothering with vc-dir internals and just invoke the branch-munging and header-formatting code we mean to test. (vc-git-test-dir-branch-headers): Stop invoking vc-dir; just set default-directory to be able to pass it to the backend function. --- test/lisp/vc/vc-git-tests.el | 122 ++++++++++++++++++----------------- 1 file changed, 63 insertions(+), 59 deletions(-) diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el index 4b5cb75df01..3cb12d5f86e 100644 --- a/test/lisp/vc/vc-git-tests.el +++ b/test/lisp/vc/vc-git-tests.el @@ -104,9 +104,14 @@ vc-git-test--with-repo ,@body))) =20 (defun vc-git-test--run (&rest args) - "Run git ARGS=E2=80=A6, check for non-zero status, and return output." + "Run git ARGS=E2=80=A6, check for non-zero status, and return output. +If the exit status is non-zero, log the command output and re-throw." (with-temp-buffer - (apply 'vc-git-command t 0 nil args) + (condition-case err + (apply 'vc-git-command t 0 nil args) + (t (message "Error running Git: %s" err) + (message "(buffer-string:\n%s\n)" (buffer-string)) + (signal (car err) (cdr err)))) (buffer-string))) =20 (defun vc-git-test--start-branch () @@ -120,31 +125,30 @@ vc-git-test--start-branch (string-trim (vc-git-test--run "branch" "--show-current"))) =20 (defun vc-git-test--dir-headers (headers) - "Return an alist of header values for the current `vc-dir' buffer. - + "Return an alist of header values as they would appear in `vc-dir'. HEADERS should be a list of (NAME ...) strings. This function will return a list of (NAME . VALUE) pairs, where VALUE is nil if the header is absent." - ;; FIXME: to reproduce interactive sessions faithfully, we would need - ;; to wait for the dir-status-files process to terminate; have not - ;; found a reliable way to do this. As a workaround, kill pending - ;; processes and revert the `vc-dir' buffer. - (vc-dir-kill-dir-status-process) - (revert-buffer) - (mapcar - (lambda (header) - (let* ((pattern - (rx bol - (literal header) (* space) ": " (group (+ nonl)) - eol)) - (value (and (goto-char (point-min)) - (re-search-forward pattern nil t) - (match-string 1)))) - (cons header value))) - headers)) + (with-temp-buffer + ;; We invoke the backend's dir-extra-headers function directly + ;; because (a) that covers the logic we mean to test (b) going + ;; through vc-dir "like a user would" has proven fraught; see + ;; bug#76187 for hard-to-reproduce and hard-to-diagnose errors. + (insert (vc-git-dir-extra-headers default-directory) "\n") + (mapcar + (lambda (header) + (let* ((pattern + (rx bol + (literal header) (* space) ": " (group (+ nonl)) + eol)) + (value (and (goto-char (point-min)) + (re-search-forward pattern nil t) + (match-string 1)))) + (cons header value))) + headers))) =20 (ert-deftest vc-git-test-dir-branch-headers () - "Check that `vc-dir' shows expected branch-related headers." + "Check that dir-extra-headers recognizes various branch arrangements." (skip-unless (executable-find vc-git-program)) ;; Create a repository that will serve as the "remote". (vc-git-test--with-repo origin-repo @@ -152,42 +156,42 @@ vc-git-test-dir-branch-headers ;; 'git clone' this repository and test things in this clone. (ert-with-temp-directory clone-repo (vc-git-test--run "clone" origin-repo clone-repo) - (vc-dir clone-repo) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . ,main-branch) - ("Tracking" . ,(concat "origin/" main-branch)) - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch: no tracking information. - (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - '(("Branch" . "feature/foo") - ("Tracking" . nil) - ("Remote" . nil)))) - ;; Push with '--set-upstream origin': tracking information - ;; should be updated. - (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/foo") - ("Tracking" . "origin/feature/foo") - ("Remote" . ,origin-repo)))) - ;; Checkout a new branch tracking the _local_ main branch. - ;; Bug#68183. - (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-bra= nch) - (should - (equal - (vc-git-test--dir-headers - '("Branch" "Tracking" "Remote")) - `(("Branch" . "feature/bar") - ("Tracking" . ,main-branch) - ("Remote" . "none (tracking local branch)")))))))) + (let ((default-directory clone-repo)) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . ,main-branch) + ("Tracking" . ,(concat "origin/" main-branch)) + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch: no tracking information. + (vc-git-test--run "checkout" "-b" "feature/foo" main-branch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + '(("Branch" . "feature/foo") + ("Tracking" . nil) + ("Remote" . nil)))) + ;; Push with '--set-upstream origin': tracking information + ;; should be updated. + (vc-git-test--run "push" "--set-upstream" "origin" "feature/foo") + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/foo") + ("Tracking" . "origin/feature/foo") + ("Remote" . ,origin-repo)))) + ;; Checkout a new branch tracking the _local_ main branch. + ;; Bug#68183. + (vc-git-test--run "checkout" "-b" "feature/bar" "--track" main-b= ranch) + (should + (equal + (vc-git-test--dir-headers + '("Branch" "Tracking" "Remote")) + `(("Branch" . "feature/bar") + ("Tracking" . ,main-branch) + ("Remote" . "none (tracking local branch)"))))))))) =20 ;;; vc-git-tests.el ends here --=20 2.48.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 15 18:07:47 2025 Received: (at 76187) by debbugs.gnu.org; 15 Feb 2025 23:07:47 +0000 Received: from localhost ([127.0.0.1]:58472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjRGF-00086b-4V for submit@debbugs.gnu.org; Sat, 15 Feb 2025 18:07:47 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:56122) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjRGB-00086K-VI for 76187@debbugs.gnu.org; Sat, 15 Feb 2025 18:07:45 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id B73A93C00E411; Sat, 15 Feb 2025 15:07:37 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id FgsdhG2pabW2; Sat, 15 Feb 2025 15:07:37 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 677933C00E413; Sat, 15 Feb 2025 15:07:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 677933C00E413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1739660857; bh=4G4GCRyvXr3H4KpEJXzDmbZM76CSTgGn16tbEwpw3s0=; h=Message-ID:Date:MIME-Version:To:From; b=FavVtGFHSKBdW8XCLkBlH1In/dvVwiEMEeR+ukjPUw3uY1if8m0hew6PAAbTGm2T1 tdD9UhYNbBDcSCyh+KuKR37ZIwe2lVrkQ2REwBEfJg+QoFwCpYdHIPnW1wIcS+9US+ 8pj/x2PFnHhSrtvyYJe2nXJZV4yCPDJCd9c9OOwr/mFWsLRE7r1k14ZysPh8iXjg4a +buJ1IJ7yVIPg5RpGCskzGfr+gkLk8+MjGw/5BurY6fJ/jHfQwfXXuDC67IPg0y821 plsCL8jiGp3WBboTzsLMUrxJuGUdvVRfgEMfbn/oudxgBauAM1hSCmstxx6zJwdOxE ITP8tlLIDgpkg== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id WYsOEyoT3ZpV; Sat, 15 Feb 2025 15:07:37 -0800 (PST) Received: from [192.168.254.12] (unknown [47.147.225.25]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 3AE4B3C00E411; Sat, 15 Feb 2025 15:07:37 -0800 (PST) Message-ID: <4beec0db-428c-4ef3-a6a5-3477bf8082ab@cs.ucla.edu> Date: Sat, 15 Feb 2025 15:07:36 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> <874j0xqwoi.fsf@gmail.com> <868qq9gdag.fsf@gnu.org> <87seoftrom.fsf@gmail.com> <87ikpaetti.fsf@gmail.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <87ikpaetti.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2025-02-15 14:17, K=C3=A9vin Le Gouguec wrote: > Either fixes the issue, as far as I can validate. I still have a sligh= t > preference for the second one ... and the second one tests faster, so that's a good argument for going=20 with it. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 16 05:19:15 2025 Received: (at 76187) by debbugs.gnu.org; 16 Feb 2025 10:19:15 +0000 Received: from localhost ([127.0.0.1]:60355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjbk3-0005Xc-4s for submit@debbugs.gnu.org; Sun, 16 Feb 2025 05:19:15 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:38727) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tjbju-0005Wm-HR for 76187@debbugs.gnu.org; Sun, 16 Feb 2025 05:19:07 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-38c62ef85daso533495f8f.3 for <76187@debbugs.gnu.org>; Sun, 16 Feb 2025 02:19:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739701140; x=1740305940; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MMGCFb8Mj1sHJ31kcxi18IoDk69+pjz4H4/CCMuw+fE=; b=cqk6F9N9iIh3rkMkYW1KQ74tXyGDPufRuAYRnHuopBhU/v9xXL4XyNqJ7UaHm+LJ6G N+wZq2gojTN3K0tTURxRTwP6GR+losUUCjG38jpgkbnaFYeZ3kVvQPL4OUsw3G8liFcy jQmscHLFHmfZ0al3wxeVzM3jxPRbLA4OkuBqKihEBlBLmWfTNi+LhGM1hsEzfJC12Cwn quQxLJTSCesFH8YICr5SO8Kqz9ZMLM30SJO+7S5CR5OcLV80UZ8eQEQSOaaCB0Opg/2k OyuTnP5VAUZpFYuJTW1xcHx3vy62D5nkD6w//6yz7aqdiS8thaukPmMIsQy+bCXVBLDi aM9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739701140; x=1740305940; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=MMGCFb8Mj1sHJ31kcxi18IoDk69+pjz4H4/CCMuw+fE=; b=ZPp5WhDGblHEclsuEjyiGdEYMG+SpDbW8i/ADSfAiOV7DivP3LiJ88DTft1buOt/6E yyknnSV0odDzrLN9l5M8YJ33UeF3Mm6ua4k2AcqzGu78QCOmGtBZ6b7Lg+4eRJB4R8aY E5rXEdmRhdTVUfo3FNY/zr8Nvoe+j7rGbEux4ETMtHy3FS6QbBRb/9PW2ZqA1wEBd47/ JuRrWQIHSs6pBKIqyaW2brzcwvAMTgGwRyWxMsLXpHr8KnNDxyemnWNVnKBajzUaBk8a DEPc48FtLKb7R+fjU5oO0Sm3bz56+9NPwKf1F0Gn5bBXfnlUT0sRFCPU4D6bGaApYO0/ Rk5A== X-Forwarded-Encrypted: i=1; AJvYcCWC8Tog3dluec7w+2fm1o7M57TlIjJdGlniP0dZIixOHFhUjS3tr3gt1AOsgMxM4VlfSYgfQg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwWSTMxhnaaehN7kW+BL/apj4D84au60WKaC4PaIrcq+HISO13d vkg3+bJ0c6jpKzzFWj4a7DlCq/+zQqVIr6WZSXCM+306YNb7GNb9 X-Gm-Gg: ASbGnctgItgX+fqR2UCDPs2rHVXWE/GhqwV4vbZaq+kVNeHRoh7r5wok2bgsu6wEKGR SzXXj0kgpbCXEsg+eaXi0kfwMIb9Igh8XzSTwmVynugCUqhdgmL4pvH0M4rIn52vXZVj2yqM9fm nuHkNTJjSdIhOlBQ5OwsmPbVt+30kfgnRaHDjOckDTfDgKXSXSM7lTBg9fsRM1O6GYeJEZ0eSF7 dLJahQEwmkM5AnXl7K3hCXzhRc0h9JCBfxrf03pfifc5jWpt006n5J9G2fJIBvS4F28gW/4io+6 FdqzmhIv4QaeiLGmxbc= X-Google-Smtp-Source: AGHT+IE/UGzpskhAxk2lqyYGqDh1EBA57DuDTUQiORyE51EP4lJR0gD0f1FEDdMmsw/1EKliC3C5CQ== X-Received: by 2002:a05:600c:154e:b0:439:5b36:7082 with SMTP id 5b1f17b1804b1-4396e69a5f7mr20964695e9.2.1739701139965; Sun, 16 Feb 2025 02:18:59 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4396b0aa4e9sm52804635e9.16.2025.02.16.02.18.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2025 02:18:58 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Paul Eggert Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <4beec0db-428c-4ef3-a6a5-3477bf8082ab@cs.ucla.edu> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> <874j0xqwoi.fsf@gmail.com> <868qq9gdag.fsf@gnu.org> <87seoftrom.fsf@gmail.com> <87ikpaetti.fsf@gmail.com> <4beec0db-428c-4ef3-a6a5-3477bf8082ab@cs.ucla.edu> Date: Sun, 16 Feb 2025 11:18:58 +0100 Message-ID: <87v7ta2nvx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Paul Eggert writes: > On 2025-02-15 14:17, K=C3=A9vin Le Gouguec wrote: >> Either fixes the issue, as far as I can validate. I still have a slight >> preference for the second one > > ... and the second one tests faster, so that's a good argument for going = with it. Right. Waiting on Dmitry's thoughts before installing; OT1H I have no qualms about this testcase invoking backend functions directly (just noticed that there is a precedent, e.g. vc-git-test-annotate-time), OTOH maybe this is not a practice we want to encourage. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 16 22:07:52 2025 Received: (at 76187) by debbugs.gnu.org; 17 Feb 2025 03:07:52 +0000 Received: from localhost ([127.0.0.1]:40347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjrU7-0007Ji-LY for submit@debbugs.gnu.org; Sun, 16 Feb 2025 22:07:52 -0500 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]:48839) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjrU3-0007J7-90 for 76187@debbugs.gnu.org; Sun, 16 Feb 2025 22:07:49 -0500 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id C9B3B1140170; Sun, 16 Feb 2025 22:07:41 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Sun, 16 Feb 2025 22:07:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1739761661; x=1739848061; bh=GC85/StS3qvK7gI531SRaVRgVCosOpotopQmj3v3KJE=; b= iF1RVM99OGbiZocJcWyfUhza4HNobkKX+r/4XWy6JlBnq8DSqiRn5p76wytv1T54 EIUuvu+bT4L28QssSclbTjxVQcHi+LFIhhukGVPNzfpYrt6KQO7qG218dRkG+/tP 9WR9haewMowTWm72k1O9Gly87iTJnaNuH2THAAz9zeW+iD5a2vWaHu74v6LkRhr/ Lul1XlpKRN67SXfmprQAuQVE2xuH3AEDdNQTwHUKDUkYU8yLqG6mu38RN3F8KfxF Pih8W6drAAXSkNzCfja4qOT5hF/rDtH9498Eh3PyPZ8QIw7vXivppvatSeAvEfbD DEo/7zaJxiXk7WakN3gw3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739761661; x= 1739848061; bh=GC85/StS3qvK7gI531SRaVRgVCosOpotopQmj3v3KJE=; b=C cf96IQ+HMHpr+eJ9G65OVVo4IaAWfONpKUKOWw0Ae8sEG0qhVwx2m6zRoqh6DdMg 0Fq6gN7IzKuosypw55+sFckgYHr4pa/LfxCfnYP1aFLJtJ0x6DX70YDA3fgN1B9T tNN2Mqnhsxay19KnlaBBqz2b8fimsZd3LLCCtYLc7UE1cU/N/6gfw2FriivSJ3Xf ls5xREjJRKYB4kgjP6DmkfWPJzkTmvyFhbwMib26poq/4q3OYL43xQQ2D/qGzWVp M6Zb+dk8KBk6NwqbLo8UTsng/fZpGFG60IgJzhYsF3s0aY4tJ/JBXe74N+GUY6PW f5cUKJVl0x8U4aBpny6Mg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehjedvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddv jeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrd guvghvqeenucggtffrrghtthgvrhhnpeegleefteekgffhvdfhtdegveevveetteegteev geettdehhfdukeetheffueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthht ohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepkhgvvhhinhdrlhgvghhouh hguhgvtgesghhmrghilhdrtghomhdprhgtphhtthhopegvghhgvghrthestghsrdhutghl rgdrvgguuhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopeejie dukeejseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 16 Feb 2025 22:07:39 -0500 (EST) Message-ID: <07e243c5-f4ff-43e2-b8e9-e512a85f35da@gutov.dev> Date: Mon, 17 Feb 2025 05:07:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= , Paul Eggert References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> <874j0xqwoi.fsf@gmail.com> <868qq9gdag.fsf@gnu.org> <87seoftrom.fsf@gmail.com> <87ikpaetti.fsf@gmail.com> <4beec0db-428c-4ef3-a6a5-3477bf8082ab@cs.ucla.edu> <87v7ta2nvx.fsf@gmail.com> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <87v7ta2nvx.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76187 Cc: 76187@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi! On 16/02/2025 12:18, Kévin Le Gouguec wrote: > Paul Eggert writes: > >> On 2025-02-15 14:17, Kévin Le Gouguec wrote: >>> Either fixes the issue, as far as I can validate. I still have a slight >>> preference for the second one >> ... and the second one tests faster, so that's a good argument for going with it. > Right. > > Waiting on Dmitry's thoughts before installing; OT1H I have no qualms > about this testcase invoking backend functions directly (just noticed > that there is a precedent, e.g. vc-git-test-annotate-time), OTOH maybe > this is not a practice we want to encourage. Thanks for the investigation, and I agree that the patch that "ditches vc-dir entirely" is TRT. The vc--tests.el files are supposed (or at least are allowed) to test backend-specific functionality. We currently call vc-dir from vc-bzr-tests as well (helps with code coverage) - which BTW has this workaround: (while (vc-dir-busy) (sit-for 0.1)) If/when we decide to make the bzr tests similarly more isolated, we should try to create 1-2 cases in vc-tests.el that exercise the general code path. But that's a future problem. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 17 16:11:15 2025 Received: (at 76187-done) by debbugs.gnu.org; 17 Feb 2025 21:11:15 +0000 Received: from localhost ([127.0.0.1]:50097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tk8OZ-00015y-ET for submit@debbugs.gnu.org; Mon, 17 Feb 2025 16:11:15 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:38672) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tk8OV-00015H-8B for 76187-done@debbugs.gnu.org; Mon, 17 Feb 2025 16:11:12 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4396444e4dfso2632725e9.3 for <76187-done@debbugs.gnu.org>; Mon, 17 Feb 2025 13:11:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739826665; x=1740431465; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3k3d8hOuLOpOSltPoVAfEmOST5gwLsGNWxxILch8AOc=; b=HeUwWZudsH+EYybbcZLYOhqx0pLNuTgVtKWU2AXL3kHtPJst7gTO/ZON7HjFpgo/rH KRo7NvMNhR/t3d8gUADodP9OGd6MzmqsR10Um6+VAwrasr4/ak4lanPP+HBMgyV9JoRG L757UE1b9QoaV5zlYpOGxBhEwFMfx/ErduOtR8YdG4UcrO2N77PyqmNEVgMfYp+Y0uO9 PvHBDTwAbSic5XoBxhmSBA1XBJwMNve5l3HW9z1wzzRxpj1BchympdGXUgesx1V+YyJh Q/I3IQqyVo/HAyRkDPElqsvALVPvRYppjR1KkpCaEIpK0LrfyP74QVS1QAd6I7ulRjbI qkPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739826665; x=1740431465; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3k3d8hOuLOpOSltPoVAfEmOST5gwLsGNWxxILch8AOc=; b=fSc2Hwlk/TbmE3aleW9YSNZOhlOjup2tfk8Bynwc6eqTR23Vk0kf6hcD3EYmQrkQh8 l7+B/Jq9t/5Qk/lRDC/AHfS+cX+2oZ1QCx1qMP3nEutaEDmPF9QrmKtPEHbZyIL+gCTX F2jvQIdfBU+yePF5isV2ZLQEWdve9wjWkBYezmq1OukVj6ArFrrgqubC29iYL7EQuy6z FytRwRDncxYkvm8OVFSPAeStag+s9nFUGRdcnB6weuVBvFXZRA38oa7OclijJ+FrqtM+ tVv2eIJACsIYXgtQYbs5Lte1ASEY4RW9OolvEllRiCWe+fw027VNc9gfd4bFva3xuJLy UHMA== X-Forwarded-Encrypted: i=1; AJvYcCVIZxBWiJrDU1ME5uhZzJduN/6qTs1PqTWZzvo/C2PW2toewEHa//Vfg/D/ZO+zAjWrejdglYxmnrdW@debbugs.gnu.org X-Gm-Message-State: AOJu0YyDnSZpMdd030+HihfoEwLTWM/rUwzeCFRIKy6/kFiLmBNCa4ap KlM3kDR39bFm5BabEFwhrdo6TjaCd5Fkh/FKXP8ZQfmAmnn2X1to X-Gm-Gg: ASbGncuQMBTgWssB4V9jx5YNr2qQ8ApqlAjtzZXfrvpZEvC+MMVjriyebzC6kIUpH1E PMpP4Gzs8OMHJVXyYErQR2a0JAZY4VXZyINwere7cTztWK59DF3YKEH2c7w3JxAxxnmHC08VAMq z9TvABlNvTLOE+ER5YSHFL10FB44hRNk0KiyH4/Ls8svTZyHpC+OJ0RSIyn7pDInMqZrEwujJXa IkdB5w3nf5r5wldXo/SXDWjeIKPINFVgLm020wlzSTnPKUSbETybTyLKo5b8/Li2K99s5bzj/vV 1CnoKNcDVhpGkFf3T/c= X-Google-Smtp-Source: AGHT+IGsb+V7FJWgqVA0Xtv1wHFvdpk2fjUgsiR+TgaMHG4V64F2q5VMdkgIvA4q3wFrcEUXYPdwKA== X-Received: by 2002:a05:600c:4e8d:b0:439:6017:668f with SMTP id 5b1f17b1804b1-4396e69d8abmr34320475e9.1.1739826664453; Mon, 17 Feb 2025 13:11:04 -0800 (PST) Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439617fc885sm131076235e9.9.2025.02.17.13.11.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 13:11:04 -0800 (PST) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Dmitry Gutov Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora In-Reply-To: <07e243c5-f4ff-43e2-b8e9-e512a85f35da@gutov.dev> References: <87a5ase33m.fsf@gmail.com> <875xlgdxfd.fsf@gmail.com> <871pw4duz8.fsf@gmail.com> <87seokcevq.fsf@gmail.com> <878qqardr4.fsf@gmail.com> <86ed02jpcc.fsf@gnu.org> <87jz9tr9f0.fsf@gmail.com> <86ed01h8wf.fsf@gnu.org> <878qq9qzyq.fsf@gmail.com> <874j0xqwoi.fsf@gmail.com> <868qq9gdag.fsf@gnu.org> <87seoftrom.fsf@gmail.com> <87ikpaetti.fsf@gmail.com> <4beec0db-428c-4ef3-a6a5-3477bf8082ab@cs.ucla.edu> <87v7ta2nvx.fsf@gmail.com> <07e243c5-f4ff-43e2-b8e9-e512a85f35da@gutov.dev> Date: Mon, 17 Feb 2025 22:11:02 +0100 Message-ID: <87o6z02s61.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 76187-done Cc: 76187-done@debbugs.gnu.org, Eli Zaretskii , Paul Eggert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Dmitry Gutov writes: >> Paul Eggert writes: >>=20 >>> On 2025-02-15 14:17, K=C3=A9vin Le Gouguec wrote: >>>> Either fixes the issue, as far as I can validate. I still have a slig= ht >>>> preference for the second one >>> ... and the second one tests faster, so that's a good argument for goin= g with it. >> Right. >> Waiting on Dmitry's thoughts before installing; OT1H I have no qualms >> about this testcase invoking backend functions directly (just noticed >> that there is a precedent, e.g. vc-git-test-annotate-time), OTOH maybe >> this is not a practice we want to encourage. > > Thanks for the investigation, and I agree that the patch that "ditches vc= -dir entirely" is TRT. > > The vc--tests.el files are supposed (or at least are allowed) to= test backend-specific functionality. Thanks for weighing in on this! I therefore installed the patch that invokes vc-git-dir-extra-headers directly. Boldly closing this now. > We currently call vc-dir from vc-bzr-tests as well (helps with code cover= age) - which BTW has this workaround: > > (while (vc-dir-busy) > (sit-for 0.1)) (=F0=9F=A4=A6 Would that I had thought of grepping the tests for vc-dir(-bu= sy), instead of reinventing the square wheel and wasting everyone's time=E2=80= =A6) From unknown Wed Jun 18 00:17:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 18 Mar 2025 11:24:42 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator