git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Armin Kunaschik <megabreit@googlemail.com>
To: Git List <git@vger.kernel.org>
Subject: t4204-patch-id failures
Date: Mon, 23 May 2016 18:30:38 +0200	[thread overview]
Message-ID: <CALR6jEgf_FiGWs=45+n8uzKEiXU7yKDsP+CjOUAWu1CnUXZbPw@mail.gmail.com> (raw)

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

             reply	other threads:[~2016-05-23 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 16:30 Armin Kunaschik [this message]
2016-05-23 20:47 ` t4204-patch-id failures Junio C Hamano
2016-05-23 22:23   ` Junio C Hamano
2016-05-23 22:56     ` Armin Kunaschik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALR6jEgf_FiGWs=45+n8uzKEiXU7yKDsP+CjOUAWu1CnUXZbPw@mail.gmail.com' \
    --to=megabreit@googlemail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).