From 6d5cfeb757da524ed88bff55b2ee4e58b593641e Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 5 Oct 2013 23:27:20 +0300 Subject: [PATCH] Minor fixes. * src/names.c: Include argp.h * tests/testsuite.at (AT_XATTRS_UTILS_PREREQ) (AT_SELINUX_UTILS_PREREQ,AT_ACLS_UTILS_PREREQ) (AT_CAPABILITIES_UTILS_PREREQ) (AT_XATTRS_PREREQ,AT_SELINUX_PREREQ) (AT_ACLS_PREREQ): Use POSIX-compatible syntax for mktemp. * tests/incr08.at: Fix find usage. --- src/names.c | 1 + tests/incr08.at | 2 +- tests/testsuite.at | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/names.c b/src/names.c index 32403b3..eecb9b0 100644 --- a/src/names.c +++ b/src/names.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "common.h" diff --git a/tests/incr08.at b/tests/incr08.at index 5210d28..863581c 100644 --- a/tests/incr08.at +++ b/tests/incr08.at @@ -48,7 +48,7 @@ mkdir foo/subdir/dir1 mkdir subdir mkdir subdir/dir2 decho A -find|sort +find .|sort decho B DIR=`pwd` diff --git a/tests/testsuite.at b/tests/testsuite.at index b481302..1aab6f7 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -125,31 +125,31 @@ m4_define([AT_CHECK_UTIL],[ ]) m4_define([AT_XATTRS_UTILS_PREREQ],[ - file=$( mktemp -p . ) + file=$(TMPDIR=. mktemp fiXXXXXX) AT_CHECK_UTIL(setfattr -n user.test -v test $file,0) AT_CHECK_UTIL(getfattr $file,0) ]) m4_define([AT_SELINUX_UTILS_PREREQ],[ - file=$( mktemp -p . ) + file=$(TMPDIR=. mktemp fiXXXXXX) AT_CHECK_UTIL(restorecon $file, 0) AT_CHECK_UTIL(chcon -h --user=unconfined_u $file,0) rm -rf $file ]) m4_define([AT_ACLS_UTILS_PREREQ],[ - file=$( mktemp -p . ) + file=$(TMPDIR=. mktemp fiXXXXXX) AT_CHECK_UTIL(setfacl -m u:$UID:rwx $file,0) AT_CHECK_UTIL(getfacl $file,0) rm -rf $file ]) m4_define([AT_CAPABILITIES_UTILS_PREREQ],[ - file=$( mktemp -p . ) + file=$(TMPDIR=. mktemp fiXXXXXX) AT_CHECK_UTIL(setcap "= cap_chown=ei" $file,0) AT_CHECK_UTIL(getcap $file,0) rm -rf $file ]) m4_define([AT_XATTRS_PREREQ],[ AT_XATTRS_UTILS_PREREQ - file=$( mktemp -p . ) + file=$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v ahoj $file # check whether tar fails to store xattrs err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) @@ -159,7 +159,7 @@ m4_define([AT_XATTRS_PREREQ],[ ]) m4_define([AT_SELINUX_PREREQ],[ AT_SELINUX_UTILS_PREREQ - file=$( mktemp -p . ) + file=$(TMPDIR=. mktemp fiXXXXXX) err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) if test "$err" != "0"; then AT_SKIP_TEST @@ -167,7 +167,7 @@ m4_define([AT_SELINUX_PREREQ],[ ]) m4_define([AT_ACLS_PREREQ],[ AT_ACLS_UTILS_PREREQ - file=$( mktemp -p . ) + file=$(TMPDIR=. mktemp fiXXXXXX) setfacl -m u:$UID:rwx $file err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) if test "$err" != "0"; then -- 2.45.2