Commit 8f5755e7 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

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: default avatarIan Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 7fc2625e
......@@ -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)
}
}
......
......@@ -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")
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment