From: osandov@osandov.com (Omar Sandoval)
Subject: [PATCH] blktests: Use old variable check for Bash <4.2
Date: Mon, 6 May 2019 12:57:12 -0700 [thread overview]
Message-ID: <20190506195712.GC20450@vader> (raw)
In-Reply-To: <f2126a9f56ad65c58300b8b2216da7fcec081018.camel@intel.com>
On Mon, May 06, 2019@07:50:04PM +0000, Derrick, Jonathan wrote:
> On Mon, 2019-05-06@12:42 -0700, Omar Sandoval wrote:
> > On Fri, May 03, 2019@12:28:28PM -0600, Jon Derrick wrote:
> > > Bash 4.2 and above supports -v variable checks, which returns true
> > > for
> > > set or null. Instead use an older bashism that is compatible with
> > > bash
> > > 4.1 and earlier but only returns true if the variable is set non-
> > > null.
> > > This inherently adds a sanity check in case of null variables.
> >
> > Bart previous sent a patch for supporting bash 4.1, and according to
> > him, there were some further changes required:
> >
> > https://github.com/osandov/blktests/pull/42
> >
> > Either Bart's list of missing features was too big, or this patch
> > isn't
> > enough to support 4.1. If it's the latter, then this is a no-go,
> > because
> > Bart's change was too intrusive to be worth the hassle. If it's the
> > former, then this change isn't quite as bad, but I'm still not
> > excited
> > about supporting a 10 year old version of Bash.
>
>
> Mine is more than likely some franken-bash. I tested my changes alone
> on a 4.1.2 from RHEL 6.7. RHEL 6.10 is recently released so this
> version of Bash is certainly still in use.
Ah, I didn't realize RHEL was using that version. In that case, I'm
alright with this patch, since it's not quite as nasty as Bart's change.
Thanks!
prev parent reply other threads:[~2019-05-06 19:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 18:28 [PATCH] blktests: Use old variable check for Bash <4.2 Jon Derrick
2019-05-06 19:42 ` Omar Sandoval
2019-05-06 19:50 ` Derrick, Jonathan
2019-05-06 19:57 ` Omar Sandoval [this message]
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=20190506195712.GC20450@vader \
--to=osandov@osandov.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