Patchwork [2,of,2,fix-old-git,V2] tests: protect tests involving git ext::sh with git-ext-sh

login
register
mail settings
Submitter Sean Farley
Date June 19, 2017, midnight
Message ID <437d33723a6ef1cd58b4.1497830432@1.0.0.127.in-addr.arpa>
Download mbox | patch
Permalink /patch/21496/
State Accepted
Headers show

Comments

Sean Farley - June 19, 2017, midnight
# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1497572093 25200
#      Thu Jun 15 17:14:53 2017 -0700
# Branch fix-old-git
# Node ID 437d33723a6ef1cd58b4d0646adf3a5248102761
# Parent  8e8e4eb5d74ec4ed2ea59db3defa9819ddc0db8b
tests: protect tests involving git ext::sh with git-ext-sh
Augie Fackler - June 19, 2017, 1:25 a.m.
On Sun, Jun 18, 2017 at 05:00:32PM -0700, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean@farley.io>
> # Date 1497572093 25200
> #      Thu Jun 15 17:14:53 2017 -0700
> # Branch fix-old-git
> # Node ID 437d33723a6ef1cd58b4d0646adf3a5248102761
> # Parent  8e8e4eb5d74ec4ed2ea59db3defa9819ddc0db8b
> tests: protect tests involving git ext::sh with git-ext-sh

queued, thanks

Patch

diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
index a08f813..8829cdc 100644
--- a/tests/test-convert-git.t
+++ b/tests/test-convert-git.t
@@ -946,11 +946,11 @@  damage git repository by renaming a tree
   $ TREE_OBJ=72/49f083d2a63a41cc737764a86981eb5f3e4635
   $ mv git-repo4/.git/objects/$TREE_OBJ git-repo4/.git/objects/$TREE_OBJ.tmp
   $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:'
   abort: cannot read changes in 1c0ce3c5886f83a1d78a7b517cdff5cf9ca17bdd
 
-#if no-windows
+#if no-windows git19
 
 test for escaping the repo name (CVE-2016-3069)
 
   $ git init '`echo pwned >COMMAND-INJECTION`'
   Initialized empty Git repository in $TESTTMP/`echo pwned >COMMAND-INJECTION`/.git/
diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
index 2321bd3..4482f27 100644
--- a/tests/test-subrepo-git.t
+++ b/tests/test-subrepo-git.t
@@ -1135,10 +1135,12 @@  make sure we show changed files, rather 
   ? s/c.c
   ? s/cpp.cpp
   ? s/foobar.orig
   ? s/snake.python.orig
 
+#if git19
+
 test for Git CVE-2016-3068
   $ hg init malicious-subrepository
   $ cd malicious-subrepository
   $ echo "s = [git]ext::sh -c echo% pwned:% \$PWNED_MSG% >pwned.txt" > .hgsub
   $ git init s
@@ -1176,5 +1178,7 @@  whitelisting of ext should be respected 
   cloning subrepo s from ext::sh -c echo% pwned:% $PWNED_MSG% >pwned.txt
   abort: git clone error 128 in s (in subrepo s)
   [255]
   $ f -Dq pwned.txt
   pwned: you asked for it
+
+#endif