Commit Graph

6 Commits (9aa4e7a744bb35916461100865e7774a76f4053c)

Author SHA1 Message Date
Jeff Weiss f850a69ba1 get tests passing on s390x
Eng Zer Jun 37894e9b28
test: use `T.Setenv` to set env vars in tests
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Ville Skyttä f7e1f36418 refactor: remove unnecessary exec.LookPath calls
Executing the command does the lookup if needed and returns the same
error when not found, no need to do it separately.
Lomanic 6589c5c274 [cpu][linux] Fix #1037 only count logical cores where 2nd field is a number
Lomanic bb6f6e4968 [cpu][linux] Test Counts against lscpu results
WAKAYAMA Shirou 4c9fd1f200 [cpu]linux: add testcode with testdata.