* leading . => \.
* / => \s
* \ => \\
* leading DIR_ => \d
The file names for small object names ( size < FILENAME_PREFIX_LEN )
are created with CEPH_NOSNAP and checked to contain the _head string
and not the _long string.
The file names for long object names ( size >= FILENAME_PREFIX_LEN )
are tested to contain the _long string. A matching file is created to
check that it is removed unless it contains the expected extended
attribute.
If the SHA1 of two long object names collide and they have the same
prefix, lfn_get_name increments an anticollision counter to
differentiate them. This condition is engineered because it would be
really difficult to find two long names that actually create such a
collision.
The lfn_get_name method is private and the get_mangled_name method is
used to access it. The out_path argument is not available and cannot
be tested. However it is a trivial concatenation of the stringsin the
path vector.
A TestIndex class is derived from the LFNIndex class to set the pure
virtual functions. The TestLFNIndex fixture is derived from it so that
the tests get access to the protected methods of LFNIndex
The SetUp method of the fixture creates a PATH directory to be used by
all tests as the base path for all object files.