coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: fix syntax error in setuidgid_has_perm_


From: Bernhard Voelker
Subject: [PATCH] tests: fix syntax error in setuidgid_has_perm_
Date: Thu, 01 Nov 2012 16:58:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2

Somehow in between the discussion about
  "Various tests give illusory results"
  http://lists.gnu.org/archive/html/coreutils/2012-08/msg00082.html
a syntax error snuck into the sed expression in setuidgid_has_perm_.

Several root tests have been skipped although they
could and should have been run.

Have a nice day,
Berny


>From b60b96bdc4c83479c4accf623d436647d3de9651 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <address@hidden>
Date: Thu, 1 Nov 2012 16:50:51 +0100
Subject: [PATCH] tests: fix syntax error in setuidgid_has_perm_

An invalid sed expression lead to the following error:
  + sed -n 'ls/.* //p'
  sed: -e expression #1, char 2: extra characters after command
Use "one" instead of "el".
Bug introduced in v8.19-111-g51a4b04.

* init.cfg (setuidgid_has_perm_): s/ls/1s/.
* NEWS (Build-related): Mention the fix.
---
 NEWS     |    5 +++++
 init.cfg |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 3b40375..85f3003 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,11 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   build failure when building from modified sources, as is common practice
   for a patched distribution package.

+  The check in the root-only tests to test whether our dummy user,
+  $NON_ROOT_USERNAME, is able to run binaries from the build directory
+  failed. As a result, these tests have been skipped unnecessarily.
+  [bug introduced in coreutils-8.20]
+

 * Noteworthy changes in release 8.20 (2012-10-23) [stable]

diff --git a/init.cfg b/init.cfg
index 304b918..e853b0a 100644
--- a/init.cfg
+++ b/init.cfg
@@ -352,7 +352,7 @@ setuidgid_has_perm_()
 {
   local rm_version=$(
     setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
-    sed -n 'ls/.* //p'
+    sed -n '1s/.* //p'
   )
   case ":$rm_version:" in
       :$PACKAGE_VERSION:) ;;
-- 
1.7.7





reply via email to

[Prev in Thread] Current Thread [Next in Thread]