git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* t4204-patch-id failures
@ 2016-05-23 16:30 Armin Kunaschik
  2016-05-23 20:47 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Armin Kunaschik @ 2016-05-23 16:30 UTC (permalink / raw)
  To: Git List

Hello,

I see 3 test failures in t4202:

expecting success:
        test_patch_id_file_order irrelevant --stable --stable

Already on 'same'
cmp: cannot open patch-id_ordered-ordered-order---stable-irrelevant
not ok 7 - file order is irrelevant with --stable
#
#               test_patch_id_file_order irrelevant --stable --stable
#

expecting success:
        test_patch_id_file_order relevant --unstable --unstable

Already on 'same'
cmp: cannot open patch-id_ordered-ordered-order---unstable-relevant
[..]

expecting success:
        test_config patchid.stable true &&
        test_patch_id irrelevant patchid.stable=true

Already on 'same'
cmp: cannot open patch-id_ordered-ordered-order-patchid.stable=true-irrelevant
not ok 10 - patchid.stable = true is stable
#
#               test_config patchid.stable true &&
#               test_patch_id irrelevant patchid.stable=true
#
[..]

expecting success:
        test_config patchid.stable false &&
        test_patch_id irrelevant patchid.stable=false--stable --stable

Already on 'same'
cmp: cannot open
patch-id_ordered-ordered-order-patchid.stable=false--stable-irrelevant
not ok 13 - --stable overrides patchid.stable = false
#
#               test_config patchid.stable false &&
#               test_patch_id irrelevant patchid.stable=false--stable --stable
#


Please notice the double "ordered"!
From my point of view there is a problem in the function
calc_patch_id() which changes
the variable $name and causes the test to fail.

Essentially it's working like this:
<snip>
#!/bin/bash

func1() {
        name=${1}
        echo "func1 name=$name"
}

func2() {
        name=${1}
        echo "func2 name=$name"
        func1 "ordered-$name"
        echo "func2 again name=$name"
}

func2 foo
<snip>
which prints in bash, ksh88 and ksh93 on Linux and AIX the same
func2 name=foo
func1 name=ordered-foo
func2 again name=ordered-foo

I wonder if those 3 tests ever worked... and why? :-)

A suggested patch would be to rename $name inside calc_patch_id into
something else
except $name... e.g. $pname.

Armin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-23 22:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 16:30 t4204-patch-id failures Armin Kunaschik
2016-05-23 20:47 ` Junio C Hamano
2016-05-23 22:23   ` Junio C Hamano
2016-05-23 22:56     ` Armin Kunaschik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).