OpenHarmony开发者论坛

标题: XTS-ACTS验证 ActsHuksAgreeBasic 的4个套件Unavailable [打印本页]

作者: 赵立    时间: 6 小时前
标题: XTS-ACTS验证 ActsHuksAgreeBasic 的4个套件Unavailable
[md]### 【问题描述】

1. 介绍问题现象和发生的背景
   使用官方的ACTS套件测试时,ActsHuksAgreeBasicCallbackJSApiTest、ActsHuksAgreeBasicCallbackJSApiReformedTest、ActsHuksAgreeBasicPromiseJSApiReformedTest、ActsHuksAgreeBasicPromiseJSApiTest四个套件报Unavailable
2. 相关的代码(请勿使用截图)
   使用官方标准测试套件或者用SDK中的套件自己编译均相同。
3. 运行结果、错误截图

   [2024-10-16 21:07:27,647] [7088] [Concurrent] [DEBUG] [Set device <ohos.environment.device.Device object at 0x000001E399A34CD0> need kit setup to false]
   [2024-10-16 21:07:27,647] [7088] [OpenHarmony] [DEBUG] [Start execute OpenHarmony JSUnitTest]
   [2024-10-16 21:07:27,647] [7088] [OpenHarmony] [DEBUG] [Test case file path: D:\FTP\suites32_no_js\acts\testcases\ActsHuksAgreeBasicCallbackJSApiReformedTest.json]
   [2024-10-16 21:07:27,647] [7088] [Utils] [INFO] [Generate device log file: D:\FTP\suites32_no_js\acts\reports\2024-10-16-21-07-26\log\device_hilog_ea2d0053473531314420d40012bf4a00_ActsHuksAgreeBasicCallbackJSApiReformedTest.log]
   [2024-10-16 21:07:27,649] [7088] [Hdc] [INFO] [ea2d005347************0012bf4a00 execute command: hdc shell hilog -r with timeout 300.0s]
   [2024-10-16 21:07:27,748] [7088] [Hdc] [INFO] [ea2d005347************0012bf4a00 execute command: hdc shell date '2024-10-16 21:07:27' with timeout 300.0s]
   [2024-10-16 21:07:27,837] [7088] [Hdc] [INFO] [ea2d005347************0012bf4a00 execute command: hdc shell hwclock --systohc with timeout 300.0s]
   [2024-10-16 21:07:27,933] [7088] [Device] [INFO] [execute command: hdc -t ea2d005347************0012bf4a00 shell hilog]
   [2024-10-16 21:07:27,938] [7088] [Device] [DEBUG] [ea2d005347************0012bf4a00 execute command hdc target mount]
   [2024-10-16 21:07:28,022] [7088] [Device] [DEBUG] [Mount finish]
   [2024-10-16 21:07:28,022] [7088] [Utils] [DEBUG] [Do kit:AppInstallKit setup]
   [2024-10-16 21:07:28,022] [7088] [Kit] [DEBUG] [AppInstallKit setup, device:ea2d0053473531314420d40012bf4a00]
   [2024-10-16 21:07:28,022] [7088] [Hdc] [INFO] [ea2d005347************0012bf4a00 execute command: hdc shell setprop persist.sys.platformautotest 1 with timeout 300.0s]
   [2024-10-16 21:07:28,095] [7088] [Utils] [DEBUG] [Input name:ActsHuksAgreeBasicCallbackJSApiReformedTest.hap, paths:['D:\\FTP\\suites32_no_js\\acts\\resource', 'D:\\FTP\\suites32_no_js\\acts\\testcases'], alt dir:None]
   [2024-10-16 21:07:28,095] [7088] [Hdc] [INFO] [ea2d005347************0012bf4a00 execute command: hdc shell param get const.product.software.version with timeout 300.0s]
   [2024-10-16 21:07:28,210] [7088] [Device] [DEBUG] [is_harmony, OpenHarmony verison :OpenHarmony 3.2.14.6
   ]
   [2024-10-16 21:07:28,210] [7088] [Device] [DEBUG] [ea2d005347************0012bf4a00 execute command hdc install "D:\FTP\suites32_no_js\acts\testcases\ActsHuksAgreeBasicCallbackJSApiReformedTest.hap"]
   [2024-10-16 21:07:28,783] [7088] [Device] [DEBUG] [[Info]App install path:\FTP\suites32_no_js\acts\testcases\ActsHuksAgreeBasicCallbackJSApiReformedTest.hap, queuesize:0, msg:install bundle successfully.]
   [2024-10-16 21:07:28,783] [7088] [Device] [DEBUG] [AppMod finish]
   [2024-10-16 21:07:28,784] [7088] [Hdc] [INFO] [ea2d005347************0012bf4a00 execute command: hdc shell aa test -p com.example.huksagreebasiccallback -b com.example.huksagreebasiccallback -s unittest OpenHarmonyTestRunner  -w 4200000  -s timeout 1500000  -s dryRun true with timeout 4200.0s]
   [2024-10-16 21:07:33,146] [7088] [ParserLite] [DEBUG] [Result code is: ]
   [2024-10-16 21:07:33,146] [7088] [Parser] [DEBUG] [OHJSUnitTestListParser data:]
   [2024-10-16 21:07:33,146] [7088] [Parser] [DEBUG] [start ability successfully.TestFinished-ResultCode: -1TestFinished-ResultMsg: App dieduser test finished.]
   [2024-10-16 21:07:33,146] [7088] [OpenHarmony] [INFO] [Collected suite count is: 0, test count is: 0]
   [2024-10-16 21:07:33,147] [7088] [Hdc] [INFO] [ea2d005347************0012bf4a00 execute command: hdc shell aa test -p com.example.huksagreebasiccallback -b com.example.huksagreebasiccallback -s unittest OpenHarmonyTestRunner  -w 4200000  -s timeout 1500000  with timeout 4200.0s]
   [2024-10-16 21:07:37,262] [7088] [Listener] [DEBUG] [ [7088] End test suite cost 0ms.
   ]
   [2024-10-16 21:07:37,262] [7088] [Listener] [INFO] [ [7088] End test suite [None].
   ]
   [2024-10-16 21:07:37,502] [7088] [ParserLite] [DEBUG] [Result code is: ]
   [2024-10-16 21:07:37,502] [7088] [Parser] [DEBUG] [OHJSParser data:]
   [2024-10-16 21:07:37,502] [7088] [Parser] [DEBUG] [[7088] start ability successfully.
   [7088] TestFinished-ResultCode: -1
   [7088] TestFinished-ResultMsg: App died
   [7088] user test finished.
   ]
   [2024-10-16 21:07:37,503] [7088] [SuiteReporter] [ERROR] [ActsHuksAgreeBasicCallbackJSApiReformedTest no suite result exists] [ErrorNo=00000]
   [2024-10-16 21:07:37,503] [7088] [Utils] [DEBUG] [Do kit:AppInstallKit teardown]
   [2024-10-16 21:07:37,503] [7088] [Kit] [DEBUG] [AppInstallKit teardown: device:ea2d0053473531314420d40012bf4a00]
   [2024-10-16 21:07:37,503] [7088] [Kit] [INFO] [Obtain the app name com.example.huksagreebasiccallback from json successfully]
   [2024-10-16 21:07:37,503] [7088] [Device] [INFO] [ea2d005347************0012bf4a00 bm uninstall -n com.example.huksagreebasiccallback ]
   [2024-10-16 21:07:37,504] [7088] [Hdc] [INFO] [ea2d005347************0012bf4a00 execute command: hdc shell bm uninstall -n com.example.huksagreebasiccallback  with timeout 120.0s]
   [2024-10-16 21:07:37,785] [7088] [Kit] [DEBUG] [uninstalling package Success. result is uninstall bundle successfully.
   ]
