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

Re: [PATCH] t3411: Fix test 1 for case-insensitive file systems

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Feb 3, 2009, 17:43 UTC
Message-ID
<5FE034E8-422F-4692-AD37-5633C91A4B98@silverinsanity.com>
In-Reply-To
<alpine.DEB.1.00.0902031817260.6573@intel-tinevez-2-302>
On Feb 3, 2009, at 12:18 PM, Johannes Schindelin wrote:
Show 19 quoted lines
> On Tue, 3 Feb 2009, Brian Gernhardt wrote:
>
>> On Feb 3, 2009, at 11:53 AM, Johannes Schindelin wrote:
>>
>>> Besides, I think that my latest comment still stands there:  
>>> testing is not
>>> good enough, code inspection is required if something expects the  
>>> file
>>> names as they used to be.
>>
>> As far as I can tell, no test relies on the auto-generated name of  
>> the test
>> file.  In fact, only t3411 uses that feature at all and it only  
>> performs
>> operations on commits.  All other uses of test_commit give a  
>> filename (even
>> though many of them don't appear to use the file).
>
> You did not look far.

If there's something I missed, could you perhaps say what it is instead of being cryptic? I have a day job and am attempting to squeeze in searching for this between tasks. This fix (or similar) needs to make it into master so that the tests can run on case- insensitive file systems.

I used git grep to find uses of test_commit in next, and the only uses that did not provide a file name argument were in t3411. I read through every test in the file, and the only operations I saw were test_commit, test_merge, checkout -b, reset without filenames, rebase, and rev-parse. All operations on commits, not files.

The tests all run properly, and I've run t3411 individually (since it's apparently the only one using this feature) using -v to ensure that it was actually performing work and it seems to be.

So, based on the above, every usage of test_commit either provides a file name or does not care about the names of the files. Unless you have something that says it isn't, I'd like to see the fix Junio gave applied (repeated here as a reminder):

On Jan 29, 2009, at 12:19 PM, Junio C Hamano wrote:
Show 13 quoted lines
> diff --git c/t/test-lib.sh w/t/test-lib.sh
> index c1839f7..8066c25 100644
> --- c/t/test-lib.sh
> +++ w/t/test-lib.sh
> @@ -201,7 +201,7 @@ test_tick () {
> # Both <file> and <contents> default to <message>.
>
> test_commit () {
> -	file=${2:-$(echo "$1" | tr 'A-Z' 'a-z')}
> +	file=${2:-$(echo "$1" | tr 'A-Z' 'a-z').t}
> 	echo "${3-$1}" > "$file" &&
> 	git add "$file" &&
> 	test_tick &&
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 10 of 17 in “t3411: Fix test 1 for case-insensitive file systems”
  1. t3411: Fix test 1 for case-insensitive file systemsBrian Gernhardt, Jan 29, 2009
  2. Johannes SchindelinJan 29, 2009
  3. Junio C HamanoJan 29, 2009
  4. Johannes SchindelinJan 29, 2009
  5. Brian GernhardtJan 29, 2009
  6. Brian GernhardtFeb 3, 2009
  7. Johannes SchindelinFeb 3, 2009
  8. Brian GernhardtFeb 3, 2009
  9. Johannes SchindelinFeb 3, 2009
  10. Brian GernhardtFeb 3, 2009
  11. Johannes SchindelinFeb 3, 2009
  12. Brian GernhardtFeb 3, 2009
  13. Junio C HamanoFeb 3, 2009
  14. Brian GernhardtFeb 3, 2009
  15. Johannes SchindelinFeb 3, 2009
  16. Johannes SchindelinFeb 3, 2009
  17. Junio C HamanoFeb 4, 2009

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.