summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaman <jason@perfinion.com>2014-06-27 16:07:04 +0400
committerAnthony G. Basile <blueness@gentoo.org>2014-06-27 08:26:20 -0400
commit275ca5400dfe6266a948da802aa19358b3475f95 (patch)
tree013692f500adaa7a03da57cd020e60041b25e2de
parentCorrectly determine dst path if src is in a dir (diff)
downloadelfix-275ca5400dfe6266a948da802aa19358b3475f95.tar.gz
elfix-275ca5400dfe6266a948da802aa19358b3475f95.tar.bz2
elfix-275ca5400dfe6266a948da802aa19358b3475f95.zip
misc/install-xattr: test used a dir that already existed
'f' was used by another test, do the test in a new dir instead so that there is no chance for a conflict Signed-off-by: Jason Zaman <jason@perfinion.com>
-rw-r--r--misc/install-xattr/Makefile2
-rwxr-xr-xmisc/install-xattr/checkcopyattrs.sh14
2 files changed, 8 insertions, 8 deletions
diff --git a/misc/install-xattr/Makefile b/misc/install-xattr/Makefile
index 7143f3f..0474569 100644
--- a/misc/install-xattr/Makefile
+++ b/misc/install-xattr/Makefile
@@ -14,7 +14,7 @@ install: install-xattr
check: checkcopyattrs.sh install-xattr
$(PWD)/checkcopyattrs.sh
- rm -rf a b c d e f g x y z backup-a* mode-a target-a target-install-xattr
+ rm -rf a b c d e f g h x y z backup-a* mode-a target-a target-install-xattr
clean:
rm -f *.o *~ install-xattr
diff --git a/misc/install-xattr/checkcopyattrs.sh b/misc/install-xattr/checkcopyattrs.sh
index 0249013..9196795 100755
--- a/misc/install-xattr/checkcopyattrs.sh
+++ b/misc/install-xattr/checkcopyattrs.sh
@@ -2,7 +2,7 @@
set -e
touch a b c
-mkdir -p d e f
+mkdir -p d e h
setfattr -n user.foo -v "bar" a
setfattr -n user.bas -v "x" a
setfattr -n user.pax.flags -v "mr" a
@@ -29,12 +29,12 @@ setfattr -n user.pax.flags -v "r" c
# This tests if the src file was inside a directory
# the correct dst location should be f/a. NOT f/d/a.
-./install-xattr d/a f
+./install-xattr d/a h
-[ -x f/a ]
-[ ! -x f/d/a ]
-[ "$(getfattr --only-values -n user.foo f/a)" == "bar" ]
-[ "$(getfattr --only-values -n user.bas f/a)" == "x" ]
+[ -x h/a ]
+[ ! -x h/d/a ]
+[ "$(getfattr --only-values -n user.foo h/a)" == "bar" ]
+[ "$(getfattr --only-values -n user.bas h/a)" == "x" ]
./install-xattr -t e a b c
@@ -87,4 +87,4 @@ setfattr -n user.pax.flags -v "r" c
# set SELinux security context of files and directories
# Okay, let's clean up after ourselves
-rm -rf a b c d e f g x y z backup-a* mode-a target-a target-install-xattr
+rm -rf a b c d e f g h x y z backup-a* mode-a target-a target-install-xattr