From: Zhu Yijun <zhuyijun@huawei.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andrew Jones <drjones@redhat.com>, <kvm@vger.kernel.org>,
<oscar.zhangbo@huawei.com>, Hangaohuai <hangaohuai@huawei.com>
Subject: Re: [question kvm-unit-tests] issue about exec
Date: Wed, 30 Mar 2016 10:54:17 +0800 [thread overview]
Message-ID: <56FB3FD9.6000202@huawei.com> (raw)
In-Reply-To: <56FA8679.9060609@redhat.com>
On 2016/3/29 21:43, Paolo Bonzini wrote:
>
>
> On 29/03/2016 14:03, Andrew Jones wrote:
>>>> I am running kvm-unit-tests, the Bash(version is low) on my server doesn't support the command 'exec', so I changed some codes in kvm-unit-tests.
>> Hmm, I didn't know there were bash versions w/out exec. Is your bash
>> really bash?
>
> It could be the "{fd}<foo" feature, which according to
> http://tiswww.case.edu/php/chet/bash/NEWS was introduced in 4.1:
>
> ----
> This is a terse description of the new features added to bash-4.1 since
> the release of bash-4.0.
>
> [...]
>
> p. If the optional left-hand-side of a redirection is of the form
> {var}, the shell assigns the file descriptor used to $var or uses $var
> as the file descriptor to move or close, depending on the redirection
> operator.
> ----
>
> Yijun, I think using "10" unconditionally would work (i.e. replace {fd}
> and $fd with 10).
>
Yes, it works. Thanks very much!
> Paolo
>
>>>>
>>>> diff --git a/scripts/functions.bash b/scripts/functions.bash
>>>> index f13fe6f..241ae0e 100644
>>>> --- a/scripts/functions.bash
>>>> +++ b/scripts/functions.bash
>>>> @@ -12,9 +12,10 @@ function for_each_unittest()
>>>> local check
>>>> local accel
>>>>
>>>> - exec {fd}<"$unittests"
>>>> + #exec {fd}<"$unittests"
>
>
next prev parent reply other threads:[~2016-03-30 2:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-28 11:11 [question kvm-unit-tests] issue about exec Zhu Yijun
2016-03-29 12:03 ` Andrew Jones
2016-03-29 13:43 ` Paolo Bonzini
2016-03-30 2:54 ` Zhu Yijun [this message]
2016-03-30 2:26 ` Zhu Yijun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56FB3FD9.6000202@huawei.com \
--to=zhuyijun@huawei.com \
--cc=drjones@redhat.com \
--cc=hangaohuai@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=oscar.zhangbo@huawei.com \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).