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 chru...@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