pkg,service: fix typos in comments, exceptions, tests (#3486)
This commit is contained in:
parent
7f094c81e9
commit
e404917db7
@ -995,7 +995,7 @@ func TestTracePid(t *testing.T) {
|
|||||||
assertNoError(targetCmd.Start(), t, "execute issue2023")
|
assertNoError(targetCmd.Start(), t, "execute issue2023")
|
||||||
|
|
||||||
if targetCmd.Process == nil || targetCmd.Process.Pid == 0 {
|
if targetCmd.Process == nil || targetCmd.Process.Pid == 0 {
|
||||||
t.Fatal("expected target process runninng")
|
t.Fatal("expected target process running")
|
||||||
}
|
}
|
||||||
defer targetCmd.Process.Kill()
|
defer targetCmd.Process.Kill()
|
||||||
|
|
||||||
|
@ -4565,7 +4565,7 @@ func TestCallConcurrent(t *testing.T) {
|
|||||||
|
|
||||||
gid2 := p.SelectedGoroutine().ID
|
gid2 := p.SelectedGoroutine().ID
|
||||||
t.Logf("starting second injection in %d / %d", p.SelectedGoroutine().ID, p.CurrentThread().ThreadID())
|
t.Logf("starting second injection in %d / %d", p.SelectedGoroutine().ID, p.CurrentThread().ThreadID())
|
||||||
assertNoError(proc.EvalExpressionWithCalls(grp, p.SelectedGoroutine(), "Foo(10, 2)", normalLoadConfig, false), t, "EvalExpressioniWithCalls")
|
assertNoError(proc.EvalExpressionWithCalls(grp, p.SelectedGoroutine(), "Foo(10, 2)", normalLoadConfig, false), t, "EvalExpressionWithCalls")
|
||||||
|
|
||||||
for {
|
for {
|
||||||
returned += testCallConcurrentCheckReturns(p, t, gid1, gid2)
|
returned += testCallConcurrentCheckReturns(p, t, gid1, gid2)
|
||||||
|
@ -102,7 +102,7 @@ func (it *stackIterator) readSigtrampgoContext() (*op.DwarfRegisters, error) {
|
|||||||
case "arm64":
|
case "arm64":
|
||||||
return sigtrampContextDarwinARM64(it.mem, addr)
|
return sigtrampContextDarwinARM64(it.mem, addr)
|
||||||
default:
|
default:
|
||||||
return nil, errors.New("not implemnted")
|
return nil, errors.New("not implemented")
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return nil, errors.New("not implemented")
|
return nil, errors.New("not implemented")
|
||||||
|
@ -50,7 +50,7 @@ const (
|
|||||||
FloatIsNormal floatSpecial = iota
|
FloatIsNormal floatSpecial = iota
|
||||||
// FloatIsNaN means the float is a special NaN value.
|
// FloatIsNaN means the float is a special NaN value.
|
||||||
FloatIsNaN
|
FloatIsNaN
|
||||||
// FloatIsPosInf means the float is a special positive inifitiy value.
|
// FloatIsPosInf means the float is a special positive infinity value.
|
||||||
FloatIsPosInf
|
FloatIsPosInf
|
||||||
// FloatIsNegInf means the float is a special negative infinity value.
|
// FloatIsNegInf means the float is a special negative infinity value.
|
||||||
FloatIsNegInf
|
FloatIsNegInf
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
func TestConv(t *testing.T) {
|
func TestConv(t *testing.T) {
|
||||||
script := `
|
script := `
|
||||||
# A list global that we'll unmarhsal into a slice.
|
# A list global that we'll unmarshal into a slice.
|
||||||
x = [1,2]
|
x = [1,2]
|
||||||
`
|
`
|
||||||
globals, err := starlark.ExecFile(&starlark.Thread{}, "test.star", script, nil)
|
globals, err := starlark.ExecFile(&starlark.Thread{}, "test.star", script, nil)
|
||||||
|
@ -2176,7 +2176,7 @@ func TestVariablesLoading(t *testing.T) {
|
|||||||
checkChildren(t, tm, "tm", 1)
|
checkChildren(t, tm, "tm", 1)
|
||||||
ref = checkVarExact(t, tm, 0, "v", "", "[]map[string]main.astruct len: 1, cap: 1, [[...]]", "[]map[string]main.astruct", hasChildren)
|
ref = checkVarExact(t, tm, 0, "v", "", "[]map[string]main.astruct len: 1, cap: 1, [[...]]", "[]map[string]main.astruct", hasChildren)
|
||||||
if ref > 0 {
|
if ref > 0 {
|
||||||
// Auto-loading of fully missing map chidlren happens here, but they get trancated at MaxArrayValuess
|
// Auto-loading of fully missing map chidlren happens here, but they get trancated at MaxArrayValues
|
||||||
client.VariablesRequest(ref)
|
client.VariablesRequest(ref)
|
||||||
tmV := client.ExpectVariablesResponse(t)
|
tmV := client.ExpectVariablesResponse(t)
|
||||||
checkChildren(t, tmV, "tm.v", 1)
|
checkChildren(t, tmV, "tm.v", 1)
|
||||||
|
@ -2248,7 +2248,7 @@ func (d *Debugger) DumpWait(wait time.Duration) *proc.DumpState {
|
|||||||
return &d.dumpState
|
return &d.dumpState
|
||||||
}
|
}
|
||||||
|
|
||||||
// DumpCancel canels a dump in progress
|
// DumpCancel cancels a dump in progress
|
||||||
func (d *Debugger) DumpCancel() error {
|
func (d *Debugger) DumpCancel() error {
|
||||||
d.dumpState.Mutex.Lock()
|
d.dumpState.Mutex.Lock()
|
||||||
d.dumpState.Canceled = true
|
d.dumpState.Canceled = true
|
||||||
|
@ -2987,7 +2987,7 @@ func TestClientServer_createBreakpointWithID(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestClientServer_autoBreakpoints(t *testing.T) {
|
func TestClientServer_autoBreakpoints(t *testing.T) {
|
||||||
// Check that unrecoverd-panic and fatal-throw breakpoints are visible in
|
// Check that unrecovered-panic and fatal-throw breakpoints are visible in
|
||||||
// the breakpoint list.
|
// the breakpoint list.
|
||||||
protest.AllowRecording(t)
|
protest.AllowRecording(t)
|
||||||
withTestClient2("math", t, func(c service.Client) {
|
withTestClient2("math", t, func(c service.Client) {
|
||||||
|
Loading…
Reference in New Issue
Block a user