Merge GitLink initial README
OpenHarmony dmsfwk_lite 64-bit TLV marshalling 修复与测试补强
openharmony/ability_dmsfwk_lite
source/ability_dmsfwk_lite
patches/openharmony_ability_dmsfwk_lite_uint64_tlv_fix.patch
修复 source/dmslite_packet.c 中 MarshallUint64 把 64 位字段按 uint16_t 长度编码的问题。修复后,64 位 TLV 字段会按 8 字节编码,避免接收端 UnMarshallUint64 因长度不匹配而返回 0。
source/dmslite_packet.c
MarshallUint64
uint16_t
UnMarshallUint64
新增 OpenHarmony module test:
moduletest/dtbschedmgr_lite/source/packet_test.cpp
moduletest/dtbschedmgr_lite/BUILD.gn
新增本地验证资产:
verification/run_host_verification.ps1
verification/verify_packet_fix.py
verification/packet_marshalling_host_test.c
verification/host_stubs/*
当前环境无 gcc/clang,验证脚本自动回退到 Python 字节级验证。
gcc/clang
结果:
verify_packet_fix.py: 2/2 packet cases passed MarshallUint64 pre-fix simulated packet: 06 02 07 08 MarshallUint64 fixed packet: 06 08 01 02 03 04 05 06 07 08 Encoded TLV size changed from 4 to 10 bytes
cd C:\CCFOpenSourcepowershell cd C:\CCFOpenSource\09_OpenHarmony powershell -ExecutionPolicy Bypass -File .\verification\run_host_verification.ps1 git -C .\source\ability_dmsfwk_lite diff --check git -C .\source\ability_dmsfwk_lite diff --stat 9_OpenHarmony powershell -ExecutionPolicy Bypass -File .\verification\run_host_verification.ps1 git -C .\source\ability_dmsfwk_lite diff --check git -C .\source\ability_dmsfwk_lite diff --stat
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
CCF2026 OpenHarmony 开源任务挑战赛提交材料
作品名称
OpenHarmony dmsfwk_lite 64-bit TLV marshalling 修复与测试补强
赛题与仓库
openharmony/ability_dmsfwk_litesource/ability_dmsfwk_litepatches/openharmony_ability_dmsfwk_lite_uint64_tlv_fix.patch官方依据
实质贡献
修复
source/dmslite_packet.c中MarshallUint64把 64 位字段按uint16_t长度编码的问题。修复后,64 位 TLV 字段会按 8 字节编码,避免接收端UnMarshallUint64因长度不匹配而返回 0。新增 OpenHarmony module test:
moduletest/dtbschedmgr_lite/source/packet_test.cppmoduletest/dtbschedmgr_lite/BUILD.gn新增本地验证资产:
verification/run_host_verification.ps1verification/verify_packet_fix.pyverification/packet_marshalling_host_test.cverification/host_stubs/*验证结果
当前环境无
gcc/clang,验证脚本自动回退到 Python 字节级验证。结果:
量化指标
MarshallUint64TLV 从错误的 4 字节 packet 修复为正确的 10 字节 packet快速复现