• Icarus Sparry's avatar
    os: in test, allow Hostname to return FQDN even if /bin/hostname does not · 090e71e7
    Icarus Sparry authored
    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
    https://golang.org/cl/181097
    090e71e7
Name
Last commit
Last update
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
pkg Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...