Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

tests doesn't run on Windows XP #10

Closed
bbigras opened this issue Apr 16, 2015 · 7 comments
Closed

tests doesn't run on Windows XP #10

bbigras opened this issue Apr 16, 2015 · 7 comments

Comments

@bbigras
Copy link

bbigras commented Apr 16, 2015

--- FAIL: TestQuery (0.08s)
    wmi_test.go:21: Unknown name.
--- FAIL: TestFieldMismatch (0.03s)
    wmi_test.go:34: Expected err field mismatch
Disabling GC
--- FAIL: TestStrings (0.07s)
    wmi_test.go:47: Unknown name. SELECT CSCreationClassName, CSName, Caption, CommandLine, CreationClassName, CreationDate, Description, ExecutablePath, ExecutionState, Handle, HandleCount, InstallDate, KernelModeTime, MaximumWorkingSetSize, MinimumWorkingSetSize, Name, OSCreationClassName, OSName, OtherOperationCount, OtherTransferCount, PageFaults, PageFileUsage, ParentProcessId, PeakPageFileUsage, PeakVirtualSize, PeakWorkingSetSize, Priority, PrivatePageCount, ProcessId, QuotaNonPagedPoolUsage, QuotaPagedPoolUsage, QuotaPeakNonPagedPoolUsage, QuotaPeakPagedPoolUsage, ReadOperationCount, ReadTransferCount, SessionId, Status, TerminationDate, ThreadCount, UserModeTime, VirtualSize, WindowsVersion, WorkingSetSize, WriteOperationCount, WriteTransferCount FROM Win32_Process 
--- FAIL: TestNamespace (0.04s)
    wmi_test.go:87: Unknown name.
FAIL
exit status 1
FAIL    github.com/StackExchange/wmi    0.351s

Windows XP
go version go1.4.2 windows/386

The tests works on Windows 7 64-bit.

@maddyblue
Copy link
Contributor

Repro'd here. Will possibly fix soon.

@bbigras
Copy link
Author

bbigras commented Apr 16, 2015

👍

@maddyblue
Copy link
Contributor

See: golang/go#8293 (comment)

This is occurring because ItemIndex doesn't exist on SWbemObjectSet in Windows XP. The comment above recommends using _NewEnum. I do not know if I can work on this soon. But maybe it's enough to point someone in the right direction.

@ahall
Copy link

ahall commented May 22, 2015

I just had the same problem on Windows 2003 :). Be great if we could fix this.

@Durgababu
Copy link

Hi ,

Is this fixed or not? it is not working for me on windows XP and windows 2003 because of "ItemIndex".
can you help me on this?

mjibson,
Are you working on this?

@ahall
Copy link

ahall commented Jul 29, 2016

Should run now?

@gbrayut gbrayut closed this as completed Jul 29, 2016
@bbigras
Copy link
Author

bbigras commented Aug 8, 2016

Since it wasn't clear if it was fixed or not I tested again and it seems fine.

Y:\go\src\github.com\StackExchange\wmi>go test
Disabling GC
iter 0 zeros: 0
iter 1 zeros: 0
iter 2 zeros: 0
iter 3 zeros: 0
iter 4 zeros: 0
Enabling GC
iter 0 zeros: 0
iter 1 zeros: 0
iter 2 zeros: 0
iter 3 zeros: 0
iter 4 zeros: 0
PASS
ok      github.com/StackExchange/wmi    1.512s

go version go1.6.3 windows/386

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants