[PATCH STABLE] tests-subrepo-git: make the "pwned" message output in a stable order
Kevin Bullock
kbullock+mercurial at ringworld.org
Fri May 27 11:24:56 EDT 2016
> On May 26, 2016, at 19:47, danek.duvall at oracle.com wrote:
>
> # HG changeset patch
> # User Danek Duvall <danek.duvall at oracle.com>
> # Date 1464309643 25200
> # Thu May 26 17:40:43 2016 -0700
> # Branch stable
> # Node ID 821cafd65aac2b2199764acba0b1ede8d6e62b6e
> # Parent 89bba2beb03ea62e7fc8bcf3272e3cda1065ad89
> tests-subrepo-git: make the "pwned" message output in a stable order
>
> The "pwned" message from this test gets gets sent to stderr, and so gets
> emitted in different places from run to run in the rest of mercurial's
> output. This patch forces the message to go to a specific file instead,
> whose contents we can examine in a stable point in the test's execution.
>
> diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
> --- a/tests/test-subrepo-git.t
> +++ b/tests/test-subrepo-git.t
> @@ -1135,7 +1135,7 @@ make sure we show changed files, rather
> test for Git CVE-2016-3068
> $ hg init malicious-subrepository
> $ cd malicious-subrepository
> - $ echo "s = [git]ext::sh -c echo% pwned% >&2" > .hgsub
> + $ echo "s = [git]ext::sh -c echo% pwned% >pwned.txt" > .hgsub
We should check the contents of pwned.txt at each of these tests. And as timeless pointed out, it should be empty on a correct system.
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial-devel
mailing list