All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] The Best Practice to Skip Syscall Tests
@ 2009-08-21 11:57 CAI Qian
  2009-08-21 16:00 ` Mike Frysinger
  0 siblings, 1 reply; 10+ messages in thread
From: CAI Qian @ 2009-08-21 11:57 UTC (permalink / raw)
  To: ltp-list

Hi,

Test cases unshare failed to compile on systems without such a
syscall. I am unsure what the best way to handle it. The old ways are,

* add a kernel version check in the unshare tests code.

or

* add a m4 rule.
* modify the unshare tests code to check if the macro, and add stub
  functions if the macro is false.

The first approach is unable to handle non-vanilla kernels. The second
approach needs to add stub functions which are unclean. What I would
like to do is,

* add a m4 rule.
* modify unshare Makefile like this,

  ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.

  CFLAGS += -I../../../../include -Wall
  LDLIBS += -L../../../../lib -lltp

  SRCS    = $(wildcard *.c)
  TARGETS = $(patsubst %.c,%,$(SRCS))

  all: $(TARGETS)

  install:
          @set -e; for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ; done

  else               <-- Otherwise, skip them.
  all:

However, I am not sure how to pass the HAVE_UNSHARE value to the
Makefile yet.

CAI Qian

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-21 11:57 [LTP] The Best Practice to Skip Syscall Tests CAI Qian
@ 2009-08-21 16:00 ` Mike Frysinger
  2009-08-21 21:17   ` Garrett Cooper
  2009-08-23  2:30   ` CAI Qian
  0 siblings, 2 replies; 10+ messages in thread
From: Mike Frysinger @ 2009-08-21 16:00 UTC (permalink / raw)
  To: ltp-list; +Cc: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 1089 bytes --]

On Friday 21 August 2009 07:57:39 CAI Qian wrote:
> Test cases unshare failed to compile on systems without such a
> syscall. I am unsure what the best way to handle it. The old ways are,
>
> * add a kernel version check in the unshare tests code.
>
> or
>
> * add a m4 rule.
> * modify the unshare tests code to check if the macro, and add stub
>   functions if the macro is false.
>
> The first approach is unable to handle non-vanilla kernels. The second
> approach needs to add stub functions which are unclean. What I would
> like to do is,
>
> * add a m4 rule.
> * modify unshare Makefile like this,
>
>   ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.

the configure test should always be there if the code needs new headers (like 
sys/signalfd.h).  if it's only a new syscall, then the configure test should 
only be for the new symbol (assuming one is provided).  in all cases, the 
tests should be compiled.  your proposal doesnt handle the case where the C 
library is in place, but the kernel is older so returns ENOSYS.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-21 16:00 ` Mike Frysinger
@ 2009-08-21 21:17   ` Garrett Cooper
  2009-08-23  2:37     ` CAI Qian
  2009-08-23  2:30   ` CAI Qian
  1 sibling, 1 reply; 10+ messages in thread
From: Garrett Cooper @ 2009-08-21 21:17 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: ltp-list, ltp-list

On Fri, Aug 21, 2009 at 9:00 AM, Mike Frysinger<vapier@gentoo.org> wrote:
> On Friday 21 August 2009 07:57:39 CAI Qian wrote:
>> Test cases unshare failed to compile on systems without such a
>> syscall. I am unsure what the best way to handle it. The old ways are,
>>
>> * add a kernel version check in the unshare tests code.
>>
>> or
>>
>> * add a m4 rule.
>> * modify the unshare tests code to check if the macro, and add stub
>>   functions if the macro is false.
>>
>> The first approach is unable to handle non-vanilla kernels. The second
>> approach needs to add stub functions which are unclean. What I would
>> like to do is,
>>
>> * add a m4 rule.
>> * modify unshare Makefile like this,
>>
>>   ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.
>
> the configure test should always be there if the code needs new headers (like
> sys/signalfd.h).  if it's only a new syscall, then the configure test should
> only be for the new symbol (assuming one is provided).  in all cases, the
> tests should be compiled.  your proposal doesnt handle the case where the C
> library is in place, but the kernel is older so returns ENOSYS.

    check_for_unshare was a poorly hacked app, IMO and Mike is
