All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] host01.sh: Allow to overwrite the default hostname
@ 2020-12-11  7:15 Petr Vorel
  2020-12-14 11:21 ` Alexey Kodanev
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2020-12-11  7:15 UTC (permalink / raw)
  To: ltp

Using hostname for test requires DNS setup.
Allow to set hostname (e.g. github.com) via $HOSTNAME in case host not
set. This restores the old behavior (the legacy API version used $RHOST).

Suggested-by: Petr Cervinka <pcervinka@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/network/tcp_cmds/host/host01.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/network/tcp_cmds/host/host01.sh b/testcases/network/tcp_cmds/host/host01.sh
index 662afe8b4..e6d8d4d06 100755
--- a/testcases/network/tcp_cmds/host/host01.sh
+++ b/testcases/network/tcp_cmds/host/host01.sh
@@ -12,7 +12,7 @@ TST_NEEDS_CMDS="awk host hostname"
 
 do_test()
 {
-	local lhost="$(hostname)"
+	local lhost="${HOSTNAME:-$(hostname)}"
 	local addr
 
 	tst_res TINFO "test basic functionality of the host command"
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH 1/1] host01.sh: Allow to overwrite the default hostname
  2020-12-11  7:15 [LTP] [PATCH 1/1] host01.sh: Allow to overwrite the default hostname Petr Vorel
@ 2020-12-14 11:21 ` Alexey Kodanev
  2020-12-14 13:47   ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Kodanev @ 2020-12-14 11:21 UTC (permalink / raw)
  To: ltp

On 11.12.2020 10:15, Petr Vorel wrote:
> Using hostname for test requires DNS setup.
> Allow to set hostname (e.g. github.com) via $HOSTNAME in case host not
> set. This restores the old behavior (the legacy API version used $RHOST).
> 
> Suggested-by: Petr Cervinka <pcervinka@suse.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/network/tcp_cmds/host/host01.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Alexey Kodanev <alexey.kodanev@oracle.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH 1/1] host01.sh: Allow to overwrite the default hostname
  2020-12-14 11:21 ` Alexey Kodanev
@ 2020-12-14 13:47   ` Petr Vorel
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2020-12-14 13:47 UTC (permalink / raw)
  To: ltp

Hi Alexey,

> On 11.12.2020 10:15, Petr Vorel wrote:
> > Using hostname for test requires DNS setup.
> > Allow to set hostname (e.g. github.com) via $HOSTNAME in case host not
> > set. This restores the old behavior (the legacy API version used $RHOST).

> > Suggested-by: Petr Cervinka <pcervinka@suse.com>
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> >  testcases/network/tcp_cmds/host/host01.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)

> Acked-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Thanks! Merged.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-14 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11  7:15 [LTP] [PATCH 1/1] host01.sh: Allow to overwrite the default hostname Petr Vorel
2020-12-14 11:21 ` Alexey Kodanev
2020-12-14 13:47   ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.