{"thread":{"id":"6137","subject":"t9200-git-cvsexportcommit.sh failed on CYGWIN","startedAt":"2006-12-28T03:23:22Z","lastAt":"2006-12-29T01:58:00Z","messageCount":4,"participants":["SungHyun Nam","Jakub Narebski","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"30399","messageId":"459338AA.8000407@gmail.com","threadId":"6137","inReplyTo":null,"subject":"t9200-git-cvsexportcommit.sh failed on CYGWIN","fromName":"SungHyun Nam","fromEmail":"goweol@gmail.com","sentAt":"2006-12-28T03:23:22Z","receivedAt":"2006-12-28T03:23:22Z","isPatch":false,"sender":{"key":"goweol@gmail.com","avatar":null},"body":"Hello,\n\nBelow is the test messages.\n\nBTW, I hope I can define 'NO_CVS_TESTS' to skip this test.\n\nThanks,\nnamsh\n\n$ ./t9200-git-cvsexportcommit.sh\nInitialized empty Git repository in .git/\nCreated initial commit 15322570c631afb497138bc0c3d155f793535d35\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 empty\n*   ok 1: New file\n*   ok 2: Remove two files, add two and update two\n*   ok 3: Fail to change binary more than one generation old\n*   ok 4: Remove only binary files\n*   ok 5: Remove only a text file\n*   ok 6: New file with spaces in file name\n*   ok 7: Update file with spaces in file name\n* FAIL 8: File with non-ascii file name\n        mkdir -p\nÅ/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö &&\n              echo Foo\n>Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/gårdetsågårdet.txt\n&&\n              git add\nÅ/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/gårdetsågårdet.txt\n&&\n              cp ../test9200a.png\nÅ/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/gårdetsågårdet.png\n&&\n              git add\nÅ/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/gårdetsågårdet.png\n&&\n              git commit -a -m \"Går det så går det\" && \\\n              id=$(git rev-list --max-count=1 HEAD) &&\n              (cd \"$CVSWORK\" &&\n              git-cvsexportcommit -v -c $id &&\n              test \"$(echo $(sort\nÅ/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/CVS/Entries|cut\n-d/ -f2,3,5))\" = \"gårdetsågårdet.png/1.1/-kb gårdetsågårdet.txt/1.1/\"\n              )\n*   ok 9: Mismatching patch should fail\n*   ok 10: Retain execute bit\n* failed 1 among 10 test(s)\n"},{"id":"30438","messageId":"en0b47$bjm$3@sea.gmane.org","threadId":"6137","inReplyTo":"459338AA.8000407@gmail.com","subject":"Re: t9200-git-cvsexportcommit.sh failed on CYGWIN","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-28T11:54:29Z","receivedAt":"2006-12-28T11:54:29Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"[Cc: git@vger.kernel.org]\n\nSungHyun Nam wrote:\n\n> Below is the test messages.\n> \n> BTW, I hope I can define 'NO_CVS_TESTS' to skip this test.\n[...]\n> *   ok 7: Update file with spaces in file name\n> * FAIL 8: File with non-ascii file name\n>         mkdir -p\n\nWhat filesystem? Some filesystems are just broken...\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"30448","messageId":"4594565B.3090804@gmail.com","threadId":"6137","inReplyTo":"en0b47$bjm$3@sea.gmane.org","subject":"Re: t9200-git-cvsexportcommit.sh failed on CYGWIN","fromName":"SungHyun Nam","fromEmail":"goweol@gmail.com","sentAt":"2006-12-28T23:42:19Z","receivedAt":"2006-12-28T23:42:19Z","isPatch":false,"sender":{"key":"goweol@gmail.com","avatar":null},"body":"Jakub Narebski wrote:\n> [Cc: git@vger.kernel.org]\n> \n> SungHyun Nam wrote:\n> \n>> Below is the test messages.\n>>\n>> BTW, I hope I can define 'NO_CVS_TESTS' to skip this test.\n> [...]\n>> *   ok 7: Update file with spaces in file name\n>> * FAIL 8: File with non-ascii file name\n>>         mkdir -p\n> \n> What filesystem? Some filesystems are just broken...\n\nNTFS (no FAT32 here).\n\nAnyway, I test it step by step manually, and then...\n\n$ cd tmp; mkdir t; cd t\n$ ls -l\ntotal 0\n$ mkdir -p Å/goo\nmkdir: cannot create directory `Å/goo': No such file or directory\n$ ls -l\ntotal 0\n$ mkdir Å\nmkdir: cannot create directory `Å': File exists\n$ ls -l\ntotal 0\n\nI can create directory which contains Hangul (multibyte) characters.\n\n$ mkdir ko_한글_lang\n$ ls -l\ntotal 0\ndrwxr-xr-x+ 2 namsh staff 0 Dec 29 08:41 ko_한글_lang/\n\nDoes it depend on Windows version? I use Korean version of Windows Home\nEdition. I also test it with 'CYGWIN=codepage:ansi' without luck.\n\nThanks,\nnamsh\n"},{"id":"30455","messageId":"7vpsa3sbtj.fsf@assigned-by-dhcp.cox.net","threadId":"6137","inReplyTo":"4594565B.3090804@gmail.com","subject":"Re: t9200-git-cvsexportcommit.sh failed on CYGWIN","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-29T01:58:00Z","receivedAt":"2006-12-29T01:58:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SungHyun Nam <goweol@gmail.com> writes:\n\n> Jakub Narebski wrote:\n> ...\n>> What filesystem? Some filesystems are just broken...\n>\n> NTFS (no FAT32 here).\n> ...\n> $ mkdir -p Å/goo\n> mkdir: cannot create directory `Å/goo': No such file or directory\n\nSungHyun Nam <goweol@gmail.com> writes:\n\n> Jakub Narebski wrote:\n>> SungHyun Nam wrote:\n>> \n>>> Below is the test messages.\n>>>\n>>> BTW, I hope I can define 'NO_CVS_TESTS' to skip this test.\n>> ...\n>> What filesystem? Some filesystems are just broken...\n>\n> NTFS (no FAT32 here).\n>\n> Anyway, I test it step by step manually, and then...\n>\n> $ cd tmp; mkdir t; cd t\n> $ ls -l\n> total 0\n> $ mkdir -p Å/goo\n> mkdir: cannot create directory `Å/goo': No such file or directory\n\nSome filesystems cannot use arbitrary sequence of non NUL bytes\nas pathnames.\n\nIt would be handy to have a way to skip tests that the user\nknows would not pass on his particular system.\n\nI do not think that such a request should be named NO_CVS_TESTS,\nthough.  It is not like NO_SVN_TESTS where your system does not\nhave svn installed.  I think even on hanglized NTFS, CVS\noperations on pathnames that use only portable pathname\ncharacters should work.\n\nI am considering doing this instead...\n\n-- >8 --\nGIT_SKIP_TESTS: allow users to omit tests that are know to break\n\nIn some environments, certain tests have no way of succeeding\ndue to platform limitation, such as lack of 'unzip' program, or\nfilesystem that do not allow arbitrary sequence of non-NUL bytes\nas pathnames.\n\nYou should be able to say something like\n\n\t$ cd t\n\t$ GIT_SKIP_TESTS=t9200.8 t9200-git-cvsexport-commit.sh\n\nand even:\n\n\t$ GIT_SKIP_TESTS='t[0-4]??? t91?? t9200.8' make test\n\nto omit such tests.  The value of the environment variable is a\nSP separated list of patterns that tells which tests to skip,\nand either can match the \"t[0-9]{4}\" part to skip the whole\ntest, or t[0-9]{4} followed by \".$number\" to say which\nparticular test to skip.\n\nNote that some tests in the existing test suite rely on previous\ntest item, so you cannot arbitrarily disable one and expect the\nremainder of test to check what the test originally was intended\nto check.\n\n---\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex ad2b6f6..98f69d8 100755\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -125,16 +125,43 @@ test_run_ () {\n \treturn 0\n }\n \n+test_skip () {\n+\tthis_test=$(expr \"./$0\" : '.*/\\(t[0-9]*\\)-[^/]*$')\n+\tthis_test=\"$this_test.$(expr \"$test_count\" + 1)\"\n+\tto_skip=\n+\tfor skp in $GIT_SKIP_TESTS\n+\tdo\n+\t\tcase \"$this_test\" in\n+\t\t$skp)\n+\t\t\tto_skip=t\n+\t\tesac\n+\tdone\n+\tcase \"$to_skip\" in\n+\tt)\n+\t\tsay >&3 \"skipping test: $@\"\n+\t\ttest_count=$(expr \"$test_count\" + 1)\n+\t\tsay \"skip $test_count: $1\"\n+\t\t: true\n+\t\t;;\n+\t*)\n+\t\tfalse\n+\t\t;;\n+\tesac\n+}\n+\n test_expect_failure () {\n \ttest \"$#\" = 2 ||\n \terror \"bug in the test script: not 2 parameters to test-expect-failure\"\n-\tsay >&3 \"expecting failure: $2\"\n-\ttest_run_ \"$2\"\n-\tif [ \"$?\" = 0 -a \"$eval_ret\" != 0 -a \"$eval_ret\" -lt 129 ]\n+\tif ! test_skip \"$@\"\n \tthen\n-\t\ttest_ok_ \"$1\"\n-\telse\n-\t\ttest_failure_ \"$@\"\n+\t\tsay >&3 \"expecting failure: $2\"\n+\t\ttest_run_ \"$2\"\n+\t\tif [ \"$?\" = 0 -a \"$eval_ret\" != 0 -a \"$eval_ret\" -lt 129 ]\n+\t\tthen\n+\t\t\ttest_ok_ \"$1\"\n+\t\telse\n+\t\t\ttest_failure_ \"$@\"\n+\t\tfi\n \tfi\n \techo >&3 \"\"\n }\n@@ -142,13 +169,16 @@ test_expect_failure () {\n test_expect_success () {\n \ttest \"$#\" = 2 ||\n \terror \"bug in the test script: not 2 parameters to test-expect-success\"\n-\tsay >&3 \"expecting success: $2\"\n-\ttest_run_ \"$2\"\n-\tif [ \"$?\" = 0 -a \"$eval_ret\" = 0 ]\n+\tif ! test_skip \"$@\"\n \tthen\n-\t\ttest_ok_ \"$1\"\n-\telse\n-\t\ttest_failure_ \"$@\"\n+\t\tsay >&3 \"expecting success: $2\"\n+\t\ttest_run_ \"$2\"\n+\t\tif [ \"$?\" = 0 -a \"$eval_ret\" = 0 ]\n+\t\tthen\n+\t\t\ttest_ok_ \"$1\"\n+\t\telse\n+\t\t\ttest_failure_ \"$@\"\n+\t\tfi\n \tfi\n \techo >&3 \"\"\n }\n@@ -156,13 +186,16 @@ test_expect_success () {\n test_expect_code () {\n \ttest \"$#\" = 3 ||\n \terror \"bug in the test script: not 3 parameters to test-expect-code\"\n-\tsay >&3 \"expecting exit code $1: $3\"\n-\ttest_run_ \"$3\"\n-\tif [ \"$?\" = 0 -a \"$eval_ret\" = \"$1\" ]\n+\tif ! test_skip \"$@\"\n \tthen\n-\t\ttest_ok_ \"$2\"\n-\telse\n-\t\ttest_failure_ \"$@\"\n+\t\tsay >&3 \"expecting exit code $1: $3\"\n+\t\ttest_run_ \"$3\"\n+\t\tif [ \"$?\" = 0 -a \"$eval_ret\" = \"$1\" ]\n+\t\tthen\n+\t\t\ttest_ok_ \"$2\"\n+\t\telse\n+\t\t\ttest_failure_ \"$@\"\n+\t\tfi\n \tfi\n \techo >&3 \"\"\n }\n@@ -223,3 +256,22 @@ test=trash\n rm -fr \"$test\"\n test_create_repo $test\n cd \"$test\"\n+\n+this_test=$(expr \"./$0\" : '.*/\\(t[0-9]*\\)-[^/]*$')\n+for skp in $GIT_SKIP_TESTS\n+do\n+\tto_skip=\n+\tfor skp in $GIT_SKIP_TESTS\n+\tdo\n+\t\tcase \"$this_test\" in\n+\t\t$skp)\n+\t\t\tto_skip=t\n+\t\tesac\n+\tdone\n+\tcase \"$to_skip\" in\n+\tt)\n+\t\tsay >&3 \"skipping test $this_test altogether\"\n+\t\tsay \"skip all tests in $this_test\"\n+\t\ttest_done\n+\tesac\n+done\n"}]}