correct. The issue needs to be a combination of buildtime and runtime
tests as it needs to pass through the build and the issue with the
syscall needs to be detected and marked TBROK if the syscall isn't
implemented.
    I'll already removed that app from the build in
makefile-infra-rework, but I agree that more autoconf testcases can be
added at buildtime.
Thanks,
-Garrett

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-21 16:00 ` Mike Frysinger
  2009-08-21 21:17   ` Garrett Cooper
@ 2009-08-23  2:30   ` CAI Qian
  2009-08-23  3:28     ` Garrett Cooper
  2009-08-23  3:57     ` Mike Frysinger
  1 sibling, 2 replies; 10+ messages in thread
From: CAI Qian @ 2009-08-23  2:30 UTC (permalink / raw)
  To: ltp-list

From: Mike Frysinger <vapier@gentoo.org>
Subject: Re: [LTP] The Best Practice to Skip Syscall Tests
Date: Fri, 21 Aug 2009 12:00:32 -0400

> On Friday 21 August 2009 07:57:39 CAI Qian wrote:
>> Test cases unshare failed to compile on systems without such a
>> syscall. I am unsure what the best way to handle it. The old ways are,
>>
>> * add a kernel version check in the unshare tests code.
>>
>> or
>>
>> * add a m4 rule.
>> * modify the unshare tests code to check if the macro, and add stub
>>   functions if the macro is false.
>>
>> The first approach is unable to handle non-vanilla kernels. The second
>> approach needs to add stub functions which are unclean. What I would
>> like to do is,
>>
>> * add a m4 rule.
>> * modify unshare Makefile like this,
>>
>>   ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.
> 
> the configure test should always be there if the code needs new
> headers (like sys/signalfd.h).  if it's only a new syscall, then the
> configure test should only be for the new symbol (assuming one is
> provided).  in all cases, the tests should be compiled.  your proposal
> doesnt handle the case where the C library is in place, but the kernel
> is older so returns ENOSYS.

OK, how about those two approaches?

* add a stub C program to check if kernel returns ENOSYS. If so, returns
  1. Otherwise, 0.
* add a m4 rule to check the headers or/and functions.
* if ./configure found all headers and functions, and execute the stub
  program to return 0, it will set HAVE_UNSHARE.
* modify unshare Makefile to complie it only if HAVE_UNSHARE set.

or

* add a m4 rule to check the headers or/and functions.
* if ./configure found all headers and functions, , it will set
  HAVE_UNSHARE.
* modify the test code to deal with three situations.
  * HAVE_UNSHARE = 0
  * HAVE_UNSHARE = 1 + ENOSYS
  * HAVE_UNSHARE = 1 + no ENOSYS

CAI Qian

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-21 21:17   ` Garrett Cooper
@ 2009-08-23  2:37     ` CAI Qian
  2009-08-23  3:52       ` Mike Frysinger
  0 siblings, 1 reply; 10+ messages in thread
From: CAI Qian @ 2009-08-23  2:37 UTC (permalink / raw)
  To: ltp-list; +Cc: vapier

From: Garrett Cooper <yanegomi@gmail.com>
Subject: Re: [LTP] The Best Practice to Skip Syscall Tests
Date: Fri, 21 Aug 2009 14:17:06 -0700

> On Fri, Aug 21, 2009 at 9:00 AM, Mike Frysinger<vapier@gentoo.org> wrote:
>> On Friday 21 August 2009 07:57:39 CAI Qian wrote:
>>> Test cases unshare failed to compile on systems without such a
>>> syscall. I am unsure what the best way to handle it. The old ways are,
>>>
>>> * add a kernel version check in the unshare tests code.
>>>
>>> or
>>>
>>> * add a m4 rule.
>>> * modify the unshare tests code to check if the macro, and add stub
>>>   functions if the macro is false.
>>>
>>> The first approach is unable to handle non-vanilla kernels. The second
>>> approach needs to add stub functions which are unclean. What I would
>>> like to do is,
>>>
>>> * add a m4 rule.
>>> * modify unshare Makefile like this,
>>>
>>>   ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.
>>
>> the configure test should always be there if the code needs new headers (like
>> sys/signalfd.h).  if it's only a new syscall, then the configure test should
>> only be for the new symbol (assuming one is provided).  in all cases, the
>> tests should be compiled.  your proposal doesnt handle the case where the C
>> library is in place, but the kernel is older so returns ENOSYS.
> 
>     check_for_unshare was a poorly hacked app, IMO and Mike is
> correct. The issue needs to be a combination of buildtime and runtime
> tests as it needs to pass through the build and the issue with the
> syscall needs to be detected and marked TBROK if the syscall isn't
> implemented.

