Home | History | Annotate | Download | only in os

Lines Matching refs:Hostname

1234 	// Run /bin/hostname and collect output.
1240 p, err := StartProcess("/bin/hostname", []string{"hostname"}, &ProcAttr{Files: []*File{nil, w, Stderr}})
1250 t.Fatalf("run hostname Wait: %v", err)
1254 t.Errorf("expected an error from Kill running 'hostname'")
1268 hostname, err := Hostname()
1272 cmd := osexec.Command("hostname")
1275 t.Fatalf("Failed to execute hostname command: %v %s", err, out)
1278 if hostname != want {
1279 t.Fatalf("Hostname() = %q, want %q", hostname, want)
1284 // There is no other way to fetch hostname on windows, but via winapi.
1285 // On Plan 9 it can be taken from #c/sysname as Hostname() does.
1288 t.Skipf("%s doesn't have /bin/hostname", runtime.GOOS)
1296 // Check internal Hostname() against the output of /bin/hostname.
1297 // Allow that the internal Hostname returns a Fully Qualified Domain Name
1298 // and the /bin/hostname only returns the first component
1299 hostname, err := Hostname()
1303 want := run(t, []string{"/bin/hostname"})
1304 if hostname != want {
1305 i := strings.Index(hostname, ".")
1306 if i < 0 || hostname[0:i] != want {
1307 t.Errorf("Hostname() = %q, want %q", hostname, want)