mirror of
https://github.com/curl/curl.git
synced 2026-08-24 18:23:33 +03:00
tests: limit return code of unit tests and lib tests
Values greater than 125 have special meanings, so cap it there. Unit tests and lib tests use the number of failures as the return code, so a large number of failures (such as test 2601 as a torture test) can exceed this causing the test to be erroneously reported as having failed. Ref: #10720
This commit is contained in:
parent
9fa018dbf7
commit
2dd471d577
1 changed files with 3 additions and 1 deletions
|
|
@ -188,5 +188,7 @@ int main(int argc, char **argv)
|
|||
_flushall();
|
||||
#endif
|
||||
|
||||
return result;
|
||||
/* Regular program status codes are limited to 0..127 and 126 and 127 have
|
||||
* special meanings by the shell, so limit a normal return code to 125 */
|
||||
return result <= 125 ? result : 125;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue