git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: git@vger.kernel.org
Subject: Re: t4216-log-bloom.sh broken ?
Date: Thu, 02 May 2024 09:26:41 -0700	[thread overview]
Message-ID: <xmqqle4sfada.fsf@gitster.g> (raw)
In-Reply-To: <20240502055621.GA29945@tb-raspi4> ("Torsten Bögershausen"'s message of "Thu, 2 May 2024 07:56:22 +0200")

Torsten Bögershausen <tboegi@web.de> writes:

> ++ check_corrupt_graph BDAT clear 00000000
> ++ corrupt_graph BDAT clear 00000000
> ++ graph=.git/objects/info/commit-graph
> ++ test_when_finished 'rm -rf .git/objects/info/commit-graph'
> ++ test 0 = 0
> ++ test_cleanup='{ rm -rf .git/objects/info/commit-graph
> 		} && (exit "$eval_ret"); eval_ret=$?; :'
> ++ git commit-graph write --reachable --changed-paths
> ++ corrupt_chunk_file .git/objects/info/commit-graph BDAT clear 00000000
> ++ fn=.git/objects/info/commit-graph
> ++ shift
> ++ perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
> ++ command /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
> ++ /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
> ++ mv .git/objects/info/commit-graph.tmp .git/objects/info/commit-graph
> override r--r--r--  tb/staff for .git/objects/info/commit-graph? (y/n [n]) not overwritten

Another probing question.  Do t5318, t5319, t5324, and t5328 pass?

The "mv" is part of the corrupt_chunk_file helper is used by this:

    corrupt_graph () {
            graph=.git/objects/info/commit-graph &&
            test_when_finished "rm -rf $graph" &&
            git commit-graph write --reachable --changed-paths &&
            corrupt_chunk_file $graph "$@"
    }

and reads like this:

    corrupt_chunk_file () {
            fn=$1; shift
            perl "$TEST_DIRECTORY"/lib-chunk/corrupt-chunk-file.pl \
                    "$@" <"$fn" >"$fn.tmp" &&
            mv "$fn.tmp" "$fn"
    }

If the final "mv" is what is failing in the above trace, the test
tried to corrupt the objects/info/commit-graph file, expecting that
later steps will notice breakage.  But if the broken file written in
commit-graph.tmp failed to become the final commit-graph, later
steps will see healthy graph file and it is understandable that we
do not see any breakage that we expect, thus failing the test.

Is "mv" somehow configured to always go interactive on that box and
on that box alone?  For example if you have ~/bin/mv that does
something silly like

	#!/bin/bash
	exec /bin/mv -i "$@

and have ~/bin early in $PATH, it may be sufficient to explain the
error we see (I am not claiming that is the only way to cause this
test failure; it is just one possible one).



      parent reply	other threads:[~2024-05-02 16:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 17:12 [ANNOUNCE] Git v2.45.0 Junio C Hamano
2024-05-01 17:39 ` rsbecker
2024-05-02  5:56 ` t4216-log-bloom.sh broken ? Torsten Bögershausen
2024-05-02 16:06   ` Junio C Hamano
2024-05-02 18:59     ` Torsten Bögershausen
2024-05-02 19:26       ` SZEDER Gábor
2024-05-02 19:55         ` Junio C Hamano
2024-05-02 20:05           ` Junio C Hamano
2024-05-02 20:15           ` Junio C Hamano
2024-05-02 20:51             ` Torsten Bögershausen
2024-05-02 21:20               ` Junio C Hamano
2024-05-02 16:26   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqle4sfada.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).