* Evily override gethostname(3) so trimdomain always gets the same result. * This makes the tests much easier to write and less likely to fail on * oddly configured systems. */
| 48 | * oddly configured systems. |
| 49 | */ |
| 50 | int |
| 51 | gethostname(char *name, size_t namelen) |
| 52 | { |
| 53 | if (strlcpy(name, TESTFQDN, namelen) > namelen) { |
| 54 | errno = ENAMETOOLONG; |
| 55 | return (-1); |
| 56 | } |
| 57 | return (0); |
| 58 | } |
| 59 | |
| 60 | void |
| 61 | testit(const char *input, int hostsize, const char *output, const char *test) |
no test coverage detected