Re: Building GIT on HP-UX: "make test" fails

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

 



On 3 Aug 2009 at 16:54, Alex Riesen wrote:

> Try:
> 
>   $ cd t && ./t0100-previous.sh -d -v -i
> 
> Look at the output and if you can't make anything out of it,
> just post it here.

Hi!

Thanks for that. It seems the basic problem is:
fatal: your vsnprintf is broken

However from my own programming I realized that HP-UX and Linux vsnprintf return 
different values. Here's how I deal with it:

My comment says:
Define ``C99_LIBRARY'' fixes incompatible return value of
 * ``snprintf()'' that causes memory corruption on error with C99-compliant
 * C library. 
[...]
 * Handle negative return value of ``snprintf()'' properly.
[...]
        csp[cap] = '\0';
        d = snprintf(csp, cap, "%s", base);
#ifdef  C99_LIBRARY
        if ( d > cap )
                d = cap;
#else
        if ( d > 0 )
#endif
                csp += d, cap -= d;
--------
Back to the test output; here it is:
./t0100-previous.sh -d -v -i
Initialized empty Git repository in /home/windl/GNU/git-1.6.2.5/t/trash 
directory.t0100-previous/.git/
* expecting success:
        test_commit A &&
        git checkout -b junk &&
        git checkout - &&
        test "$(git symbolic-ref HEAD)" = refs/heads/master &&
        git branch -d @{-1} &&
        test_must_fail git rev-parse --verify refs/heads/junk

[master (root-commit) 0ddfaf1] A
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 A.t
Switched to a new branch 'junk'
Switched to branch 'master'
Deleted branch junk (was 0ddfaf1).
fatal: Needed a single revision
*   ok 1: branch -d @{-1}

* expecting success:
        git reflog expire --expire=now &&
        git checkout -b junk2 &&
        git checkout - &&
        test "$(git symbolic-ref HEAD)" = refs/heads/master &&
        test_must_fail git branch -d @{-12} &&
        git rev-parse --verify refs/heads/master

Switched to a new branch 'junk2'
Switched to branch 'master'
error: branch '@{-12}' not found.
0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050
*   ok 2: branch -d @{-12} when there is not enough switches yet

* expecting success:
        git checkout A &&
        test_commit B &&
        git checkout A &&
        test_commit C &&
        git branch -f master B &&
        git branch -f other &&
        git checkout other &&
        git checkout master &&
        git merge @{-1} &&
        git cat-file commit HEAD | grep "Merge branch 'other'"

Note: moving to 'A' which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at 0ddfaf1... A
[detached HEAD d9df450] B
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 B.t
Previous HEAD position was d9df450... B
fatal: your vsnprintf is broken
* FAIL 3: merge @{-1}

                git checkout A &&
                test_commit B &&
                git checkout A &&
                test_commit C &&
                git branch -f master B &&
                git branch -f other &&
                git checkout other &&
                git checkout master &&
                git merge @{-1} &&
                git cat-file commit HEAD | grep "Merge branch 'other'"


--
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]