[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Acl-devel] [PATCH] correct sed RE pattern in the test cases
From: |
zhe.he |
Subject: |
[Acl-devel] [PATCH] correct sed RE pattern in the test cases |
Date: |
Tue, 1 Mar 2016 16:55:42 +0800 |
From: He Zhe <address@hidden>
Escape "\" and "." in sed RE pattern in the test cases respectively. Otherwise
the pattern would be "s/.$//g" after the perl script's handling and thus would
wrongly filter the last charactor in rwx permission, if selinux is disabled.
Signed-off-by: He Zhe <address@hidden>
---
test/cp.test | 2 +-
test/misc.test | 6 +++---
test/sbits-restore.test | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/test/cp.test b/test/cp.test
index 0867f63..9c88a50 100644
--- a/test/cp.test
+++ b/test/cp.test
@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
> -rw-rw-r--+
$ cp f g
- $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
+ $ ls -l g | awk -- '{ print $1 }' | sed 's/\\\.$//g'
> -rw-r--r--
$ rm g
diff --git a/test/misc.test b/test/misc.test
index 53ae5b0..b1fe4e3 100644
--- a/test/misc.test
+++ b/test/misc.test
@@ -254,7 +254,7 @@ Add some users and groups
Symlink in directory with default ACL?
$ ln -s d d/l
- $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d/l | awk '{print $1}' | sed 's/\\\.$//g'
> lrwxrwxrwx
$ ls -dl -L d/l | awk '{print $1}'
@@ -343,7 +343,7 @@ Remove the default ACL
Reset to base entries
$ setfacl -b d
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\\.$//g'
> drwxr-x---
$ getfacl --omit-header d
@@ -355,7 +355,7 @@ Reset to base entries
Now, chmod should change the group_obj entry
$ chmod 775 d
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\\.$//g'
> drwxrwxr-x
$ getfacl --omit-header d
diff --git a/test/sbits-restore.test b/test/sbits-restore.test
index de21340..b98672f 100644
--- a/test/sbits-restore.test
+++ b/test/sbits-restore.test
@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
$ touch d/g
$ touch d/u
$ setfacl --restore d.acl
- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d | awk '{print $1}' | sed 's/\\\.$//g'
> drwxr-xr-t
- $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d/u | awk '{print $1}' | sed 's/\\\.$//g'
> -rwSr--r--
- $ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
+ $ ls -dl d/g | awk '{print $1}' | sed 's/\\\.$//g'
> -rw-r-Sr--
$ rm -Rf d
--
1.9.1
- [Acl-devel] [PATCH] correct sed RE pattern in the test cases,
zhe.he <=