# Re: \[PATCH 1/7\] selftests: add header file for test exit code defines

- From: Shuah Khan \<hidden\>
- Date: 2014-09-16 17:47:46 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2014/09/4335104
- Thread: https://ratatoskr.run/linux-api/2014/09/4334476/t.md

```text
On 09/16/2014 11:40 AM, Andy Lutomirski wrote:
> On Tue, Sep 16, 2014 at 10:31 AM, Shuah Khan [ref] wrote:

> 
> I think we will want a framework in the tree, but it can be very
> minimal.  But I also think that using exit(2) for this is wrong.  Why
> not:
> 
> enum ktest_result {
>   KTEST_PASS,
>   ...,
> };
> 
> void ktest_exit(enum ktest_result result);
> 
> With the possibility of further extensions for more than one test (and
> associated result) per execution of the test binary.
> 

Nothing wrong with the approach. It is one of the options I considered
and decided against it primarily because tests need more changes than
the ones needed for return codes. However, maybe it is worth while to
do so. I will play with this and see how extensive the changes are.

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978
```
