All of lore.kernel.org
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Alexey Kodanev <alexey.kodanev@oracle.com>
Cc: ltp-list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] posix_fallocate
Date: Mon, 28 Apr 2014 17:28:41 +0200	[thread overview]
Message-ID: <20140428152841.GA6054@rei> (raw)
In-Reply-To: <535E72CC.9070109@oracle.com>

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

      parent reply	other threads:[~2014-04-28 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140428152841.GA6054@rei \
    --to=chrubis@suse.cz \
    --cc=alexey.kodanev@oracle.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.