Re: [PATCH 6/6] Add a simple test script, embed expected results into test files

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

 



(I removed Pavel from the cc: list as he probably does not want to read such
mails)

Actually, this led me to a more important issue: I don't think the test suite
output can mix stdout and stderr safely, because the order may differ if both
have data.  Look at preprocessor18.c for an example.  I think the test suite
needs to have a block for check-stdout-{start,end} and a block for
check-stderr-{start,end}.

Absolutely !

../sparse -E preprocessor/preprocessor18.c 1> foo 2>&1 && cat foo
and
../sparse -E preprocessor/preprocessor18.c

are not giving the same result and I had the same conclusion as yours
before going to bed. I was actually thinking about splitting the output
between stderr and stdout too. I added 1: or 2: at the beginning of
output lines but I think I like check-(stdout|stderr)-(start,end) better.

However I bumped into another issue:
$ hexdump -C bar
00000000  0a 0a 78 78 78 0a 0a 0a                       |..xxx...|
$ foo=`cat bar`
$ echo "$foo" | hexdump -C
00000000  0a 0a 78 78 78 0a                                |..xxx.|

it eats the last new lines but one and not the first '\n's !
I still have to sort this out...

--
Damien
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux