Add checks for constants in limits.h with fixed values

This is a potential implementation of https://gitlab.com/sortix/os-test/-/issues

I hope this goes in the right direction. I have a couple of comments:

  1. For the time being this tests only the constants that have a fixed value. Other constraints on other constants are not yet implemented here.
  2. The tests do the comparison with the expected value directly and if this is fine they return 0 as an exit code. Otherwise they use errx() to print a message.
  3. If the constant is not defined they use errx to exit. This is kind of redundant with the tests under include. I am not sure what is the best approach here.
  4. The suite.h includes limits.h, which is the main header being tested here. I don't know if it is preferable to include limits.h explicitly in all tests under limits.
  5. If for a POSIX option, like _POSIX_MESSAGE_PASSING, the implementation does not support it, either because the corresponding define is not defined or it is equal to -1, then the test is successful. In those cases I created a second .posix.2 file with the corresponding output. The final html simply shows a successful test, but probably it would be better to show it in a different color (but still green-ish) to highlight that this is an optional interface and the implementation does not support it. This is something that might apply to other tests, not only the ones under limits.

Comments are welcome!

Edited by Cesar Enrique Garcia

Merge request reports

Loading