2016-06-08 06:47:23 +02:00
# pragma once
# ifndef MESSMER_FSPP_FSTEST_FSPPSYMLINKTEST_TIMESTAMPS_H_
# define MESSMER_FSPP_FSTEST_FSPPSYMLINKTEST_TIMESTAMPS_H_
# include "testutils/TimestampTestUtils.h"
template < class ConcreteFileSystemTestFixture >
2017-01-21 20:16:35 +01:00
class FsppSymlinkTest_Timestamps : public TimestampTestUtils < ConcreteFileSystemTestFixture > {
2016-06-08 06:47:23 +02:00
public :
} ;
TYPED_TEST_CASE_P ( FsppSymlinkTest_Timestamps ) ;
TYPED_TEST_P ( FsppSymlinkTest_Timestamps , target ) {
auto symlink = this - > CreateSymlink ( " /mysymlink " ) ;
2017-09-11 15:37:06 +02:00
this - > setModificationTimestampLaterThanAccessTimestamp ( " /mysymlink " ) ; // to make sure that even in relatime behavior, the read access below changes the access timestamp
2016-06-08 06:47:23 +02:00
auto operation = [ & symlink ] ( ) {
symlink - > target ( ) ;
} ;
2017-01-21 20:16:35 +01:00
this - > EXPECT_OPERATION_UPDATES_TIMESTAMPS_AS ( " /mysymlink " , operation , { this - > ExpectUpdatesAccessTimestamp , this - > ExpectDoesntUpdateModificationTimestamp , this - > ExpectDoesntUpdateMetadataTimestamp } ) ;
2016-06-08 06:47:23 +02:00
}
REGISTER_TYPED_TEST_CASE_P ( FsppSymlinkTest_Timestamps ,
target
) ;
# endif