]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
unit tests for FileStore::_detect_fs when running on ext4 165/head
authorLoic Dachary <loic@dachary.org>
Mon, 4 Mar 2013 13:42:08 +0000 (14:42 +0100)
committerLoic Dachary <loic@dachary.org>
Tue, 2 Apr 2013 11:10:37 +0000 (13:10 +0200)
commit574051f8da0a30073a7d5da880878ee3c941721b
tree35d8705b76635dc413d8552821c334c7ef3ea057
parentdd19d693e6528c70167958ebc57e075200a08803
unit tests for FileStore::_detect_fs when running on ext4

unit tests are added in test/filestore/store_test.cc for the
FileStore::_detect_fs method, when using ext4. It tests the following
situations:

 * without user_xattr, ext4 fails
 * mounted with user_xattr, ext4 fails if filestore_xattr_use_omap is false
 * mounted with user_xattr, ext4 succeeds if filestore_xattr_use_omap is true

The tests are grouped in an ext4 dedicated class

  TEST(EXT4StoreTest, _detect_fs)

The qa/workunits/filestore/filestore.sh script is added to prepare the
environment required for the unit tests ( create an image file,
formats it with ext4 etc.). It runs ceph_test_filestore with a sudo
to allow it to mount(2) and umount(2) the ext4 file system. It is
called with

  ceph_test_filestore --gtest_filter=EXT4StoreTest.*

to only run the ext4 dependent tests.

The filestore.sh script is meant to be used as part of teuthology
in order to increase the code coverage for src/os/FileStore.cc. It is
self tested and can be checked from the source directory with

  CEPH_TEST_FILESTORE=../../../src/ceph_test_filestore filestore.sh TEST

http://tracker.ceph.com/issues/4321 refs #4321

Signed-off-by: Loic Dachary <loic@dachary.org>
qa/workunits/filestore/filestore.sh [new file with mode: 0755]
src/test/filestore/store_test.cc