Skip to content

Query regarding TestTopology testcase  #1551

@jparinita

Description

@jparinita

This is about cAdvisor test case "TestTopology" .
While checking code for this test case, I could see that it reads cpu core information from utils/machine/testdata/cpuinfo file which contains information for 12 cores.

There is a condition in function TestTopology() which checks whether numCores is 12.
This condition will always satisfy and tests will pass.

Just curious to know why it reads from testdata/cpuinfo and not from /proc/cpuinfo ?
Or not using runtime.GOMAXPROCS(0) or runtime.NumCPU() provided by golang?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions