提交 e01048e6 编写于 作者: M mucor

fix dac testcase

Change-Id: Ic0dec79b7d7ec9ad53679c048b9d20722feefa0a
上级 a9ec2eeb
......@@ -44,6 +44,7 @@ static int TestDacOverrideSuccess()
LOG("ErrInfo: Failed to chdir 'TOP_DIR/CAPDIR0/CAPDIR0_CAPDIR1' with CAP_DAC_OVERRIDE");
return FALSE;
}
chdir(TOP_DIR "/" CAPDIR0);
// Delete the directory 'mkdir' in the directory 'TOP_DIR/CAPDIR0'
ret = rmdir(TOP_DIR "/" CAPDIR0 "/" CAPDIR0_CAPDIR1);
if (ret != 0) {
......
......@@ -25,7 +25,7 @@
using namespace std;
using namespace testing::ext;
#if defined(LITE_FS_JFFS2) || defined(LITE_FS_VFAT)
#if defined(LITE_FS_JFFS2)
static void CreateDevDir()
{
int ret;
......@@ -616,7 +616,7 @@ HWTEST_F(DacTestSuite, DACTest0420, Function | MediumTest | Level2)
SetUidGid(UID0, GID555);
// Step 3: Invoke the interface to operate the file system
ret = chdir("/storage/" DACDIR0 "/" DACDIR0_DACDIR0);
if (ret != FALSE) {
if (ret != 0) {
LOG("ErrInfo: VFS error with DAC or Capability");
exitCode = 1;
}
......@@ -1381,7 +1381,7 @@ HWTEST_F(DacTestSuite, DACTest0600, Function | MediumTest | Level2)
SetUidGid(UID555, GID555);
// Step 3: Invoke the interface to operate the file system
ret = mkdir("/storage/" DACDIR0 "/" DACDIR0_DACDIR0 "/" DACDIR0_DACDIR0_DACDIR0, NORWX);
if (ret != FALSE) {
if (ret != 0) {
LOG("ErrInfo: VFS error with DAC or Capability");
exitCode = 1;
}
......@@ -2051,4 +2051,4 @@ HWTEST_F(DacTestSuite, DACTest0750, Function | MediumTest | Level2)
EXPECT_EQ(WEXITSTATUS(status), 0) << "ErrInfo: The exitCode is wrong, please query logs, child_pid = " << pid;
}
}
#endif
\ No newline at end of file
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册