4. 我尝试过的解决方法和结果

   因工程应用需要,修改过设备树,不知道是什么原因导致的,而使用原始设备树则可以校验通过。分析对比通过和不通过的模块日志文件,发现一处不正常的报错,也不知道原因。因对整个XTS ACTS的逻辑不太了解,日志文件中的打印逻辑也不太清楚。以下是日志中对比发现的主要异常。

   10-16 21:07:28.432   344   408 I C01706/ueaServer-IntelliSenseServer: Get app info:6799 20010038 com.example.huksagreebasiccallback 0
   10-16 21:07:28.919   344   408 I C01706/ueaServer-IntelliSenseServer: Get app info:6799 20010038 com.example.huksagreebasiccallback 2
   10-16 21:07:28.921   344   408 I C01706/ueaServer-IntelliSenseServer: [ReportMessage]pid 6799 change to foreground.
   10-16 21:07:28.921   344   408 I C01706/rtg_interface: create rtg grp success, get rtg id 2.
   10-16 21:07:29.000  6799  6821 E C01706/ueaClient-RmeCoreSched: [Init]: rtgEnabled! scheme Open!ret: 1
   10-16 21:07:29.000  6799  6821 I C01706/ueaClient-FrameMsgMgr: [Init]:inited success!
   10-16 21:07:29.000  6799  6821 I C01706/ueaClient-FrameUiIntf: [Init]:ret:1, inited:1
   10-16 21:07:32.057   344   408 I C01706/ueaServer-IntelliSenseServer: [ReportMessage]pid 6799 died.
   10-16 21:07:32.057   344   408 I C01706/rtg_interface: destroy rtg grp success, get rtg id:2, ret:0.
   10-16 21:07:32.800   344   408 I C01706/ueaServer-IntelliSenseServer: Get app info:6842 20010038 com.example.huksagreebasiccallback 0
   10-16 21:07:33.286   344   408 I C01706/ueaServer-IntelliSenseServer: Get app info:6842 20010038 com.example.huksagreebasiccallback 2
   10-16 21:07:33.287   344   408 I C01706/ueaServer-IntelliSenseServer: [ReportMessage]pid 6842 change to foreground.
   10-16 21:07:33.288   344   408 I C01706/rtg_interface: create rtg grp success, get rtg id 2.
   10-16 21:07:33.363  6842  6865 E C01706/ueaClient-RmeCoreSched: [Init]: rtgEnabled! scheme Open!ret: 1
   10-16 21:07:33.363  6842  6865 I C01706/ueaClient-FrameMsgMgr: [Init]:inited success!
   10-16 21:07:33.363  6842  6865 I C01706/ueaClient-FrameUiIntf: [Init]:ret:1, inited:1
   10-16 21:07:36.375   344   408 I C01706/ueaServer-IntelliSenseServer: [ReportMessage]pid 6842 change to background.
   10-16 21:07:36.377   344   408 I C01706/rtg_interface: destroy rtg grp success, get rtg id:2, ret:0.
   10-16 21:07:36.431   344   408 I C01706/ueaServer-IntelliSenseServer: [ReportMessage]pid 6842 died.
   10-16 21:07:36.431   344   408 E C01706/rtg_interface: destroy rtg grp failed, errno = 2 (No such file or directory)
