Re: [PATCH v4 1/6] t9001: non order-sensitive file comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Samuel GROOT <samuel.groot@xxxxxxxxxxxxxxxx> writes:

> @@ -117,7 +124,7 @@ test_expect_success $PREREQ 'setup expect' '
>  '
>  
>  test_expect_success $PREREQ 'Verify commandline' '
> -	test_cmp expected commandline1
> +	test_cmp_noorder expected commandline1
>  '
>  
>  test_expect_success $PREREQ 'Send patches with --envelope-sender=auto' '

I think this comment applies to all the other hunk in this patch (I
didn't check very carefully though), but this is trying to see if
the command line arguments that drives send-email are like this (one
arg per line, enclosed in !! pairs for clarity):

	!patch@xxxxxxxxxxx!
	!-i!
	!nobody@xxxxxxxxxxx!
	!author@xxxxxxxxxxx!
	!one@xxxxxxxxxxx!
	!two@xxxxxxxxxxx!

when these addresses are given from the command line:

	git send-email \
        --envelope-sender="Patch Contributor <patch@xxxxxxxxxxx>" \
        --suppress-cc=sob \
        --from="Example <nobody@xxxxxxxxxxx>" \
        --to=nobody@xxxxxxxxxxx \
        --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors

that creates something like

$TRASH_DIRECTORY/fake.sendmail -f patch@xxxxxxxxxxx -i \
  nobody@xxxxxxxxxxx author@xxxxxxxxxxx one@xxxxxxxxxxx two@xxxxxxxxxxx

(all on a single line).

The earliest address patch@xxxxxxxxxxx and later addresses have
quite different meaning (the first one is meant to be the envelope
sender address, and does not name a recipient). While I think it is
a good idea to tell the test that the order of recipient addresses
given to the sendmail command (i.e. nobody, author, one and two)
does not matter by comparing sorted list of addresses, sorting the
whole argument list and comparing is making the test _too_ loose.
Don't you want to catch a potential bug that adds the envelope
sender address to the list of recipients by mistake, for example?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]