MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TestQueryType

Function TestQueryType

pkg/handle/object_test.go:71–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestQueryType(t *testing.T) {
72 h, err := windows.OpenProcess(windows.PROCESS_QUERY_INFORMATION, false, uint32(os.Getpid()))
73 require.NoError(t, err)
74 defer windows.CloseHandle(h)
75 typeName, err := QueryObjectType(h)
76 require.NoError(t, err)
77 assert.Equal(t, Process, typeName)
78}
79
80func TestQueryNameFileHandle(t *testing.T) {
81 f, err := windows.Open("_fixtures/.fibratus", windows.O_RDONLY, windows.S_ISUID)

Callers

nothing calls this directly

Calls 2

QueryObjectTypeFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected