diff options
author | Jim Meyering <jim@meyering.net> | 2007-05-04 13:32:46 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-05-04 13:32:46 +0200 |
commit | 283dadf09520fcde40fe39d091694ff80bc28ee4 (patch) | |
tree | 1c659281c85bbc7b61226a673cbecc6fd7a845bb | |
parent | 3affac54ed4b0e2c3a2e0d350403b92a26a961b9 (diff) | |
download | coreutils-283dadf09520fcde40fe39d091694ff80bc28ee4.tar.xz |
Avoid test failure when run with an unusual umask.
* tests/ls/color-dtype-dir: Set umask to 022.
Suggestion from AIDA Shinra.
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | tests/ls/color-dtype-dir | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,9 @@ 2007-05-04 Jim Meyering <jim@meyering.net> + Avoid test failure when run with an unusual umask. + * tests/ls/color-dtype-dir: Set umask to 022. + Suggestion from AIDA Shinra. + Avoid failure of root-only test when run with a restrictive umask. * tests/rm/no-give-up: Ensure that non-root can access "d/" through root-owned ".". Reported by AIDA Shinra. diff --git a/tests/ls/color-dtype-dir b/tests/ls/color-dtype-dir index f3f9ee9fd..41c8bf3de 100755 --- a/tests/ls/color-dtype-dir +++ b/tests/ls/color-dtype-dir @@ -4,7 +4,7 @@ # directories the same as the first one -- but only on a file system # with dirent.d_type support. -# Copyright (C) 2006 Free Software Foundation, Inc. +# Copyright (C) 2006-2007 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,6 +33,9 @@ t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 +# Don't let a different umask perturb the results. +umask 22 + framework_failure=0 mkdir -p $tmp || framework_failure=1 cd $tmp || framework_failure=1 |