RE: git ftbfs on s390x (test failures)

Pranav P <[email protected]>
Newsgroups gmane.linux.debian.ports.s390
Message-ID <BY5PR15MB35395D549C3B2EF08951840CA0BB2@BY5PR15MB3539.namprd15.prod.outlook.com>
Hi,

I was able to narrow down the problem and I do have an idea for a fix.

diff --git a/builtin/backfill.c b/builtin/backfill.c
index 33e1ea2f84..18f9701487 100644
--- a/builtin/backfill.c
+++ b/builtin/backfill.c
@@ -123,7 +123,7 @@ int cmd_backfill(int argc, const char **argv, const char *prefix, struct reposit
                .sparse = 0,
        };
        struct option options[] = {
-               OPT_INTEGER(0, "min-batch-size", &ctx.min_batch_size,
+               OPT_MAGNITUDE(0, "min-batch-size", &ctx.min_batch_size,
                            N_("Minimum number of objects to request at a time")),
                OPT_BOOL(0, "sparse", &ctx.sparse,
                         N_("Restrict the missing objects to the current sparse-checkout")),


This is passing all of the test cases. But with this change a size_t pointer is being cast to an unsigned long pointer.
This could potentially lead to some issue in some architecture.
If I can verify that the min_batch_size variable (which is a size_t var) is not taking a value larger than an int could store, then we can change its data type from size_t to int. So, I was checking if there is any evidence that indicates a potential range for min_batch_size.
I was also planning to ping with the upstream community for clarification.

Thanks,
Pranav


________________________________
From: Pranav P <[email protected]>
Sent: Monday, April 21, 2025 10:08 AM
To: Bastian Blank <[email protected]>; debian-s390 <[email protected]>; [email protected] <[email protected]>; elbrus <[email protected]>
Subject: Re: [EXTERNAL] Re: git ftbfs on s390x (test failures)

Hi,

I was able to reproduce the issue.
I will update all of my findings in the mailing list.

Thanks,
Pranav
________________________________
From: Bastian Blank <[email protected]>
Sent: Thursday, April 17, 2025 4:45 PM
To: debian-s390 <[email protected]>; [email protected] <[email protected]>
Subject: [EXTERNAL] Re: git ftbfs on s390x (test failures)

On Thu, Apr 17, 2025 at 12:46:08PM +0200, Paul Gevers wrote:
> > git ftbfs on s390x (test failures), there's no good summary on the build
> > log:

The failing test is:

| expecting success of 5620.4 'do partial clone 2, backfill min batch size':
|        git clone --no-checkout --filter=blob:none      \
|                --single-branch --branch=main            \
|                "file://$(pwd)/srv.bare" backfill2 &&
|
|        GIT_TRACE2_EVENT="$(pwd)/batch-trace" git \
|                -C backfill2 backfill --min-batch-size=20 &&
|
|        # Batches were used
|        test_trace2_data promisor fetch_count 20 <batch-trace >matches &&
|        test_line_count = 2 matches &&
|        test_trace2_data promisor fetch_count 8 <batch-trace &&
|
|        # No more missing objects!
|        git -C backfill2 rev-list --quiet --objects --missing=print HEAD >revs2 &&
|        test_line_count = 0 revs2
|
| Cloning into 'backfill2'...
| not ok 4 - do partial clone 2, backfill min batch size

>From the test log it's not remotely possible to see what is going on.

Bastian

--
I'm a soldier, not a diplomat.  I can only tell the truth.
                -- Kirk, "Errand of Mercy", stardate 3198.9
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.