Re: [StGit PATCH 1/2] Try "stg sink" without applied patches

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

 



On 2008-06-30 09:53:22 +0200, Sverre Rabbelier wrote:

> On Mon, Jun 30, 2008 at 12:45 AM, Karl Hasselström <kha@xxxxxxxxxxx> wrote:
>
> > (The implicit sink testcase actually passes, but that's just
> > because the test suite can't distinguish between a program bug and
> > an orderly abort.)
>
> Yes it can, that's where "test_must_fail" comes in.
>
> > +test_expect_success 'sink without applied patches' '
> > +    test_must_fail stg sink
> > +'
> > +
>
> Like that.

Well, except that

  1. test_must_fail doesn't even exist in StGit's test-lib.sh, because
     I've omitted it on purpose when stealing good stuff from git's
     test-lib.sh, because

  2. StGit is written in Python, so random bugs virtually never cause
     segfaults and stuff, they just raise various exceptions.

That said, StGit (especially in the master branch -- but this patch
was against stable, where this is much less true) does exit with
different exit codes depending on what kind of exception interrupted
the program, and all exceptions not on a certain list cause it to exit
with an exit code that means there's a bug (see the end of
stgit/main.py for details). So writing a test_must_fail with sane
behavior is perfectly doable and not actually all that hard.

Patch? :-)

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
--
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