ATF-log archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
#37: Add macros to check for errno
#37: Add macros to check for errno
-------------------------+--------------------------------------------------
Reporter: jmmv | Owner: jmmv
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: atf-c | Version:
Keywords: |
-------------------------+--------------------------------------------------
Many tests call standard C functions that return a an error indicator and
update errno with more information about the error.
It'd be nice to have some macros to simplify this process. One issue is,
I think, that we can't assume all functions that update errno return -1 on
failure. So we may need to do something like:
ATF_REQUIRE_ERRNO_EQ(expected errno, boolean expression);
where the boolean expression is just a call to a function compared against
-1. For example:
ATF_REQUIRE_ERRNO_EQ(ENOENT, open("non-existent", O_RDONLY) == -1);
--
Ticket URL: <https://www.julipedia.org/projects/atf/trac/ticket/37>
Automated Testing Framework <http://www.NetBSD.org/~jmmv/atf/>
Automated Testing Framework
Home |
Main Index |
Thread Index |
Old Index