test-util: Changes for 'assert' test on Windows.
authorGurucharan Shetty <gshetty@nicira.com>
Tue, 27 May 2014 14:55:31 +0000 (07:55 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 24 Jun 2014 16:44:55 +0000 (09:44 -0700)
commit784acd821b8f4e4be12e91d4d80b15880c297a7d
tree68b691bd86b11109ccccfa2595dde5c46639f208
parent64559798f85900cbacd6abd76accc5d17a206bef
test-util: Changes for 'assert' test on Windows.

There is no 'kill -l' type functionality available on Windows.
So instead of looking for the string 'ABRT', check for the exit
code in both platforms. On msys (unit test environment), it is 9
and on Linux, it is 134 (SIGABRT + 128).

On Windows, stderr is fully buffered if connected to a pipe.
Make it _IONBF so that an abort does not miss log contents.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
tests/library.at
tests/test-util.c