From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Mon, 12 Nov 2018 21:37:23 +0100 Subject: [LTP] [PATCH v3 1/2] net: Add tst_net_run helper In-Reply-To: References: <20181108142409.4955-1-pvorel@suse.cz> Message-ID: <20181112203723.GC13928@dell5510> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi Alexey, > > + [ -n "$safe" ] && ROD $cmd || sh -c "$cmd" > ^ > just $cmd? Yes, sh -c does not work for shell functions unless are exported (tst_test_drivers() in next commit is a shell function). I somehow overlooked it. But sh -c is used for all test links in tst_rhost_run(), I guess we don't want to do export -f FUNCNAME for all functions in tst_net.sh, do we? > > + > > + cmd="$cmd $rparams $@" > ^ > So, now it is "$cmd $lparams $@", we need to store $1 in a separate variable. Good catch, thx! Kind regards, Petr