Re: [PATCH 2/3] t7900: exercise detaching via trace2 regions

Junio C Hamano
2024-08-21T18:38:08Z

Patrick Steinhardt <ps@pks.im> writes:

>> ...I think this "we have no better way..." comment is now out of date
>> (and can probably just be dropped).
>
> Oops, yes, that one is definitely stale. I'll drop it in the next
> version of this patch series.

I am not sure if there is a need for "the next version"; in the
meantime, let me do this. I'd prefer to merge the main topic down
to 'master' soonish.

Thanks.

1: 759b453f9f = 1: 759b453f9f t7900: fix flaky test due to leaking background job
2: b64db3e437 ! 2: 51a0b8a2a7 t7900: exercise detaching via trace2 regions
@@ Commit message
do not have the ability to daemonize.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
+ [jc: dropped a stale in-code comment from a test]
Signed-off-by: Junio C Hamano <gitster@pobox.com>

## builtin/gc.c ##
@@ builtin/gc.c: static int maintenance_run_tasks(struct maintenance_run_opts *opts

## t/t7900-maintenance.sh ##
@@ t/t7900-maintenance.sh: test_expect_success '--no-detach causes maintenance to not run in background' '
- # We have no better way to check whether or not the task ran in
- # the background than to verify whether it output anything. The
- # next testcase checks the reverse, making this somewhat safer.
+ git config set maintenance.loose-objects.auto 1 &&
+ git config set maintenance.incremental-repack.enabled true &&
+
+- # We have no better way to check whether or not the task ran in
+- # the background than to verify whether it output anything. The
+- # next testcase checks the reverse, making this somewhat safer.
- git maintenance run --no-detach >out 2>&1 &&
- test_line_count = 1 out
+ GIT_TRACE2_EVENT="$(pwd)/trace.txt" \
3: eac44feff3 = 3: 8311e3b551 builtin/maintenance: fix loose objects task emitting pack hash