ENOSYS is the expected result if the kernel under test has no such
implementation, so I would consider TPASS or TCONF.

CAI Qian

>     I'll already removed that app from the build in
> makefile-infra-rework, but I agree that more autoconf testcases can be
> added at buildtime.
> Thanks,
> -Garrett
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-23  2:30   ` CAI Qian
@ 2009-08-23  3:28     ` Garrett Cooper
  2009-08-23  3:57     ` Mike Frysinger
  1 sibling, 0 replies; 10+ messages in thread
From: Garrett Cooper @ 2009-08-23  3:28 UTC (permalink / raw)
  To: CAI Qian; +Cc: ltp-list

On Sat, Aug 22, 2009 at 7:30 PM, CAI Qian<caiqian@cclom.cn> wrote:
> From: Mike Frysinger <vapier@gentoo.org>
> Subject: Re: [LTP] The Best Practice to Skip Syscall Tests
> Date: Fri, 21 Aug 2009 12:00:32 -0400
>
>> On Friday 21 August 2009 07:57:39 CAI Qian wrote:
>>> Test cases unshare failed to compile on systems without such a
>>> syscall. I am unsure what the best way to handle it. The old ways are,
>>>
>>> * add a kernel version check in the unshare tests code.
>>>
>>> or
>>>
>>> * add a m4 rule.
>>> * modify the unshare tests code to check if the macro, and add stub
>>>   functions if the macro is false.
>>>
>>> The first approach is unable to handle non-vanilla kernels. The second
>>> approach needs to add stub functions which are unclean. What I would
>>> like to do is,
>>>
>>> * add a m4 rule.
>>> * modify unshare Makefile like this,
>>>
>>>   ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.
>>
>> the configure test should always be there if the code needs new
>> headers (like sys/signalfd.h).  if it's only a new syscall, then the
>> configure test should only be for the new symbol (assuming one is
>> provided).  in all cases, the tests should be compiled.  your proposal
>> doesnt handle the case where the C library is in place, but the kernel
>> is older so returns ENOSYS.
>
> OK, how about those two approaches?
>
> * add a stub C program to check if kernel returns ENOSYS. If so, returns
>  1. Otherwise, 0.
> * add a m4 rule to check the headers or/and functions.
> * if ./configure found all headers and functions, and execute the stub
>  program to return 0, it will set HAVE_UNSHARE.
> * modify unshare Makefile to complie it only if HAVE_UNSHARE set.
>
> or
>
> * add a m4 rule to check the headers or/and functions.
> * if ./configure found all headers and functions, , it will set
>  HAVE_UNSHARE.
> * modify the test code to deal with three situations.
>  * HAVE_UNSHARE = 0
>  * HAVE_UNSHARE = 1 + ENOSYS
>  * HAVE_UNSHARE = 1 + no ENOSYS

Because it wouldn't work for cross-compilation.
Thanks,
-Garrett

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-23  2:37     ` CAI Qian
@ 2009-08-23  3:52       ` Mike Frysinger
  2009-08-24  8:44         ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2009-08-23  3:52 UTC (permalink / raw)
  To: CAI Qian; +Cc: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 1829 bytes --]

On Saturday 22 August 2009 22:37:28 CAI Qian wrote:
> From: Garrett Cooper <yanegomi@gmail.com>
> > On Fri, Aug 21, 2009 at 9:00 AM, Mike Frysinger wrote:
> >> On Friday 21 August 2009 07:57:39 CAI Qian wrote:
> >>> Test cases unshare failed to compile on systems without such a
> >>> syscall. I am unsure what the best way to handle it. The old ways are,
> >>>
> >>> * add a kernel version check in the unshare tests code.
> >>>
> >>> or
> >>>
> >>> * add a m4 rule.
> >>> * modify the unshare tests code to check if the macro, and add stub
> >>>   functions if the macro is false.
> >>>
> >>> The first approach is unable to handle non-vanilla kernels. The second
> >>> approach needs to add stub functions which are unclean. What I would
> >>> like to do is,
> >>>
> >>> * add a m4 rule.
> >>> * modify unshare Makefile like this,
> >>>
> >>>   ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.
> >>
> >> the configure test should always be there if the code needs new headers
> >> (like sys/signalfd.h).  if it's only a new syscall, then the configure
> >> test should only be for the new symbol (assuming one is provided).  in
> >> all cases, the tests should be compiled.  your proposal doesnt handle
> >> the case where the C library is in place, but the kernel is older so
> >> returns ENOSYS.
> >
> >     check_for_unshare was a poorly hacked app, IMO and Mike is
> > correct. The issue needs to be a combination of buildtime and runtime
> > tests as it needs to pass through the build and the issue with the
> > syscall needs to be detected and marked TBROK if the syscall isn't
> > implemented.
>
> ENOSYS is the expected result if the kernel under test has no such
> implementation, so I would consider TPASS or TCONF.

TPASS is wrong.  in another thread, people seemed to be OK with TCONF.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-23  2:30   ` CAI Qian
  2009-08-23  3:28     ` Garrett Cooper
@ 2009-08-23  3:57     ` Mike Frysinger
  1 sibling, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2009-08-23  3:57 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 2586 bytes --]

