[LU-8052] test-framework change breaks test Created: 21/Apr/16  Updated: 27/Apr/16  Resolved: 27/Apr/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Blocker
Reporter: Bob Glossman (Inactive) Assignee: Bob Glossman (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The commit 7151367afdb04562f016c3002f0c614004552ad6 very recently landed to master for "LU-7130 test: sanity/162 doesn't handle DIR values properly" breaks test in some distros.

In particular it adds some uses of 'sed -E' to the test-framework.sh
On sles11sp4 (and maybe other distros too) '-E' isn't a valid option for sed. Trying to use it causes fatal errors. example:

sed: invalid option -- 'E'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  --follow-symlinks
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if extension supplied)
  -l N, --line-length=N
                 specify the desired line-wrap length for the `l' command
  --posix
                 disable all GNU extensions.
  -r, --regexp-extended
                 use extended regular expressions in the script.
  -s, --separate
                 consider files as separate rather than as a single continuous
                 long stream.
  -u, --unbuffered
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
      --help     display this help and exit
      --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

E-mail bug reports to: bonzini@gnu.org .
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.


 Comments   
Comment by Bob Glossman (Inactive) [ 21/Apr/16 ]

option isn't known on sles11sp4 or sles11sp3. seems to be honored everywhere else I can find. is there some reason '-E' is used in this case and not '-e' ?

Comment by Joseph Gmitter (Inactive) [ 21/Apr/16 ]

Hi Parinay,

Can you please explain why -E was used? From what I understand -E is a BSD compatible flag for -r. Any reason why we can't use -r instead?

Thanks.
Joe

Comment by Joseph Gmitter (Inactive) [ 21/Apr/16 ]

Hi Bob,

Could you try a test patch with -r instead of -E?

Thanks.
Joe

Comment by Bob Glossman (Inactive) [ 21/Apr/16 ]

http://review.whamcloud.com/19714

Comment by Bob Glossman (Inactive) [ 21/Apr/16 ]

Blocker for any test runs where testing on slles11, sp3 or sp4.
Right now blocking test and landing of LU-8023 and LU-7957

Comment by parinay v kondekar (Inactive) [ 22/Apr/16 ]

Bob, Joseph,
Apologies.
I didn't had sles setup to test the same and I agree '-r' is more correct here. Would be careful henceforth.Thanks.

Comment by parinay v kondekar (Inactive) [ 22/Apr/16 ]

From the sed GNU source for version 4.2.1 ( which is present on my test VMs)

289 >       /* Undocumented, for compatibility with BSD sed.  */
290 >       case 'E':
291 >       case 'r':
292 >         if (extended_regexp_flags)
293 >           usage(4);
294 >         extended_regexp_flags = REG_EXTENDED;
295 >         break;

so even if 'E' is not present in `sed --help` , it works. Should have used 'r'. my bad.

Comment by Joseph Gmitter (Inactive) [ 22/Apr/16 ]

Thanks for following up Parinay. Bob has a patch in flight above for the fix, so all will be well when we can get that landed.

Comment by Gerrit Updater [ 27/Apr/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/19714/
Subject: LU-8052 test: stop using unknonwn sed option
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 04490846ef9db8622482939a6bd1daa0714ba20e

Comment by Joseph Gmitter (Inactive) [ 27/Apr/16 ]

Landed for 2.9.0

Generated at Sat Feb 10 02:14:12 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.