From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shuah Khan Subject: Re: [PATCH 1/7] selftests: add header file for test exit code defines Date: Tue, 16 Sep 2014 11:47:42 -0600 Message-ID: <541877BE.5080903@osg.samsung.com> References: <1410820442-8774-1-git-send-email-shuahkh@osg.samsung.com> <1410820442-8774-2-git-send-email-shuahkh@osg.samsung.com> <1410883441.4630.9.camel@linux-t7sj.site> <54187400.10506@osg.samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Lutomirski Cc: Davidlohr Bueso , Andrew Morton , Greg KH , colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org, "Eric W. Biederman" , Serge Hallyn , thierry-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, felipensp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Linux API , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Shuah Khan List-Id: linux-api@vger.kernel.org On 09/16/2014 11:40 AM, Andy Lutomirski wrote: > On Tue, Sep 16, 2014 at 10:31 AM, Shuah Khan 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