public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] Replace "-E" option for sed.
@ 2013-04-16  8:09 shuang.qiu
  2013-04-16 11:20 ` chrubis
  0 siblings, 1 reply; 2+ messages in thread
From: shuang.qiu @ 2013-04-16  8:09 UTC (permalink / raw)
  To: ltp-list

From: Shuang Qiu <shuang.qiu@oracle.com>

The '-E' option is obsoleted and is no longer supported by sed in most
Linux distributions.  Use '-r' instead.
---
 .../kernel/syscalls/utimensat/utimensat_tests.sh   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
index 6776087..b8eba51 100755
--- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
+++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
@@ -260,7 +260,7 @@ fi
 pattern="[[:space:]]*Defaults[[:space:]]*requiretty.*"
 if grep -q "^${pattern}" $sudoers; then
 	tst_resm TINFO "Comment requiretty in $sudoers for automated testing systems"
-	if ! sed -E -i.$$ -e "s/^($pattern)/#\1/" $sudoers; then
+	if ! sed -r -i.$$ -e "s/^($pattern)/#\1/" $sudoers; then
 		tst_resm TBROK "failed to mangle $sudoers properly"
 		exit 1
 	fi
-- 
1.7.7


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
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] [PATCH] Replace "-E" option for sed.
  2013-04-16  8:09 [LTP] [PATCH] Replace "-E" option for sed shuang.qiu
@ 2013-04-16 11:20 ` chrubis
  0 siblings, 0 replies; 2+ messages in thread
From: chrubis @ 2013-04-16 11:20 UTC (permalink / raw)
  To: shuang.qiu; +Cc: ltp-list

Hi!
> The '-E' option is obsoleted and is no longer supported by sed in most
> Linux distributions.  Use '-r' instead.
> ---
>  .../kernel/syscalls/utimensat/utimensat_tests.sh   |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
> index 6776087..b8eba51 100755
> --- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
> +++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
> @@ -260,7 +260,7 @@ fi
>  pattern="[[:space:]]*Defaults[[:space:]]*requiretty.*"
>  if grep -q "^${pattern}" $sudoers; then
>  	tst_resm TINFO "Comment requiretty in $sudoers for automated testing systems"
> -	if ! sed -E -i.$$ -e "s/^($pattern)/#\1/" $sudoers; then
> +	if ! sed -r -i.$$ -e "s/^($pattern)/#\1/" $sudoers; then
>  		tst_resm TBROK "failed to mangle $sudoers properly"
>  		exit 1
>  	fi

Strangely enough both -E and -r were working on all my testing machines
but SLES9. Looking at bussybox documentation only -r is supported for
sed applet.

Commited, thanks.

(Please add Signed-off-by: line next time.)

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
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:[~2013-04-16 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16  8:09 [LTP] [PATCH] Replace "-E" option for sed shuang.qiu
2013-04-16 11:20 ` chrubis

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