On Saturday 22 August 2009 22:30:37 CAI Qian wrote:
> From: Mike Frysinger <vapier@gentoo.org>
> > On Friday 21 August 2009 07:57:39 CAI Qian wrote:
> >> Test cases unshare failed to compile on systems without such a
> >> syscall. I am unsure what the best way to handle it. The old ways are,
> >>
> >> * add a kernel version check in the unshare tests code.
> >>
> >> or
> >>
> >> * add a m4 rule.
> >> * modify the unshare tests code to check if the macro, and add stub
> >>   functions if the macro is false.
> >>
> >> The first approach is unable to handle non-vanilla kernels. The second
> >> approach needs to add stub functions which are unclean. What I would
> >> like to do is,
> >>
> >> * add a m4 rule.
> >> * modify unshare Makefile like this,
> >>
> >>   ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.
> >
> > the configure test should always be there if the code needs new
> > headers (like sys/signalfd.h).  if it's only a new syscall, then the
> > configure test should only be for the new symbol (assuming one is
> > provided).  in all cases, the tests should be compiled.  your proposal
> > doesnt handle the case where the C library is in place, but the kernel
> > is older so returns ENOSYS.
>
> OK, how about those two approaches?
>
> * add a stub C program to check if kernel returns ENOSYS. If so, returns
>   1. Otherwise, 0.
> * add a m4 rule to check the headers or/and functions.
> * if ./configure found all headers and functions, and execute the stub
>   program to return 0, it will set HAVE_UNSHARE.
> * modify unshare Makefile to complie it only if HAVE_UNSHARE set.
>
> or
>
> * add a m4 rule to check the headers or/and functions.
> * if ./configure found all headers and functions, , it will set
>   HAVE_UNSHARE.
> * modify the test code to deal with three situations.
>   * HAVE_UNSHARE = 0
>   * HAVE_UNSHARE = 1 + ENOSYS
>   * HAVE_UNSHARE = 1 + no ENOSYS

in addition to the reasoning Garrett provided, this makes for a fairly 
complicated setup for no real gain.  the solution i mentioned (and is being 
used) covers all known build/runtime issues.

