Comments (6)
I will have a PR up soon to fix this
from gopsutil.
Also noticed a decent amount of the tests fail in windows
=== RUN TestReadlines
--- PASS: TestReadlines (0.00s)
=== RUN TestReadLinesOffsetN
import (
--- PASS: TestReadLinesOffsetN (0.00s)
=== RUN TestIntToString
--- PASS: TestIntToString (0.00s)
=== RUN TestByteToString
--- PASS: TestByteToString (0.00s)
=== RUN TestStringsContains
--- PASS: TestStringsContains (0.00s)
=== RUN TestPathExists
--- PASS: TestPathExists (0.00s)
PASS
ok github.com/shirou/gopsutil/common 0.024s
# github.com/shirou/gopsutil/process
process\process_test.go:246: p.CreateTime undefined (type Process has no field or method CreateTime)
=== RUN TestCpu_times
--- PASS: TestCpu_times (0.00s)
=== RUN TestCpu_counts
--- PASS: TestCpu_counts (0.00s)
=== RUN TestCPUTimeStat_String
--- PASS: TestCPUTimeStat_String (0.00s)
=== RUN TestCpuInfo
--- PASS: TestCpuInfo (1.06s)
=== RUN TestCPUPercent
--- FAIL: TestCPUPercent (3.07s)
cpu_test.go:82: error wmi: cannot load field "LoadPercentage" into a "uint16": unsupported type (<nil>)
cpu_test.go:82: error wmi: cannot load field "LoadPercentage" into a "uint16": unsupported type (<nil>)
=== RUN TestCPUPercentPerCpu
--- FAIL: TestCPUPercentPerCpu (3.07s)
cpu_test.go:82: error wmi: cannot load field "LoadPercentage" into a "uint16": unsupported type (<nil>)
FAIL
FAIL github.com/shirou/gopsutil/cpu 7.235s
FAIL github.com/shirou/gopsutil/disk [build failed]
? github.com/shirou/gopsutil/docker [no test files]
=== RUN TestHostInfo
--- PASS: TestHostInfo (0.33s)
=== RUN TestBoot_time
--- PASS: TestBoot_time (0.00s)
=== RUN TestUsers
--- PASS: TestUsers (0.00s)
=== RUN TestHostInfoStat_String
--- PASS: TestHostInfoStat_String (0.00s)
=== RUN TestUserStat_String
--- PASS: TestUserStat_String (0.00s)
PASS
ok github.com/shirou/gopsutil/host 0.381s
=== RUN TestLoad
--- FAIL: TestLoad (0.00s)
load_test.go:11: error not implemented yet
=== RUN TestLoadAvgStat_String
--- PASS: TestLoadAvgStat_String (0.00s)
FAIL
FAIL github.com/shirou/gopsutil/load 0.030s
=== RUN TestVirtual_memory
--- PASS: TestVirtual_memory (0.00s)
=== RUN TestSwap_memory
--- PASS: TestSwap_memory (0.00s)
=== RUN TestVirtualMemoryStat_String
--- PASS: TestVirtualMemoryStat_String (0.00s)
=== RUN TestSwapMemoryStat_String
--- PASS: TestSwapMemoryStat_String (0.00s)
PASS
ok github.com/shirou/gopsutil/mem 0.044s
=== RUN TestAddrString
--- PASS: TestAddrString (0.00s)
=== RUN TestNetIOCountersStatString
--- PASS: TestNetIOCountersStatString (0.00s)
=== RUN TestNetConnectionStatString
--- PASS: TestNetConnectionStatString (0.00s)
=== RUN TestNetIOCountersAll
--- PASS: TestNetIOCountersAll (0.00s)
=== RUN TestNetIOCountersPerNic
--- PASS: TestNetIOCountersPerNic (0.00s)
=== RUN Test_getNetIOCountersAll
--- PASS: Test_getNetIOCountersAll (0.00s)
=== RUN TestNetInterfaces
--- PASS: TestNetInterfaces (0.00s)
PASS
ok github.com/shirou/gopsutil/net 0.025s
FAIL github.com/shirou/gopsutil/process [build failed]
from gopsutil.
Thank you the PR. I have merged just now!
And also, I will check test failures later.
from gopsutil.
I fixed some process test failures on Windows. Could you check it out?
However, many func is not implemented. "Not implemented" error is fine right now on Windows.
from gopsutil.
looks good now, only fails are from ones logging not implemented. Could we change the tests to only run if they are on the supported os? Or would that be annoying to maintain?
from gopsutil.
Test failed by 'not implemented' is not a problem, at least for me. That is a good indicator of implementation status I think.
Tests can be changed to be skipped if not implemented os. But it makes a little bit hard to understand why the returned value is not set.
I closed this issue. If you have any issue, feel free to re-open.
Thank you!
from gopsutil.
Related Issues (20)
- GPU Stats HOT 1
- macos tests failed on Github Action after latest image update
- Process information not reported for FreeBSD ARM64 HOT 1
- Can't compile for openbsd HOT 2
- When I call process.Percent,memory increase slowly
- proc.openfiles() crash HOT 1
- Monitor specific ports for network HOT 1
- v4 release plan HOT 1
- Is it possible to obtain the power of the whole machine? HOT 2
- Standart interfaces for services HOT 1
- Using host.HostID() on the Windows platform The uuid obtained is different from the cmd `wmic csproduct get uuid` HOT 2
- can't use the "disk" package
- cpu.parseStatLine bug HOT 5
- Process createTime calculation for linux lxc guest is incorrect HOT 4
- Non-root user can't get process information HOT 1
- Report a bare-meteral machine as KVM at host.Info HOT 1
- The host.Info() function is unable to correctly identify CentOS Stream 8. HOT 1
- Missing FQDN/hostname option for windows HOT 2
- stat.Rdev (variable of type uint32) as uint64 HOT 4
- Adopt a hierarchy for getting distro name/version on Linux
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopsutil.