Solaris test t5500 race condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I've found a race in t5500-fetch-pack.sh.  The problem is the way the
number of unpacked objects are counted:

    pack_count=$(grep Unpacking log.txt|tr -dc "0-9")

It just concatenates all the digits on the line with "Unpacking" in it. 
This is the output I get on Solaris:

    Generating pack...
    Done counting 3 objects.
    Deltifying 3 objects.
      33% (1/3) done^M  66% (2/3) done^M 100% (3/3) done
    Total 3Unpacking , written 33 objects          <------------
     (delta 0), reused 0 (delta 0)
    11fa2f0cb58ed7f02dbd5ac75ed82a53fae62a7b refs/heads/A

The marked line is written as a joyful duet between these
two functions:

    unpack-objects.c:   fprintf(stderr, "Unpacking %d objects\n",
                                nr_objects);

    pack-objects.c:     fprintf(stderr, "Total %d, written %d 
                                (delta %d), reused %d (delta %d)\n",

I can't think of a good solution right now.

Regards,

Peter
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]