public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* Re: [LTP] posix_fallocate
       [not found] <5357D79C.40706@oracle.com>
@ 2014-04-23 15:14 ` chrubis
       [not found]   ` <535E3447.6020003@oracle.com>
  0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2014-04-23 15:14 UTC (permalink / raw)
  To: Alexey Kodanev; +Cc: ltp-list

Hi!
> I would like to add "posix_fallocate" test based on what we already have 
> in syscalls/fallocate, because the behavior of "posix_fallocate" is 
> close to what is doing fallocate by default, so most test scenarios will 
> be the same. What is the correct way to do it, place it in 
> open_posix_testsuite as new ones or add it to fallocate tests?

That is hard to tell.

If you care for posix_fallocate strictly POSIX conformace add it to
open_posix_testsuite and write the tests accordingly to the POSIX
specification.

If you care about API coverage add it to the syscalls testcases and
share as much code with the fallocate testcases as possible.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] posix_fallocate
       [not found]   ` <535E3447.6020003@oracle.com>
@ 2014-04-28 13:32     ` chrubis
       [not found]       ` <535E72CC.9070109@oracle.com>
  0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2014-04-28 13:32 UTC (permalink / raw)
  To: Alexey Kodanev; +Cc: ltp-list

Hi!
> > That is hard to tell.
> >
> > If you care for posix_fallocate strictly POSIX conformace add it to
> > open_posix_testsuite and write the tests accordingly to the POSIX
> > specification.
> >
> > If you care about API coverage add it to the syscalls testcases and
> > share as much code with the fallocate testcases as possible.
> 
> OK, I will add it to syscalls. What I would want is to make a wrapper, 
> then substitute all calls of fallocate with it. And decision which 
> function to call decided inside wrapper using command line option. So 
> they would be called this way:
> 
> ...
> fallocate01 fallocate01
> fallocate02 fallocate02
> fallocate03 fallocate03
> 
> posix_fallocate01 fallocate01 -x
> posix_fallocate02 fallocate02 -x
> posix_fallocate03 fallocate03 -x
> ...

Or you can recompile the the binaries with -DUSE_POSIX_FALLOCATE and use
#ifdefs to choose which do you call.

Looking at the testcases you will probable need to ifdef a few test
assertions (these where mode is not 0) too.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] posix_fallocate
       [not found]       ` <535E72CC.9070109@oracle.com>
@ 2014-04-28 15:28         ` chrubis
  0 siblings, 0 replies; 3+ messages in thread
From: chrubis @ 2014-04-28 15:28 UTC (permalink / raw)
  To: Alexey Kodanev; +Cc: ltp-list

Hi!
> >> OK, I will add it to syscalls. What I would want is to make a wrapper,
> >> then substitute all calls of fallocate with it. And decision which
> >> function to call decided inside wrapper using command line option. So
> >> they would be called this way:
> >>
> >> ...
> >> fallocate01 fallocate01
> >> fallocate02 fallocate02
> >> fallocate03 fallocate03
> >>
> >> posix_fallocate01 fallocate01 -x
> >> posix_fallocate02 fallocate02 -x
> >> posix_fallocate03 fallocate03 -x
> >> ...
> > Or you can recompile the the binaries with -DUSE_POSIX_FALLOCATE and use
> > #ifdefs to choose which do you call.
> >
> > Looking at the testcases you will probable need to ifdef a few test
> > assertions (these where mode is not 0) too.
> 
> Just in one place in fallocate01, where it tests "FALLOC_FL_KEEP_SIZE" 
> mode. Still it would probably be better to have a  wrapper at least for 
> posix_fallocate, e.g. to preserve the way the code checks for errors, 
> because it returns error number and doesn't set "errno".

Ah, missed that in the manual page.

Creating wrapper that sets errno and returns -1 in case of
posix_fallocate() sounds reasonably.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2014-04-28 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5357D79C.40706@oracle.com>
2014-04-23 15:14 ` [LTP] posix_fallocate chrubis
     [not found]   ` <535E3447.6020003@oracle.com>
2014-04-28 13:32     ` chrubis
     [not found]       ` <535E72CC.9070109@oracle.com>
2014-04-28 15:28         ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox