OpenHarmony开发者论坛
标题:
OpenHarmony4.1 hats PurgeableCppTest MutiMorePageReadWriteTest测试失败
[打印本页]
作者:
海天一色
时间:
2024-11-5 10:51
标题:
OpenHarmony4.1 hats PurgeableCppTest MutiMorePageReadWriteTest测试失败
<b>【问题描述】</b>
使用命令 ./HatsPurgeable --gtest_filter=PurgeableCppTest.MutiMorePageReadWriteTest进行测试,
得到如下错误:inter LoopReclaimPurgeable
ReclaimPurgeable: kernel not support
LoopReclaimPurgeable: 0. Reclaim result=fail
quit LoopReclaimPurgeable
inter LoopPrintAlphabet
LoopPrintAlphabet: 0. ERROR! BeginRead failed.
quit LoopPrintAlphabet
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
TestBody: ERROR! BeginRead failed.
~TestBigDataBuilder
~TestDataModifier
~TestDataModifier
~TestDataModifier
../../test/xts/hats/kernel/purgeableMem/purgeable_cpp_test.cpp:418: Failure
Expected equality of these values:
ret
Which is: 1
0
log:
UPT: IsPresentAt: addr(0xffff326ff000) upte=0x3 PRESENT_MASK=0x1
。。。。
UPT: IsPresentAt: addr(0xffff327ff000) upte=0x3 PRESENT_MASK=0x1
UPT: IsPresentAt: addr(0xffff32800000) upte=0x2 PRESENT_MASK=0x1
UPT: UxpteOps: addr(0xffff32800000) not present
看了下代码没搞清楚upte是如何从0x2变成0x3的,为什么只有一部分upte变成了0x3? 哪位大神有遇到过这个问题,请帮忙看看。
作者:
海天一色
时间:
2024-11-8 15:57
我自己大概定位了一下:
UPT: UxpteOps: addr(0xffff32800000) not present是因为upte为0x2 而不是0x3。只有当发生缺页异常的时候才会秉承0x3。
/proc/sys/kernel/purgeable这个文件不存在导致ReclaimPurgeable()函数失败,内存没有完全被reclaim。访问这些没有被reclaim的内存不会产生缺页异常,upte就不会变成0x3。导致测试失败。
/proc/sys/kernel/purgeable 这文件为什么不存在?内核代码里没找到创建的地方, 要是哪位大神知道,烦请解惑
欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/)
Powered by Discuz! X3.5