Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failpoint in anonymous function can not be enable #43

Closed
lysu opened this issue Jul 1, 2019 · 0 comments
Closed

failpoint in anonymous function can not be enable #43

lysu opened this issue Jul 1, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@lysu
Copy link
Collaborator

lysu commented Jul 1, 2019

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
package testpkg

import (
	"fmt"
	
	"github.com/pingcap/failpoint"
)

func test() {
	func() {
		failpoint.Inject("testPoint", func() {
			fmt.Println()
		})
	}()
}

then failpoint-ctl enable~

  1. What did you expect to see?
func test() {
	func() {
		if _, ok := failpoint.Eval(_curpkg_("testPoint")); ok {
			fmt.Println()
		}
	}()
}
  1. What did you see instead?
func test() {
	func() {
		failpoint.Inject("testPoint", func() {
			fmt.Println()
		})
	}()
}
  1. Versions of the failpoint

failpoint-ctl version (run failpoint-ctl -V):

ReleaseVersion None
BuildTS None
GitHash None
GitBranch None
GoVersion None

newest tidb master 
@lysu lysu added the bug Something isn't working label Jul 1, 2019
@lysu lysu changed the title failpoint in anonymous donation can not be enable failpoint in anonymous function can not be enable Jul 1, 2019
@lonng lonng closed this as completed Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants