openharmony4.1 hats PurgeableCppTest MutiMorePageReadWriteTest测试失败

海天一色 显示全部楼层 发表于 3 天前
<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? 哪位大神有遇到过这个问题,请帮忙看看。

您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

精彩评论1

海天一色

沙发 发表于 7 小时前
我自己大概定位了一下:
UPT: UxpteOps: addr(0xffff32800000) not present是因为upte为0x2 而不是0x3。只有当发生缺页异常的时候才会秉承0x3。
/proc/sys/kernel/purgeable这个文件不存在导致ReclaimPurgeable()函数失败,内存没有完全被reclaim。访问这些没有被reclaim的内存不会产生缺页异常,upte就不会变成0x3。导致测试失败。
/proc/sys/kernel/purgeable 这文件为什么不存在?内核代码里没找到创建的地方, 要是哪位大神知道,烦请解惑

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部