Re: [PATCH v2 1/1] config: learn the "hostname:" includeIf condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ignacio Encinas Rubio <ignacio@xxxxxxxxxxxx> writes:

> I can't think of any room for improvement other than integrating
> hostname (or a custom hostname) into git and using it in the tests, but
> I doubt it is worth it.

Ah, that is a thought.  We have t/helper that builds "test-tool"
just for that, and exposing the output of xhostname() does sounds
like a reasonable way to go.  It would roughly involve

 * Add t/helper/test-xhostname.c that defines cmd__xhostname() and
   writes the result of calling xhostname() to its standard output.

 * Plumb it through by adding it to a few places:

   - t/helper/test-tool.h wants the extern definition.
   - t/helper/test-tool.c wants it in its cmds[] array.
   - Makefile wants to list it in TEST_BUILTIN_OBJS

 * Then use "test-tool xhostname" in your tests, instead of
   "hostname".

You can run

    $ git grep chmtime ':!t/*.sh"

to find places that needed to be touched when a similar internal
tool "chmtime" was added.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux