1
0
mirror of https://github.com/golang/go synced 2024-11-18 13:04:46 -07:00

runtime: gofmt after CL 192937

CL 192937 introduced some changes which weren't properly gofmt'ed. Do so
now.

Change-Id: I2d2d57ea8a79fb41bc4ca59fa23f12198d615fd8
Reviewed-on: https://go-review.googlesource.com/c/go/+/196812
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Tobias Klauser 2019-09-25 08:48:26 +02:00 committed by Tobias Klauser
parent 7fc2625ef1
commit 8f5755e76e
2 changed files with 20 additions and 20 deletions

View File

@ -148,7 +148,7 @@ func TestVDSO(t *testing.T) {
output := runTestProg(t, "testprog", "SignalInVDSO")
want := "success\n"
if output != want {
t.Fatalf("output:\n%s\n\nwanted:\n%s", output, want);
t.Fatalf("output:\n%s\n\nwanted:\n%s", output, want)
}
}

View File

@ -19,37 +19,37 @@ func init() {
}
func signalInVDSO() {
f, err := ioutil.TempFile("", "timeprofnow")
if err != nil {
f, err := ioutil.TempFile("", "timeprofnow")
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)
}
}
if err := pprof.StartCPUProfile(f); err != nil {
if err := pprof.StartCPUProfile(f); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)
}
}
t0 := time.Now()
t1 := t0
// We should get a profiling signal 100 times a second,
// so running for 1 second should be sufficient.
for t1.Sub(t0) < time.Second {
t1 = time.Now()
}
t0 := time.Now()
t1 := t0
// We should get a profiling signal 100 times a second,
// so running for 1 second should be sufficient.
for t1.Sub(t0) < time.Second {
t1 = time.Now()
}
pprof.StopCPUProfile()
pprof.StopCPUProfile()
name := f.Name()
if err := f.Close(); err != nil {
name := f.Name()
if err := f.Close(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)
}
}
if err := os.Remove(name); err != nil {
if err := os.Remove(name); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)
}
}
fmt.Println("success");
fmt.Println("success")
}