[LTP] [PATCH v2 3/3] tst_fill_fs: Add alternate access pattern "flat"

Petr Vorel pvorel@suse.cz
Mon Dec 12 17:09:18 CET 2022


Hi Richie,

> Depending on the workload, the way in which a file system is filled
> will be different. The system calls will also be different.

> This adds a fill mode which uses writev with uniform batches of
> data. This simulates when the FS is filled by a program which batches
> writes.
...

FYI this broke CI on Alpine.

> +++ b/lib/tst_fill_fs.c
...
> +void fill_flat_vec(const char *path, int verbose)
> +{
> +	int dir = SAFE_OPEN(path, O_PATH | O_DIRECTORY | O_FSYNC);

Alpine has problem with O_FSYNC:

In file included from ../include/tst_test.h:110,
                 from tst_fill_fs.c:13:
tst_fill_fs.c: In function 'fill_flat_vec':
tst_fill_fs.c:76:58: error: 'O_FSYNC' undeclared (first use in this function); did you mean 'O_ASYNC'?
   76 |         int dir = SAFE_OPEN(path, O_PATH | O_DIRECTORY | O_FSYNC);
      |                                                          ^~~~~~~
../include/tst_safe_macros.h:90:58: note: in definition of macro 'SAFE_OPEN'
   90 |         safe_open(__FILE__, __LINE__, NULL, (pathname), (oflags), \
      |                                                          ^~~~~~
tst_fill_fs.c:76:58: note: each undeclared identifier is reported only once for each function it appears in
   76 |         int dir = SAFE_OPEN(path, O_PATH | O_DIRECTORY | O_FSYNC);
      |                                                          ^~~~~~~
../include/tst_safe_macros.h:90:58: note: in definition of macro 'SAFE_OPEN'
   90 |         safe_open(__FILE__, __LINE__, NULL, (pathname), (oflags), \
      |                                                          ^~~~~~
make: *** [../include/mk/rules.mk:15: tst_fill_fs.o] Error 1

It actually does not have it in fcntl.h (and nowhere in the sources).

Kind regards,
Petr


More information about the ltp mailing list