diff options
author | Icarus Sparry <golang@icarus.freeuk.com> | 2010-01-26 13:16:03 -0800 |
---|---|---|
committer | Icarus Sparry <golang@icarus.freeuk.com> | 2010-01-26 13:16:03 -0800 |
commit | 0aca4e2791114e23c926b22638f66c4423c4e627 (patch) | |
tree | f978c779ce24f15eefce7111c4f2d86cee1178ca /src/pkg/patch/patch_test.go | |
parent | c7316136bf2cf1cdeb51c8da609fcc0a9ca07323 (diff) | |
download | golang-0aca4e2791114e23c926b22638f66c4423c4e627.tar.gz |
os: in test, allow Hostname to return FQDN even if /bin/hostname does not
Hostname reads the file /proc/sys/kernel/hostname to determine
the value it returns. Some people set this to a Fully Qualified
Doamin Name. At least one implementation of /bin/hostname
truncates the name it gets (often from the "uname" system call)
at the first dot unless it is given a "-f" flag. This change makes
the unit test also truncate at the first dot and checks if the strings
then match. This seems more portable than adding an extra flag
to the called /bin/hostname program.
R=rsc
CC=golang-dev
http://codereview.appspot.com/181097
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/pkg/patch/patch_test.go')
0 files changed, 0 insertions, 0 deletions