2014-11-28 14:13:51 +01:00
|
|
|
#include "testutils/FuseAccessTest.h"
|
|
|
|
|
2019-10-13 17:49:57 +02:00
|
|
|
using ::testing::Eq;
|
2014-11-28 14:13:51 +01:00
|
|
|
using ::testing::Return;
|
|
|
|
using ::testing::WithParamInterface;
|
|
|
|
using ::testing::Values;
|
|
|
|
|
|
|
|
class FuseAccessModeTest: public FuseAccessTest, public WithParamInterface<int> {
|
|
|
|
};
|
2019-10-13 14:16:06 +02:00
|
|
|
INSTANTIATE_TEST_SUITE_P(FuseAccessModeTest, FuseAccessModeTest, Values(0, F_OK, R_OK, W_OK, X_OK, R_OK|W_OK, W_OK|X_OK, R_OK|X_OK, R_OK|W_OK|X_OK));
|
2014-11-28 14:13:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
TEST_P(FuseAccessModeTest, AccessFile) {
|
|
|
|
ReturnIsFileOnLstat(FILENAME);
|
2019-10-13 17:49:57 +02:00
|
|
|
EXPECT_CALL(*fsimpl, access(Eq(FILENAME), GetParam()))
|
2014-11-28 14:13:51 +01:00
|
|
|
.Times(1).WillOnce(Return());
|
|
|
|
|
|
|
|
AccessFile(FILENAME, GetParam());
|
|
|
|
}
|