Skip to content

test(lmbench): 引入 lmbench 测试框架集成和自动测试脚本 - #1433

Open
mistcoversmyeyes wants to merge 36 commits into
DragonOS-Community:masterfrom
mistcoversmyeyes:feat/lmbench
Open

test(lmbench): 引入 lmbench 测试框架集成和自动测试脚本#1433
mistcoversmyeyes wants to merge 36 commits into
DragonOS-Community:masterfrom
mistcoversmyeyes:feat/lmbench

Conversation

@mistcoversmyeyes

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the test Unitest/User space test label Dec 3, 2025
@mistcoversmyeyes
mistcoversmyeyes force-pushed the feat/lmbench branch 6 times, most recently from 4ca963e to b5138f4 Compare December 17, 2025 15:46
@mistcoversmyeyes
mistcoversmyeyes force-pushed the feat/lmbench branch 4 times, most recently from 2edfdee to cc88ddc Compare December 18, 2025 17:32
@mistcoversmyeyes
mistcoversmyeyes force-pushed the feat/lmbench branch 2 times, most recently from 5657c94 to a05fcb8 Compare January 13, 2026 11:13
mistcoversmyeyes and others added 15 commits July 28, 2026 16:38
- 从 DragonOS 镜像站安装 lmbench 二进制包
- 添加 lmbench 测试用例脚本,涵盖内存、进程、文件系统和网络等方面的性能测试
- 修改使用 ext2 文件系统的测试脚本为使用 ext4 文件系统
- 添加测试环境初始化脚本 init.sh ,清理脚本 clean_up.sh和环境变量配置脚本 env.sh
- 修复 `lmbench/mem_map_lat` 测例的权限问题,确保测试能够正确执行。
- 在 `ramfs_copy_files_bw` 测试中添加 `sudo`,以确保有足够的权限进行文件操作。
- 修复 `vfs_xx_lat` 系列测试缺少临时文件的问题,确保测试环境完整。
…NER hang

lmbench's BENCH_INNER macro (bench.h) loops `while(__result < 0.95 *
get_enough(0))`. Under virtualized timing compute_enough() can return
SHORT=1000000, making __iterations explode (<<=3 past the 1<<27 break
that resets __result=0) into an infinite while — the observed benchmp
hangs on WSL2 (lat_fifo/bw_unix/lat_sem/bw_tcp/lat_select tcp/lat_udp/
lat_unix_connect all busy-loop state=R until timeout).

Fix: precompute ENOUGH once via lmbench's `enough` tool (the standard
config-run flow: `ENOUGH=`../bin/$OS/enough``), then clamp to <=100000
so BENCH_INNER's inner calibration converges, with 50000 (REAL_SHORT)
fallback on hang/failure. Enough<=100000 makes the while(__result <
0.95*enough) target small enough to converge under timing jitter.

Root cause confirmed via systematic-debugging on host: ENOUGH<=100000
unblocks all hung tools (lat_pipe/lat_unix/lat_sem/bw_unix output normal),
ENOUGH=1000000 hangs, TIMING_O=0 LOOP_O=0 unblocks (skips BENCH_INNER).
Not a DragonOS kernel issue; guest 8/8 e2e implies guest timing is stable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Unitest/User space test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants