The tests in xattr.c assume an FS with xattr support
GBuella opened this issue · comments
The tests in tests/preload/xattr/xattr.c
expect setxattr
to work on paths not mounted under pmemfile.
This caused a problem when I had TEST_DIR=/dev/shm
:
$ cf -R preload_xa
Test project /home/tej/code/pmemfile/build
Start 68: preload_xattr
1/1 Test #68: preload_xattr ....................***Failed 0.09 sec
preload_xattr: setxattr failed: Operation not supported
CMake Error at /home/tej/code/pmemfile/tests/helpers.cmake:105 (message):
/home/tej/code/pmemfile/build/tests/preload/preload_xattr /dev/shm//xattr
failed: 3
Call Stack (most recent call first):
/home/tej/code/pmemfile/tests/preload/xattr/xattr.cmake:45 (execute)
This test failure looks exactly as if libpmemfile would return ENOTSUP, but in this case the kernel returned this error code.
Let's detect whether underlying fs supports xattrs at cmake time and add option to disable them.