Skip to content

Commit b2bba26

Browse files
authored
Merge pull request #1448 from zrggw/fix_markdown
fix markdownlint error
2 parents 878c014 + af279ca commit b2bba26

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/ebpf_unit_test_zh.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Kmesh eBPF 单元测试框架是一个用于测试 eBPF 内核态程序的工具
88

99
测试框架的目录结构如下:
1010

11-
```
11+
``` plaintext
1212
test/bpf_ut/
1313
├── bpftest/ # Go 语言实现的单元测试框架
1414
│ ├── bpf_test.go # 测试框架核心逻辑以及辅助函数
@@ -75,9 +75,11 @@ Go 语言实现的单元测试框架负责加载和执行 eBPF 程序,捕获
7575
## 4.3 用户态 Go 测试代码
7676

7777
无论采用哪种测试类型,都会在用户态利用 Go 测试框架对编译得到的 eBPF 程序进行加载、执行与结果校验。`bpf_test.go` 中定义了各类工具函数,如:
78+
7879
- `loadAndRunSpec`:载入并初始化 `.o` 文件中的程序、Map。
7980
- `startLogReader`:读取 eBPF Map 中的 ringbuf 或日志输出。
8081
- `registerTailCall`:为特定测试场景注册 tail call。
82+
8183
这样可以结合内核测试程序与用户态测试逻辑,为 eBPF 程序提供更完善的验证能力。
8284

8385
# 5. 编写测试
@@ -237,4 +239,4 @@ make ebpf_unit_test
237239

238240
可以使用以下参数控制测试执行:
239241

240-
- `V=1`:启用详细测试输出
242+
- `V=1`:启用详细测试输出

0 commit comments

Comments
 (0)