5. 我想要达到的结果
   ACTS验证通过

### 【运行环境】

硬件:RK3568 (创龙核心板)
DevEvoStudio版本:未使用
SDK版本:OpenHarmony 3.2 (powerHarmony SDKV10)
[/md]
作者: 深开鸿_胡瑞涛    时间: 4 小时前
可以参考这篇文章分析哪里出错了,https://forums.openharmony.cn/fo ... thread&tid=3366
作者: 深开鸿_王石    时间: 4 小时前
你装的是这个hap:ActsHuksAgreeBasicCallbackJSApiReformedTest.hap, 这个hap你手动装,看看能不能装上,hdc install ActsHuksAgreeBasicCallbackJSApiReformedTest.hap; 然后呢,运行: hdc shell aa test -p com.example.huksagreebasiccallback -b com.example.huksagreebasiccallback -s unittest OpenHarmonyTestRunner -w 4200000 -s timeout 1500000 -s dryRun true  命令,看看能不能执行,或者有啥错。

多问一句,你的xts是怎么取的,我看你是3.2的OpenHarmony,那你就得用3.2的xts运行;
注意:目前的xts是最多维持一个版本,现在最新的是5.0.0,所以4.1还有不到6个月的认证时间,3.2是不发兼容性认证的证书了

最后:https://forums.openharmony.cn/forum.php?mod=viewthread&tid=3366 这是之前发的文章,可以看看
作者: 晓东    时间: 4 小时前
这个问题我不知道
作者: 赵立    时间: 2 小时前
回复 深开鸿_王石: 感谢您的回复,我用您的方式操作了一下,命令行的打印是这样的。
D:\FTP\suites32_no_js\acts>hdc install testcases\ActsHuksAgreeBasicCallbackJSApiReformedTest.hap
[Info]App install path:\FTP\suites32_no_js\acts\testcases\ActsHuksAgreeBasicCallbackJSApiReformedTest.hap, queuesize:0, msg:install bundle successfully.
AppMod finish

D:\FTP\suites32_no_js\acts>hdc shell aa test -p com.example.huksagreebasiccallback -b com.example.huksagreebasiccallback -s unittest OpenHarmonyTestRunner -w 4200000 -s timeout 1500000 -s dryRun true
start ability successfully.
TestFinished-ResultCode: -1
TestFinished-ResultMsg: App died
user test finished.

调试串口上的打印信息如下:
# [17289.647389] hungtask_base whitelist[0]-init-1
[17289.647504] hungtask_base whitelist[1]-appspawn-241
[17398.659229] kauditd_printk_skb: 20 callbacks suppressed
[17398.659235] audit: type=1400 audit(1729242956.536:937): avc:  denied  { getattr } for  pid=2002 comm="sh" path="/data/local/tmp" dev="mmcblk0p11" ino=82 scontext=u:r:sh:s0 tcontext=u:object_r:data_local_tmp:s0 tclass=dir permissive=1
[17398.908888]  hmdfs: hmdfs_make_bitem() make bundle item = com.example.huksagreebasiccallback
[17398.909204]  hmdfs: hmdfs_appid_store() store bundle id
[17398.909220]  hmdfs: insert_appid_hash_entry() insert name = com.example.huksagreebasiccallback
[17398.909490]  sharefs: sharefs_appid_store() store bundle id
[17398.909504]  sharefs: insert_appid_hash_entry() insert name = com.example.huksagreebasiccallback
[17416.252434] audit: type=1400 audit(1729242974.130:938): avc:  denied  { mounton } for  pid=2011 comm="appspawn" path="/mnt/sandbox/com.example.huksagreebasiccallback/data/storage/el1/bundle/misc" dev="mmcblk0p11" ino=77 scontext=u:r:appspawn:s0 tcontext=u:object_r:data_misc:s0 tclass=dir permissive=1
[17416.419552] audit: type=1400 audit(1729242974.296:939): avc:  denied  { open } for  pid=2026 comm="sh" path="/dev/__parameters__/u:object_r:musl_param:s0" dev="tmpfs" ino=59 scontext=u:r:sh:s0 tcontext=u:object_r:musl_param:s0 tclass=file permissive=1
[17416.419601] audit: type=1400 audit(1729242974.296:940): avc:  denied  { map } for  pid=2026 comm="sh" path="/dev/__parameters__/u:object_r:musl_param:s0" dev="tmpfs" ino=59 scontext=u:r:sh:s0 tcontext=u:object_r:musl_param:s0 tclass=file permissive=1
[17416.745800] [SCHED_RTG] parse_create_rtg_grp rtgid=2, type=0, prio=97, threadnum=5, rtnum=4
[17419.893195] binder: undelivered death notification, 00000000011f6e70
[17419.901472] [SCHED_RTG] do_clear_or_destroy_grp clear frame(id=2)
[17481.647358] hungtask_base whitelist[0]-init-1
[17481.647490] hungtask_base whitelist[1]-appspawn-241


作者: 赵立    时间: 1 小时前
回复 深开鸿_胡瑞涛: 感谢您的回复,通过hilog的日志看不出明显的错误。主要是刚接触对整个流程不太了解,日志看着没什么头绪。




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5