Re: latest clone/pull of git.git problems with setlinebuf.

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

 



On Wed, 3 Sep 2008, Boyd Lynn Gerber wrote:
On Wed, 3 Sep 2008, Junio C Hamano wrote:
Boyd Lynn Gerber <gerberb@xxxxxxxxx> writes:
On Wed, 3 Sep 2008, Junio C Hamano wrote:
Ah, ok.  I should have noticed that setlinebuf() was outside POSIX (it is
not usable on older BSDs either).

Let's see if we can replace it with setvbuf() which is POSIX.

This fixes the problem. on both OS's.

By the way, have you actually exercised the codepath, or does your above
"fixes" mean "compiles"?

I knew it would compile on a system with POSIX setvbuf(), but I was unsure about the size argument. I know for glibc giving <NULL, 0> would be equivalent to setlinebuf(), but POSIX itself leaves what exactly happens to the size argument quite vague, saying only "otherwise [when buf is a null pointer], size may determine the size of a buffer allocated by the setvbuf() function." Does size=0 mean it allocates very little, and while it tries to line buffer the output, because the buffer is so small that it fails to buffer an entire line causing early flushing of the stream?

I only compiled it.  I am debuging some test errors.  I did a gmake test

This is the test that fails.  Everything before it passes.

...
*   still broken 4: pretend we have a known breakage
*   FIXED 5: pretend we have fixed a known breakage
...

*   ok 41: very long name in the index handled sanely
* fixed 1 known breakage(s)
* still have 1 known breakage(s)
* passed all remaining 40 test(s)
*** t0001-init.sh ***
...
*   ok 9: GIT_DIR & GIT_WORK_TREE (2)
* FAIL 10: reinit


               (
                       unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG

                       mkdir again &&
                       cd again &&
                       git init >out1 2>err1 &&
                       git init >out2 2>err2
               ) &&
               grep "Initialized empty" again/out1 &&
               grep "Reinitialized existing" again/out2 &&
               >again/empty &&
               test_cmp again/empty again/err1 &&
               test_cmp again/empty again/err2

* FAIL 11: init with --template

               mkdir template-source &&
               echo content >template-source/file &&
               (
                       mkdir template-custom &&
                       cd template-custom &&
                       git init --template=../template-source
               ) &&
               test_cmp template-source/file template-custom/.git/file

*   ok 12: init with --template (blank)
* failed 2 among 12 test(s)
gmake[2]: *** [t0001-init.sh] Error 1

I have now inclulded everything in gmake test that was not an OK. I hope this answers your questions.

What I should have said is that I have not used it outside of gmake and gmake test.

--
Boyd Gerber <gerberb@xxxxxxxxx>
ZENEZ	1042 East Fort Union #135, Midvale Utah  84047
--
To unsubscribe from this list: 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]

  Powered by Linux