if you need a new C library function, check for it.  if you need a new C 
library header, check for it.  if a test may be run on an older system and 
thus the call fails with ENOSYS, the test must check for it and error out with 
TCONF (and a helper message).  whether someone chooses to also add a runtime 
kernel version check (as can be seen in a few tests) is up to whoever feels 
like doing the work.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-23  3:52       ` Mike Frysinger
@ 2009-08-24  8:44         ` Geert Uytterhoeven
  2009-08-24  8:51           ` Mike Frysinger
  0 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2009-08-24  8:44 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: ltp-list

On Sat, 22 Aug 2009, Mike Frysinger wrote:
> On Saturday 22 August 2009 22:37:28 CAI Qian wrote:
> > From: Garrett Cooper <yanegomi@gmail.com>
> > > On Fri, Aug 21, 2009 at 9:00 AM, Mike Frysinger wrote:
> > >> On Friday 21 August 2009 07:57:39 CAI Qian wrote:
> > >>> Test cases unshare failed to compile on systems without such a
> > >>> syscall. I am unsure what the best way to handle it. The old ways are,
> > >>>
> > >>> * add a kernel version check in the unshare tests code.
> > >>>
> > >>> or
> > >>>
> > >>> * add a m4 rule.
> > >>> * modify the unshare tests code to check if the macro, and add stub
> > >>>   functions if the macro is false.
> > >>>
> > >>> The first approach is unable to handle non-vanilla kernels. The second
> > >>> approach needs to add stub functions which are unclean. What I would
> > >>> like to do is,
> > >>>
> > >>> * add a m4 rule.
> > >>> * modify unshare Makefile like this,
> > >>>
> > >>>   ifdef HAVE_UNSHARE  <-- if the syscall is present, compile the tests.
> > >>
> > >> the configure test should always be there if the code needs new headers
> > >> (like sys/signalfd.h).  if it's only a new syscall, then the configure
> > >> test should only be for the new symbol (assuming one is provided).  in
> > >> all cases, the tests should be compiled.  your proposal doesnt handle
> > >> the case where the C library is in place, but the kernel is older so
> > >> returns ENOSYS.
> > >
> > >     check_for_unshare was a poorly hacked app, IMO and Mike is
> > > correct. The issue needs to be a combination of buildtime and runtime
> > > tests as it needs to pass through the build and the issue with the
> > > syscall needs to be detected and marked TBROK if the syscall isn't
> > > implemented.
> >
> > ENOSYS is the expected result if the kernel under test has no such
> > implementation, so I would consider TPASS or TCONF.
> 
> TPASS is wrong.  in another thread, people seemed to be OK with TCONF.
> -mike

Still, the summary only shows `FAIL' or `PASS'. What is it supposed to
show for TCONF?

With kind regards,

Geert Uytterhoeven
Software Architect
Techsoft Centre

Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] The Best Practice to Skip Syscall Tests
  2009-08-24  8:44         ` Geert Uytterhoeven
@ 2009-08-24  8:51           ` Mike Frysinger
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2009-08-24  8:51 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 1037 bytes --]

On Monday 24 August 2009 04:44:05 Geert Uytterhoeven wrote:
> On Sat, 22 Aug 2009, Mike Frysinger wrote:
> > On Saturday 22 August 2009 22:37:28 CAI Qian wrote:
> > > ENOSYS is the expected result if the kernel under test has no such
> > > implementation, so I would consider TPASS or TCONF.
> >
> > TPASS is wrong.  in another thread, people seemed to be OK with TCONF.
>
> Still, the summary only shows `FAIL' or `PASS'. What is it supposed to
> show for TCONF?

i think acct01 handles this OK:
        if (errno == ENOSYS) {
            tst_resm(TCONF,
                 "BSD process accounting is not configured in this kernel.");
            tst_resm(TCONF, "Test will not run.");
            tst_exit();

although we could perhaps codify this nicely by adding a new 
tst_missing_support() or similar function that would do this kind of thing.  
first argument would be an explanatory message like "BSD process accounting is 
not configured in this kernel".  any suggestions for a better function name ?
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-08-24  9:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-21 11:57 [LTP] The Best Practice to Skip Syscall Tests CAI Qian
2009-08-21 16:00 ` Mike Frysinger
2009-08-21 21:17   ` Garrett Cooper
2009-08-23  2:37     ` CAI Qian
2009-08-23  3:52       ` Mike Frysinger
2009-08-24  8:44         ` Geert Uytterhoeven
2009-08-24  8:51           ` Mike Frysinger
2009-08-23  2:30   ` CAI Qian
2009-08-23  3:28     ` Garrett Cooper
2009-08-23  3:57     ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.