public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] Sendfile01 : mc_gethost argument
@ 2014-05-06 22:48 C Nandi
  2014-05-29 13:40 ` chrubis
  0 siblings, 1 reply; 2+ messages in thread
From: C Nandi @ 2014-05-06 22:48 UTC (permalink / raw)
  To: ltp-list@lists.sourceforge.net

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

Hi,

Referring, http://www.gnu.org/software/bash/manual/bash.html  

    ${parameter:+word}
    If parameter is null or unset, nothing is substituted, otherwise the expansion of word is substituted.


As per the syntax of "mc_gethost" it accepts -d, -6 or -f.
    usage:  mc_gethost [-d] [-6] [-f] (hostname|ipaddr)

Hence, I guess, the following correction is required.

diff --git a/testcases/network/tcp_cmds/sendfile/sendfile01 b/testcases/network/tcp_cmds/sendfile/sendfile01
index 1598106..ad16290 100755
--- a/testcases/network/tcp_cmds/sendfile/sendfile01
+++ b/testcases/network/tcp_cmds/sendfile/sendfile01
@@ -61,7 +61,7 @@ do_setup()

     exists awk diff mc_gethost grep rsh stat

-    if ! IPADDR=$(mc_gethost ${EXEC_SUFFIX:+6} $RHOST | awk 'BEGIN { ec=1 } /addresses:/ {print $2; ec=0 } E
+    if ! IPADDR=$(mc_gethost ${EXEC_SUFFIX:+-6} $RHOST | awk 'BEGIN { ec=1 } /addresses:/ {print $2; ec=0 }
         # XXX (garrcoop): || exit 1 is there to prevent the test from hanging in the event of an install err
         end_testcase "Failed to determine the appropriate IP address for the machine." || exit 1
     fi





If you feel this is correct, please find the patch attached with this e-mail.

Thanks and Regards, 
CHANDRASHEKHAR NANDI    

[-- Attachment #2: 0001-sendfile01-Corrected-mc_gethost-argument.patch --]
[-- Type: application/octet-stream, Size: 1124 bytes --]

From 0a53544b618cf0303e39450a25d3532aacdf1135 Mon Sep 17 00:00:00 2001
From: Chandrashekhar Nandi <Chandrashekhar.Nandi@mphasis.com>
Date: Tue, 6 May 2014 16:36:51 -0600
Subject: [PATCH] sendfile01: Corrected mc_gethost argument

Signed-off-by: Chandrashekhar Nandi <Chandrashekhar.Nandi@mphasis.com>

diff --git a/testcases/network/tcp_cmds/sendfile/sendfile01 b/testcases/network/tcp_cmds/sendfile/sendfile01
index 1598106..ad16290 100755
--- a/testcases/network/tcp_cmds/sendfile/sendfile01
+++ b/testcases/network/tcp_cmds/sendfile/sendfile01
@@ -61,7 +61,7 @@ do_setup()
 
     exists awk diff mc_gethost grep rsh stat
 
-    if ! IPADDR=$(mc_gethost ${EXEC_SUFFIX:+6} $RHOST | awk 'BEGIN { ec=1 } /addresses:/ {print $2; ec=0 } END { exit ec }'); then
+    if ! IPADDR=$(mc_gethost ${EXEC_SUFFIX:+-6} $RHOST | awk 'BEGIN { ec=1 } /addresses:/ {print $2; ec=0 } END { exit ec }'); then
         # XXX (garrcoop): || exit 1 is there to prevent the test from hanging in the event of an install error.
         end_testcase "Failed to determine the appropriate IP address for the machine." || exit 1
     fi
-- 
1.7.10.4


[-- Attachment #3: Type: text/plain, Size: 346 bytes --]

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] Sendfile01 : mc_gethost argument
  2014-05-06 22:48 [LTP] Sendfile01 : mc_gethost argument C Nandi
@ 2014-05-29 13:40 ` chrubis
  0 siblings, 0 replies; 2+ messages in thread
From: chrubis @ 2014-05-29 13:40 UTC (permalink / raw)
  To: C Nandi; +Cc: ltp-list@lists.sourceforge.net

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2014-05-29 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 22:48 [LTP] Sendfile01 : mc_gethost argument C Nandi
2014-05-29 13:40 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox