From c406141231ada89c399c39dd52dd1e279c509f5c Mon Sep 17 00:00:00 2001 From: cui fliter Date: Tue, 18 Jul 2023 11:10:42 +0800 Subject: [PATCH] all: fix some typos Change-Id: Id4bf4ce8aee8b98baa2f1a9c62a72a9554f7d557 Reviewed-on: https://go-review.googlesource.com/c/sys/+/510595 TryBot-Result: Gopher Robot Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Run-TryBot: shuang cui Reviewed-by: Ian Lance Taylor Reviewed-by: Heschi Kreinick --- unix/syscall_internal_darwin_test.go | 4 ++-- unix/syscall_internal_linux_test.go | 2 +- windows/svc/svc_test.go | 10 +++++----- windows/syscall_windows_test.go | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/unix/syscall_internal_darwin_test.go b/unix/syscall_internal_darwin_test.go index 1ac089625..f7de07280 100644 --- a/unix/syscall_internal_darwin_test.go +++ b/unix/syscall_internal_darwin_test.go @@ -18,7 +18,7 @@ func Test_anyToSockaddr_darwin(t *testing.T) { err error }{ { - name: "AF_SYSTEM emtpy", + name: "AF_SYSTEM empty", rsa: sockaddrCtlToAny(RawSockaddrCtl{}), err: EAFNOSUPPORT, }, @@ -51,7 +51,7 @@ func Test_anyToSockaddr_darwin(t *testing.T) { }, }, { - name: "AF_VSOCK emtpy", + name: "AF_VSOCK empty", rsa: sockaddrVMToAny(RawSockaddrVM{}), err: EAFNOSUPPORT, }, diff --git a/unix/syscall_internal_linux_test.go b/unix/syscall_internal_linux_test.go index fd6d21915..d2aebe373 100644 --- a/unix/syscall_internal_linux_test.go +++ b/unix/syscall_internal_linux_test.go @@ -254,7 +254,7 @@ func Test_anyToSockaddr(t *testing.T) { proto: makeProto(^0), }, { - name: "AF_VSOCK emtpy", + name: "AF_VSOCK empty", rsa: sockaddrVMToAny(RawSockaddrVM{}), err: EAFNOSUPPORT, }, diff --git a/windows/svc/svc_test.go b/windows/svc/svc_test.go index 5d794e196..6439a06b2 100644 --- a/windows/svc/svc_test.go +++ b/windows/svc/svc_test.go @@ -163,7 +163,7 @@ func TestIsAnInteractiveSession(t *testing.T) { t.Fatal(err) } if !isInteractive { - t.Error("IsAnInteractiveSession retuns false when running interactively.") + t.Error("IsAnInteractiveSession returns false when running interactively.") } } @@ -173,7 +173,7 @@ func TestIsWindowsService(t *testing.T) { t.Fatal(err) } if isSvc { - t.Error("IsWindowsService retuns true when not running in a service.") + t.Error("IsWindowsService returns true when not running in a service.") } } @@ -206,7 +206,7 @@ func TestIsWindowsServiceWhenParentExits(t *testing.T) { msg = err.Error() } if isSvc { - msg = "IsWindowsService retuns true when not running in a service." + msg = "IsWindowsService returns true when not running in a service." } err = ioutil.WriteFile(dumpPath, []byte(msg), 0644) if err != nil { @@ -235,12 +235,12 @@ func TestIsWindowsServiceWhenParentExits(t *testing.T) { } time.Sleep(100 * time.Millisecond) if i > 10 { - t.Fatal("timed out waiting for child ouput file to be created.") + t.Fatal("timed out waiting for child output file to be created.") } } childOutput, err := ioutil.ReadFile(childDumpPath) if err != nil { - t.Fatalf("reading child ouput failed: %v", err) + t.Fatalf("reading child output failed: %v", err) } if got, want := string(childOutput), ""; got != want { t.Fatalf("child output: want %q, got %q", want, got) diff --git a/windows/syscall_windows_test.go b/windows/syscall_windows_test.go index 012944153..25f47ea53 100644 --- a/windows/syscall_windows_test.go +++ b/windows/syscall_windows_test.go @@ -226,7 +226,7 @@ func TestKnownFolderPath(t *testing.T) { func TestRtlGetVersion(t *testing.T) { version := windows.RtlGetVersion() major, minor, build := windows.RtlGetNtVersionNumbers() - // Go is not explictly added to the application compatibility database, so + // Go is not explicitly added to the application compatibility database, so // these two functions should return the same thing. if version.MajorVersion != major || version.MinorVersion != minor || version.BuildNumber != build { t.Fatalf("%d.%d.%d != %d.%d.%d", version.MajorVersion, version.MinorVersion, version.BuildNumber, major, minor, build)