TEST: FillBadData AllBadData_TerminatesWithoutHang never reaches the no-progress guard

未关闭
#1,848 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp
领域
testing

调研方向

Read src/Plugins/SimplnxCore/test/FillBadDataTest.cpp and the BFS/CCL guard paths in src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/FillBadDataBFS.cpp and FillBadDataCCL.cpp. Set up the test input so bad-data voxels are marked for filling with no good neighbor, then check the warning and resulting voxel values for both algorithm scenarios. Update the specified rows and coverage totals in src/Plugins/SimplnxCore/vv/FillBadDataFilter.md; done when the test reaches the guard and the report accurately describes its coverage.

由索引模型根据 Issue 内容生成。

描述

Testing

Summary

The FillBadData test that is meant to cover the "no progress" guard never reaches it. The guard itself may work, but nothing tests it.

What is requested: change SimplnxCore::FillBadData::AllBadData_TerminatesWithoutHang so that it reaches the guard and checks what the guard does. Then correct the V&V report rows that say this test covers it.

Why it is needed: the guard stops the fill loop when bad-data voxels remain but none of them has a good neighbor. Without it, the loop never ends: the hang that this test was written to prevent. Because the test never reaches the guard, a change that breaks the guard would still pass.

How it works now (develop at 2eb6b878f6ff408d1454754d4c0e63edd676d7e0):

  • The test builds a 3 x 3 x 1 image in which every voxel is bad data (Feature Id 0), and sets Minimum Allowed Defect Size to 1 (line 593).
  • Both algorithms keep a bad-data region whose size is at least the threshold as a void, and mark only smaller regions (-1) for filling: FillBadDataBFS.cpp lines 204–222 and FillBadDataCCL.cpp line 441.
  • The single 9-voxel region is at least 1, so it is kept as a void. No voxel is marked for filling, and the fill loop has nothing to do. The guard (BFS line 350, CCL line 736) is never reached.
  • The test only checks that preflight and execute succeed, so it passes.
  • The test comment says "The no-progress guard must return and leave those voxels unchanged." The V&V report says the test covers the guard: path row 16 (vv/FillBadDataFilter.md line 88) and the inventory row (line 106).

This analysis comes from reading the code; no instrumented run was made.

Where it applies: src/Plugins/SimplnxCore/test/FillBadDataTest.cpp and src/Plugins/SimplnxCore/vv/FillBadDataFilter.md (path row 16, the inventory row, and the coverage totals that count row 16).

A threshold larger than the region (for example 100) would mark all 9 voxels for filling with no good neighbor, which is the case the guard handles. The test could then check the warning "… bad-data voxel(s) could not be filled because they have no adjacent good-data neighbor …" and that the voxels are left unfilled, for both algorithm scenarios. Still open: what Feature Id value the unfilled voxels should end with.

Found while reviewing #1829.

主要语言
C++
星标
18
派生
15
平均合并
4 天 23 小时
30 天内合并 PR
42

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

BlueQuartzSoftware/simplnx 的其他 Issue

查看 BlueQuartzSoftware/simplnx 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。