Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/external/bsd/atf/dist/atf-sh
On Jan 11, 9:05am, julio%meroh.net@localhost (Julio Merino) wrote:
-- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-sh
| The reason it works like it does is because atf-run takes care of most
| cleanup by itself and runs every test case on its own subprocess.
|
| The cleanup routine supports exists only to let the test deconfigure
| global resources that it may have affected, like, for example, kernel
| modules, file systems, routing table, etc. The tests that require
| this should be a minority, because tests affecting global system state
| should be minimized (and, thanks to rump, that can be generally
| avoided these days).
|
| Keep in mind that the feature set of the 3 atf libraries must be
| identical from the point of view of atf-run. trap might have worked
| on atf-sh, but there is no way you can get proper cleanup like this on
| C. If the program crashes, the cleanup won't run -- and that's why
| cleanup is intended to run separately so that it can be executed no
| matter what happens to the process that ran the test body.
But the languages are not the same. You could have a "cleanup on crash"
in C where you don't need that for sh. The parent certainly knows if
the child crashed.
| Changing the way this works in the atf libraries is not an option.
| But with the switch to Kyua it wouldn't matter, because Kyua supports
| test programs built with different "frameworks" (including "no
| framework"). We'd investigate using other unit-testing libraries at
| that point that have more traditional fixture definitions, and even
| use different approaches for sh and C, all within the same NetBSD test
| suite. I'll be posting an update to the plan in this area soon.
Sounds good. I would like for the most part of have self-standing tests
that don't require infrastructure wrapping to run (it is fine to utilize
libraries to ease up writing them though).
christos
Home |
Main Index |
Thread Index |
Old Index