diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-06-12 18:29:52 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-06-12 18:29:52 +0000 |
commit | 66b110e855159d415b5106ade7fa5bf17c14f108 (patch) | |
tree | 0274cefb5c078cdf16b0b936d5ace089a724faaa /posix/transbug.c | |
parent | 3bbbaea9745d5daa8662feb68f743c7eb2aa80ea (diff) | |
download | glibc-66b110e855159d415b5106ade7fa5bf17c14f108.zip glibc-66b110e855159d415b5106ade7fa5bf17c14f108.tar.gz glibc-66b110e855159d415b5106ade7fa5bf17c14f108.tar.bz2 |
Update.
2003-06-12 H.J. Lu <hongjiu.lu@intel.com>
* posix/transbug.c (run_test): Return 1 for failure.
(do_test): Compare only if run_test is successful.
2003-06-12 Simon Josefsson <jas@extundo.com>
* argp/argp.h [!__THROW]: Define if undefined.
* posix/transbug.c: New file.
* inet/Makefile (aux): Add check_pf.
* include/ifaddrs.h: Add prototype for __check_pf.
* sysdeps/generic/check_pf.c: New file.
* sysdeps/unix/sysv/linux/check_pf.c: New file.
Diffstat (limited to 'posix/transbug.c')
-rwxr-xr-x | posix/transbug.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/posix/transbug.c b/posix/transbug.c index 8bfbe8f..434674f 100755 --- a/posix/transbug.c +++ b/posix/transbug.c @@ -105,7 +105,7 @@ run_test (const char *pattern, struct re_registers *regs) printf ("search 2: res = %d, start = %d, end = %d\n", res, regs[1].start[0], regs[1].end[0]); - return 0; + return res < 0 ? 1 : 0; } @@ -120,17 +120,19 @@ do_test (void) (void) re_set_syntax (RE_SYNTAX_GNU_AWK); - run_test (lower, regs); - run_test (upper, ®s[2]); - - int result = 0; + int result; #define CHECK(exp) \ if (exp) { puts (#exp); result = 1; } - CHECK (regs[0].start[0] != regs[2].start[0]); - CHECK (regs[0].end[0] != regs[2].end[0]); - CHECK (regs[1].start[0] != regs[3].start[0]); - CHECK (regs[1].end[0] != regs[3].end[0]); + result = run_test (lower, regs); + result |= run_test (upper, ®s[2]); + if (! result) + { + CHECK (regs[0].start[0] != regs[2].start[0]); + CHECK (regs[0].end[0] != regs[2].end[0]); + CHECK (regs[1].start[0] != regs[3].start[0]); + CHECK (regs[1].end[0] != regs[3].end[0]); + } return result; } |