git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/7] t/t1304-default-acl: change from skip_all=* to prereq skip

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 10, 2010, 19:52 UTC
Message-ID
<1281469968-25670-2-git-send-email-avarab@gmail.com>
In-Reply-To
<1281469968-25670-1-git-send-email-avarab@gmail.com>

Change this test to skip test with test prerequisites, and to do setup work in tests. This improves the skipped statistics on platforms where the test isn't run.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t1304-default-acl.sh |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
index 97ab02a..0e6cb4f 100755
--- a/t/t1304-default-acl.sh
+++ b/t/t1304-default-acl.sh
@@ -18,11 +18,14 @@ umask 077
 setfacl_out="$(setfacl -m u:root:rwx . 2>&1)"
 setfacl_ret=$?
 
-if [ $setfacl_ret != 0 ]; then
-	skip_all="Skipping ACL tests: unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
-	test_done
+if test $setfacl_ret != 0
+then
+	say "Unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
+else
+	test_set_prereq SETFACL
 fi
 
+
 check_perms_and_acl () {
 	test -r "$1" &&
 	getfacl "$1" > actual &&
@@ -34,7 +37,7 @@ check_perms_and_acl () {
 
 dirs_to_set="./ .git/ .git/objects/ .git/objects/pack/"
 
-test_expect_success 'Setup test repo' '
+test_expect_success SETFACL 'Setup test repo' '
 	setfacl -m d:u::rwx,d:g::---,d:o:---,d:m:rwx $dirs_to_set &&
 	setfacl -m m:rwx               $dirs_to_set &&
 	setfacl -m u:root:rwx          $dirs_to_set &&
@@ -46,12 +49,12 @@ test_expect_success 'Setup test repo' '
 	git commit -m "init"
 '
 
-test_expect_success 'Objects creation does not break ACLs with restrictive umask' '
+test_expect_success SETFACL 'Objects creation does not break ACLs with restrictive umask' '
 	# SHA1 for empty blob
 	check_perms_and_acl .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
 '
 
-test_expect_success 'git gc does not break ACLs with restrictive umask' '
+test_expect_success SETFACL 'git gc does not break ACLs with restrictive umask' '
 	git gc &&
 	check_perms_and_acl .git/objects/pack/*.pack
 '
-- 
1.7.2.1.295.gd03d
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 2 of 25 in “tests: use skip_all=* to skip tests”
  1. 0/7 tests: use skip_all=* to skip testsÆvar Arnfjörð Bjarmason, Aug 10, 2010
  2. 1/7 t/t1304-default-acl: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  3. 2/7 t/t5705-clone-2gb: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  4. Junio C HamanoAug 11, 2010
  5. 3/7 t/t7005-editor: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  6. 4/7 t/t5503-tagfollow: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  7. Junio C HamanoAug 11, 2010
  8. Ævar Arnfjörð BjarmasonAug 11, 2010
  9. Junio C HamanoAug 12, 2010
  10. Johannes SixtAug 11, 2010
  11. 5/7 t/t4016-diff-quote: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  12. Junio C HamanoAug 11, 2010
  13. 6/7 t/t3902-quoted: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  14. 7/7 t/t3300-funny-names: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  15. Junio C HamanoAug 11, 2010
  16. 0/7 tests: use skip_all=* to skip testsÆvar Arnfjörð Bjarmason, Aug 11, 2010
  17. case where diff output needs improving? (was Re: [PATCH v2 0/7] tests: use skip_all=* to skip tests)Raja R Harinath, Aug 12, 2010
  18. Ævar Arnfjörð BjarmasonAug 12, 2010
  19. 1/7 t/t1304-default-acl: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  20. 2/7 t/t5705-clone-2gb: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  21. 3/7 t/t7005-editor: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  22. 4/7 t/t5503-tagfollow: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  23. 5/7 t/t4016-diff-quote: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  24. 6/7 t/t3902-quoted: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  25. 7/7 t/t3300-funny-names: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.