2014-11-28 15:54:18 +01:00
|
|
|
#include "testutils/FuseMkdirTest.h"
|
|
|
|
|
2019-10-13 17:49:57 +02:00
|
|
|
using ::testing::Eq;
|
2014-11-28 15:54:18 +01:00
|
|
|
using ::testing::WithParamInterface;
|
|
|
|
using ::testing::Values;
|
|
|
|
|
|
|
|
class FuseMkdirModeTest: public FuseMkdirTest, public WithParamInterface<mode_t> {
|
|
|
|
};
|
2019-10-13 14:16:06 +02:00
|
|
|
INSTANTIATE_TEST_SUITE_P(FuseMkdirModeTest, FuseMkdirModeTest, Values(0, S_IRUSR, S_IRGRP, S_IXOTH, S_IRUSR|S_IRGRP|S_IROTH|S_IRGRP));
|
2014-11-28 15:54:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
TEST_P(FuseMkdirModeTest, Mkdir) {
|
|
|
|
ReturnDoesntExistOnLstat(DIRNAME);
|
2021-04-21 08:09:00 +02:00
|
|
|
EXPECT_CALL(*fsimpl, mkdir(Eq(DIRNAME), GetParam(), testing::_, testing::_))
|
2014-11-28 15:54:18 +01:00
|
|
|
.Times(1).WillOnce(FromNowOnReturnIsDirOnLstat());
|
|
|
|
|
|
|
|
Mkdir(DIRNAME, GetParam());
|
|
|
|
}
|