Skip to content

Commit 66a8b3b

Browse files
imran-knbrenns10
authored andcommitted
tests: Fix test failures due to movement of cpu_number.
cpu_number has been merged into pcpu_hot object, for x86, in newer (v6.2+) kernels. For some archs like aarch64, it still exists as per-cpu variable. Since we just need a per-cpu address for this test, use per-cpu runqueues. These have been existing as per-cpu varibale for long time and even if this changes in future the change will be architecture independent, so we would not have to worry about test passing for one arch and failing for other. LSE-368. Signed-off-by: Imran Khan <[email protected]>
1 parent 6be14e8 commit 66a8b3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_mm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_AddrKind_categorize_data(prog: drgn.Program) -> None:
6363
assert mm.AddrKind.categorize(prog, bss) == mm.AddrKind.BSS
6464

6565
# percpu
66-
pcpu = prog.symbol("cpu_number").address
66+
pcpu = prog.symbol("runqueues").address
6767
assert mm.AddrKind.categorize(prog, pcpu) == mm.AddrKind.PERCPU
6868

6969

0 commit comments

Comments
 (0)