Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d976b9cd
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d976b9cd
编写于
1月 07, 2022
作者:
S
Storage sandboxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改缺陷
Signed-off-by:
N
Storage sandboxing
<
raoxian@huawei.com
>
上级
28ec77cf
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
49 addition
and
7 deletion
+49
-7
storage/storagefileiojstest/src/main/js/default/test/FileIO.test.js
...oragefileiojstest/src/main/js/default/test/FileIO.test.js
+7
-1
storage/storagefileiojstest/src/main/js/default/test/module_fileio/class_stream/all.test.js
...in/js/default/test/module_fileio/class_stream/all.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/class_stream/close.test.js
.../js/default/test/module_fileio/class_stream/close.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/access.test.js
...main/js/default/test/module_fileio/members/access.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/close.test.js
.../main/js/default/test/module_fileio/members/close.test.js
+2
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/copyFile.test.js
...in/js/default/test/module_fileio/members/copyFile.test.js
+2
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fchmod.test.js
...main/js/default/test/module_fileio/members/fchmod.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fdatasync.test.js
...n/js/default/test/module_fileio/members/fdatasync.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fdopenStream.test.js
...s/default/test/module_fileio/members/fdopenStream.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fstat.test.js
.../main/js/default/test/module_fileio/members/fstat.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fsync.test.js
.../main/js/default/test/module_fileio/members/fsync.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/lstat.test.js
.../main/js/default/test/module_fileio/members/lstat.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/mkdir_rmdir.test.js
...js/default/test/module_fileio/members/mkdir_rmdir.test.js
+2
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/mkdtemp.test.js
...ain/js/default/test/module_fileio/members/mkdtemp.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/open.test.js
...c/main/js/default/test/module_fileio/members/open.test.js
+3
-1
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/open_close.test.js
.../js/default/test/module_fileio/members/open_close.test.js
+4
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/opendir_close.test.js
.../default/test/module_fileio/members/opendir_close.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/read.test.js
...c/main/js/default/test/module_fileio/members/read.test.js
+4
-3
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/readtext.test.js
...in/js/default/test/module_fileio/members/readtext.test.js
+2
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/stat.test.js
...c/main/js/default/test/module_fileio/members/stat.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/symlink.test.js
...ain/js/default/test/module_fileio/members/symlink.test.js
+1
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/truncate.test.js
...in/js/default/test/module_fileio/members/truncate.test.js
+6
-2
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/unlink.test.js
...main/js/default/test/module_fileio/members/unlink.test.js
+2
-0
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/write.test.js
.../main/js/default/test/module_fileio/members/write.test.js
+2
-0
未找到文件。
storage/storagefileiojstest/src/main/js/default/test/FileIO.test.js
浏览文件 @
d976b9cd
...
...
@@ -1064,6 +1064,7 @@ describe('fileIOTest', function () {
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_open_sync_007 has failed for
'
+
e
);
}
});
...
...
@@ -1104,6 +1105,7 @@ describe('fileIOTest', function () {
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_open_sync_009 has failed for
'
+
e
);
}
});
...
...
@@ -1119,6 +1121,7 @@ describe('fileIOTest', function () {
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_open_sync_010 has failed for
'
+
e
);
}
});
...
...
@@ -2311,6 +2314,7 @@ describe('fileIOTest', function () {
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_copy_file_sync_008 has failed for
'
+
e
);
}
});
...
...
@@ -2329,7 +2333,7 @@ describe('fileIOTest', function () {
}
catch
(
e
)
{
fileio
.
unlinkSync
(
fpath
);
console
.
log
(
'
fileio_test_
open_sync_008
has failed for
'
+
e
);
console
.
log
(
'
fileio_test_
copy_file_sync_009
has failed for
'
+
e
);
}
});
...
...
@@ -3492,6 +3496,7 @@ describe('fileIOTest', function () {
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_fstat_sync_001 has failed for
'
+
e
);
}
});
...
...
@@ -3506,6 +3511,7 @@ describe('fileIOTest', function () {
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_fstat_sync_002 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/class_stream/all.test.js
浏览文件 @
d976b9cd
...
...
@@ -60,6 +60,7 @@ describe('fileio_stream', function () {
fileio
.
createStreamSync
(
fpath
,
'
r+
'
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_stream_create_stream_sync_001 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/class_stream/close.test.js
浏览文件 @
d976b9cd
...
...
@@ -60,6 +60,7 @@ describe('fileio_stream', function () {
let
ss
=
fileio
.
fdopenStreamSync
(
-
1
,
'
r+
'
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_stream_fdopen_stream_sync_001 has failed for
'
+
e
);
}
})
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/access.test.js
浏览文件 @
d976b9cd
...
...
@@ -129,6 +129,7 @@ describe('fileio_access', function () {
fileio
.
accessSync
(
fpath
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_access_sync_004
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/close.test.js
浏览文件 @
d976b9cd
...
...
@@ -34,6 +34,7 @@ describe('fileio_close', function () {
fileio
.
closeSync
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_close_sync_000 has failed for
'
+
e
);
}
})
...
...
@@ -51,6 +52,7 @@ describe('fileio_close', function () {
fileio
.
closeSync
(
-
1
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_close_sync_001 has failed for
'
+
e
);
}
})
})
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/copyFile.test.js
浏览文件 @
d976b9cd
...
...
@@ -61,6 +61,7 @@ describe('fileio_copyfile', function () {
fileio
.
copyFileSync
(
fpath
,
fpathTarget
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_copy_file_sync_001 has failed for
'
+
e
);
}
});
...
...
@@ -78,6 +79,7 @@ describe('fileio_copyfile', function () {
fileio
.
copyFileSync
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_copy_file_sync_002 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fchmod.test.js
浏览文件 @
d976b9cd
...
...
@@ -127,6 +127,7 @@ describe('fileio_fchmod', function () {
expect
(
fileio
.
fchmodSync
(
-
1
,
0o660
)
==
null
).
assertTrue
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_fchmod_sync_001 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fdatasync.test.js
浏览文件 @
d976b9cd
...
...
@@ -117,6 +117,7 @@ describe('fileio_fdatasync', async function () {
await
fileio
.
fdatasync
(
fd
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_fdatasync_async_003 has failed for
'
+
e
);
}
});
});
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fdopenStream.test.js
浏览文件 @
d976b9cd
...
...
@@ -64,6 +64,7 @@ describe('fileio_FdOpenStream', async function () {
let
fp
=
fileio
.
fdopenStreamSync
(
fd
,
mode
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_fdopenstream_sync_001 has failed for
'
+
e
);
}
})
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fstat.test.js
浏览文件 @
d976b9cd
...
...
@@ -61,6 +61,7 @@ describe('fileio_stat_fstat', function () {
fileio
.
fstatSync
(
invalidFD
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_stat_fstat_sync_001 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/fsync.test.js
浏览文件 @
d976b9cd
...
...
@@ -58,6 +58,7 @@ describe('fileio_stat_fsync', function () {
fileio
.
fsyncSync
(
-
1
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_fsync_sync_001 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/lstat.test.js
浏览文件 @
d976b9cd
...
...
@@ -61,6 +61,7 @@ describe('fileio_lstat', function () {
fileio
.
lstatSync
(
fpath
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_lstat_sync_001 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/mkdir_rmdir.test.js
浏览文件 @
d976b9cd
...
...
@@ -52,6 +52,7 @@ describe('fileio_mkdir_rmdir', function () {
expect
(
fileio
.
mkdirSync
(
'
/
'
)
==
null
).
assertTrue
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_mkdir_sync_rmdir_sync_001 has failed for
'
+
e
);
}
});
...
...
@@ -69,6 +70,7 @@ describe('fileio_mkdir_rmdir', function () {
expect
(
fileio
.
mkdirSync
(
12
)
==
null
).
assertTrue
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_mkdir_sync_rmdir_sync_002 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/mkdtemp.test.js
浏览文件 @
d976b9cd
...
...
@@ -34,6 +34,7 @@ describe('fileio_mkdtemp', function () {
let
res
=
fileio
.
mkdtempSync
(
dpath
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_mkdtemp_sync_000 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/open.test.js
浏览文件 @
d976b9cd
...
...
@@ -33,7 +33,9 @@ describe('fileio_open', function () {
try
{
fileio
.
openSync
(
'
/
'
,
0o102
,
0o666
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{}
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_open_sync_000 has failed for
'
+
e
);
}
});
/**
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/open_close.test.js
浏览文件 @
d976b9cd
...
...
@@ -81,6 +81,7 @@ describe('fileio_open_close', function () {
fileio
.
openSync
(
'
/
'
,
0o102
,
0o666
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_open_sync_000 has failed for
'
+
e
);
}
});
...
...
@@ -100,6 +101,7 @@ describe('fileio_open_close', function () {
fileio
.
openSync
(
fpath
,
0o102
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_open_sync_001 has failed for
'
+
e
);
}
});
...
...
@@ -117,6 +119,7 @@ describe('fileio_open_close', function () {
fileio
.
closeSync
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_close_sync_000 has failed for
'
+
e
);
}
});
...
...
@@ -134,6 +137,7 @@ describe('fileio_open_close', function () {
fileio
.
closeSync
(
-
1
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_close_sync_001 has failed for
'
+
e
);
}
});
});
\ No newline at end of file
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/opendir_close.test.js
浏览文件 @
d976b9cd
...
...
@@ -57,6 +57,7 @@ describe('fileio_dir_opendir_close', function () {
fileio
.
opendirSync
(
dpath
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_dir_open_close_sync_001 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/read.test.js
浏览文件 @
d976b9cd
...
...
@@ -205,6 +205,7 @@ describe('fileio_read', function () {
fileio
.
readSync
(
-
1
,
new
ArrayBuffer
(
4096
));
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_read_sync_006 has failed for
'
+
e
);
}
});
...
...
@@ -458,10 +459,10 @@ describe('fileio_read', function () {
});
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
expect
(
fileio
.
closeSync
(
fd
)
==
null
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
();
done
();
}
expect
(
fileio
.
closeSync
(
fd
)
==
null
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
();
done
();
});
/**
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/readtext.test.js
浏览文件 @
d976b9cd
...
...
@@ -107,6 +107,7 @@ describe('fileio_readtext', function () {
fileio
.
readTextSync
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_readtext_sync_003 has failed for
'
+
e
);
}
});
...
...
@@ -126,6 +127,7 @@ describe('fileio_readtext', function () {
fileio
.
readTextSync
(
fpath
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_readtext_sync_004 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/stat.test.js
浏览文件 @
d976b9cd
...
...
@@ -61,6 +61,7 @@ describe('fileio_stat', function () {
fileio
.
statSync
(
fpath
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_stat_sync_001 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/symlink.test.js
浏览文件 @
d976b9cd
...
...
@@ -39,6 +39,7 @@ describe('fileio_symlink', function () {
fileio
.
unlinkSync
(
fpath
+
'
aaaa
'
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_symlink_sync_000 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/truncate.test.js
浏览文件 @
d976b9cd
...
...
@@ -147,7 +147,9 @@ describe('fileio_truncate', function () {
try
{
fileio
.
truncateSync
(
fpath
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{}
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_truncate_sync_001 has failed for
'
+
e
);
}
});
/**
...
...
@@ -163,6 +165,8 @@ describe('fileio_truncate', function () {
try
{
fileio
.
truncateSync
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{}
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_truncate_sync_002 has failed for
'
+
e
);
}
});
});
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/unlink.test.js
浏览文件 @
d976b9cd
...
...
@@ -34,6 +34,7 @@ describe('fileio_unlink', function () {
fileio
.
unlinkSync
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_unlink_sync_000 has failed for
'
+
e
);
}
});
...
...
@@ -53,6 +54,7 @@ describe('fileio_unlink', function () {
fileio
.
unlinkSync
(
fpath
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_unlink_sync_001 has failed for
'
+
e
);
}
});
...
...
storage/storagefileiojstest/src/main/js/default/test/module_fileio/members/write.test.js
浏览文件 @
d976b9cd
...
...
@@ -229,6 +229,7 @@ describe('fileio_write', function () {
fileio
.
writeSync
();
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_write_sync_007 has failed for
'
+
e
);
}
});
...
...
@@ -246,6 +247,7 @@ describe('fileio_write', function () {
fileio
.
writeSync
(
-
1
,
FILE_CONTENT
);
expect
(
null
).
assertFail
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_write_sync_008 has failed for
'
+
e
);
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录