bug-cvs
[Top][All Lists]
Advanced

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

Re: Is there really any interest in a patch to allow cvs 1.11.6 torun


From: Paul Edwards
Subject: Re: Is there really any interest in a patch to allow cvs 1.11.6 torun
Date: Tue, 07 Oct 2003 01:58:45 GMT

"Kelly F. Hickel" <address@hidden> wrote in message news:address@hidden
> OK, well, I narrowed the problem down to the fact that cvs is returning
> 255 when running the cvs diff command.  There doesn't seem to be any

It is normal to return non-zero, so that scripts can be informed
that there were differences.

What is EXIT_FAILURE defined as in your stdlib.h?
-1 or 255?

Whatever it is, the fact that it isn't 1 is what is stuffing up
the script.

But it is the script that is at fault.  Your system is allowed to
have an EXIT_FAILURE of anything it wants.  As a "fix
that will work for most environments" I would change
sanity.sh, the dotest_status function, and say something
like:

# Like dotest except second argument is the required exitstatus.
dotest_status ()
{
  eval "$3" >${TESTDIR}/dotest.tmp 2>&1
  status=$?

  if test "$status" != "0"; then
    status=1
  fi

  if test "$status" != "$2"; then
    cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
    echo "exit status was $status; expected $2" >>${LOGFILE}
    fail "$1"
  fi
  dotest_internal "$1" "$3" "$4" "$5"
}

At least for the purposes of your test.  Perhaps a better fix in
sanity.sh would be to have a variable called EXIT_FAILURE
and in all the dotest_status calls, use $EXIT_FAILURE instead
of hardcoding as 1.

> Before I go too wrong, it's my understanding that cvs no longer uses an
> external diff program, but that it has that code built into it.  This

Correct.  It's pretty damn good having it self-contained now.

BFN.  Paul.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]