From: Junio C Hamano Date: Fri, 01 Jul 2022 02:01:03 GMT Subject: Re: [PATCH v15 6/6] unpack-objects: use stream_loose_object() to unpack large objects Message-ID: In-Reply-To: <5a4782d746a496e8edd1654296bac390d8e1c9d3.1654914555.git.chiyutianyi@gmail.com> Han Xin writes: > +BATCH_CONFIGURATION='-c core.fsync=loose-object -c core.fsyncmethod=batch' > + > +test_expect_success 'unpack big object in stream (core.fsyncmethod=batch)' ' > + prepare_dest 1m && > + GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \ > + git -C dest.git $BATCH_CONFIGURATION unpack-objects + grep fsync/hardware-flush trace2.txt && > + test_dir_is_empty dest.git/objects/pack && > + git -C dest.git cat-file --batch-check="%(objectname)" current && > + cmp obj-list current > +' This test without any prerequisite expects that "hardware-flush" will always appear in the trace, but is that reasonable? Don't we need either (1) some sort of prerequisite to make sure this test piece runs only on platforms that will use hardware-flush, or (2) loosen grep pattern to look for just "fsync/", or (3) something else? It will become even worse when we queue Ævar's "trace2 squelch" patch on top, as we will stop emitting trace entries for that did not trigger.