test: Detect *lots* of bugs by adding non-alnum to trash dir names
cover test: Detect *lots* of bugs by adding non-alnum to trash dir names
There's a patch now on the ML for an issue with read v.s. read -r in submodule revealed when the submodule name contains a \.
That fix is fine, but we should do better and structurally arrange our tests to detect these sorts of issues before they're reported.
This series changes the test library so that we interpolate the result of:
perl -e 'print join q[], grep { /[^[:alnum:]]/ and !m<[./]> } map chr, 0x01..0x7f'Into the trash directory name we generate. Doing this makes 30% of the test suite fail. Most of the diffstat below is just adding:
test_fails_on_unusual_directory_names=1
To those tests that failed, which makes them not use these garbage trash directory names.
Some of those failures are legitimate bugs, some are an artifact of us using shellscripting as our test language (namely interpolating ' and " somewhere).
It might make sense to mark these tests more granularly, e.g.:
test_fails_on_unusual_directory_name_types=quotes
etc., if the test fails just because of " or ', but I think as it is this makes sense for inclusion, it makes sure we don't regress on the remaining 70% of our test suite.
Ævar Arnfjörð Bjarmason (2):
tests: mark tests that fail when the TEST_DIRECTORY is unusual
test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY
name
t/README | 12 ++++++++++++ t/t0000-basic.sh | 2 ++ t/t0003-attributes.sh | 1 + t/t0021-conversion.sh | 1 + t/t0060-path-utils.sh | 1 + t/t0300-credentials.sh | 1 + t/t0302-credential-store.sh | 1 + t/t1006-cat-file.sh | 1 + t/t1013-read-tree-submodule.sh | 1 + t/t1020-subdirectory.sh | 1 + t/t1050-large.sh | 1 + t/t1060-object-corruption.sh | 1 + t/t1300-repo-config.sh | 1 + t/t1305-config-include.sh | 1 + t/t1308-config-set.sh | 1 + t/t1309-early-config.sh | 1 + t/t1500-rev-parse.sh | 1 + t/t1504-ceiling-dirs.sh | 1 + t/t1507-rev-parse-upstream.sh | 1 + t/t1510-repo-setup.sh | 1 + t/t1515-rev-parse-outside-repo.sh | 1 + t/t2013-checkout-submodule.sh | 1 + t/t2025-worktree-add.sh | 1 + t/t2027-worktree-list.sh | 1 + t/t2028-worktree-move.sh | 1 + t/t3040-subprojects-basic.sh | 1 + t/t3050-subprojects-fetch.sh | 1 + t/t3409-rebase-preserve-merges.sh | 1 + t/t3426-rebase-submodule.sh | 1 + t/t3501-revert-cherry-pick.sh | 1 + t/t3512-cherry-pick-submodule.sh | 1 + t/t3513-revert-submodule.sh | 1 + t/t3600-rm.sh | 1 + t/t3900-i18n-commit.sh | 1 + t/t3906-stash-submodule.sh | 1 + t/t4027-diff-submodule.sh | 1 + t/t4030-diff-textconv.sh | 1 + t/t4031-diff-rewrite-binary.sh | 1 + t/t4035-diff-quiet.sh | 1 + t/t4041-diff-submodule-option.sh | 1 + t/t4059-diff-submodule-not-initialized.sh | 1 + t/t4060-diff-submodule-option-diff-format.sh | 1 + t/t4137-apply-submodule.sh | 1 + t/t4203-mailmap.sh | 1 + t/t4207-log-decoration-colors.sh | 1 + t/t4255-am-submodule.sh | 1 + t/t5000-tar-tree.sh | 1 + t/t5001-archive-attr.sh | 1 + t/t5002-archive-attr-pattern.sh | 1 + t/t5003-archive-zip.sh | 1 + t/t5150-request-pull.sh | 1 + t/t5300-pack-object.sh | 1 + t/t5304-prune.sh | 1 + t/t5305-include-tag.sh | 1 + t/t5306-pack-nobase.sh | 1 + t/t5310-pack-bitmaps.sh | 1 + t/t5311-pack-bitmaps-shallow.sh | 1 + t/t5400-send-pack.sh | 1 + t/t5401-update-hooks.sh | 1 + t/t5402-post-merge-hook.sh | 1 + t/t5403-post-checkout-hook.sh | 1 + t/t5404-tracking-branches.sh | 1 + t/t5406-remote-rejects.sh | 1 + t/t5407-post-rewrite-hook.sh | 1 + t/t5500-fetch-pack.sh | 1 + t/t5501-fetch-push-alternates.sh | 1 + t/t5502-quickfetch.sh | 1 + t/t5505-remote.sh | 1 + t/t5509-fetch-push-namespaces.sh | 1 + t/t5510-fetch.sh | 1 + t/t5512-ls-remote.sh | 1 + t/t5514-fetch-multiple.sh | 1 + t/t5515-fetch-merge-logic.sh | 1 + t/t5516-fetch-push.sh | 1 + t/t5519-push-alternates.sh | 1 + t/t5520-pull.sh | 1 + t/t5521-pull-options.sh | 1 + t/t5522-pull-symlink.sh | 1 + t/t5524-pull-msg.sh | 1 + t/t5525-fetch-tagopt.sh | 1 + t/t5526-fetch-submodules.sh | 1 + t/t5527-fetch-odd-refs.sh | 1 + t/t5531-deep-submodule-push.sh | 1 + t/t5533-push-cas.sh | 1 + t/t5535-fetch-push-symref.sh | 1 + t/t5536-fetch-conflicts.sh | 1 + t/t5537-fetch-shallow.sh | 1 + t/t5538-push-shallow.sh | 1 + t/t5539-fetch-http-shallow.sh | 1 + t/t5540-http-push-webdav.sh | 1 + t/t5541-http-push-smart.sh | 1 + t/t5542-push-http-shallow.sh | 1 + t/t5544-pack-objects-hook.sh | 1 + t/t5545-push-options.sh | 1 + t/t5547-push-quarantine.sh | 1 + t/t5550-http-fetch-dumb.sh | 1 + t/t5551-http-fetch-smart.sh | 1 + t/t5560-http-backend-noserver.sh | 1 + t/t5561-http-backend.sh | 1 + t/t5570-git-daemon.sh | 1 + t/t5572-pull-submodule.sh | 1 + t/t5600-clone-fail-cleanup.sh | 1 + t/t5601-clone.sh | 1 + t/t5604-clone-reference.sh | 1 + t/t5605-clone-local.sh | 1 + t/t5606-clone-options.sh | 1 + t/t5609-clone-branch.sh | 1 + t/t5610-clone-detached.sh | 1 + t/t5611-clone-config.sh | 1 + t/t5612-clone-refspec.sh | 1 + t/t5613-info-alternate.sh | 1 + t/t5614-clone-submodules.sh | 1 + t/t5615-alternate-env.sh | 1 + t/t5801-remote-helpers.sh | 1 + t/t5802-connect-helper.sh | 1 + t/t5810-proto-disable-local.sh | 1 + t/t5812-proto-disable-http.sh | 1 + t/t5813-proto-disable-ssh.sh | 1 + t/t5814-proto-disable-ext.sh | 1 + t/t5815-submodule-protos.sh | 1 + t/t5900-repo-selection.sh | 1 + t/t6008-rev-list-submodule.sh | 1 + t/t6030-bisect-porcelain.sh | 1 + t/t6040-tracking-info.sh | 1 + t/t6041-bisect-submodule.sh | 1 + t/t6050-replace.sh | 1 + t/t6060-merge-index.sh | 1 + t/t6134-pathspec-in-submodule.sh | 1 + t/t6200-fmt-merge-msg.sh | 1 + t/t6500-gc.sh | 1 + t/t7001-mv.sh | 1 + t/t7003-filter-branch.sh | 1 + t/t7005-editor.sh | 1 + t/t7006-pager.sh | 1 + t/t7008-grep-binary.sh | 1 + t/t7010-setup.sh | 1 + t/t7064-wtstatus-pv2.sh | 1 + t/t7103-reset-bare.sh | 1 + t/t7112-reset-submodule.sh | 1 + t/t7300-clean.sh | 1 + t/t7400-submodule-basic.sh | 1 + t/t7402-submodule-rebase.sh | 1 + t/t7403-submodule-sync.sh | 1 + t/t7405-submodule-merge.sh | 1 + t/t7406-submodule-update.sh | 1 + t/t7407-submodule-foreach.sh | 1 + t/t7408-submodule-reference.sh | 1 + t/t7409-submodule-detached-work-tree.sh | 1 + t/t7410-submodule-checkout-to.sh | 1 + t/t7411-submodule-config.sh | 1 + t/t7413-submodule-is-active.sh | 1 + t/t7504-commit-msg-hook.sh | 1 + t/t7506-status-submodule.sh | 1 + t/t7507-commit-verbose.sh | 1 + t/t7517-per-repo-email.sh | 1 + t/t7613-merge-submodule.sh | 1 + t/t7700-repack.sh | 1 + t/t7800-difftool.sh | 1 + t/t7810-grep.sh | 1 + t/t7814-grep-recurse-submodules.sh | 1 + t/t9001-send-email.sh | 1 + t/t9020-remote-svn.sh | 1 + t/t9100-git-svn-basic.sh | 1 + t/t9101-git-svn-props.sh | 1 + t/t9102-git-svn-deep-rmdir.sh | 1 + t/t9103-git-svn-tracked-directory-removed.sh | 1 + t/t9104-git-svn-follow-parent.sh | 1 + t/t9105-git-svn-commit-diff.sh | 1 + t/t9106-git-svn-commit-diff-clobber.sh | 1 + t/t9107-git-svn-migrate.sh | 1 + t/t9108-git-svn-glob.sh | 1 + t/t9109-git-svn-multi-glob.sh | 1 + t/t9110-git-svn-use-svm-props.sh | 1 + t/t9114-git-svn-dcommit-merge.sh | 1 + t/t9115-git-svn-dcommit-funky-renames.sh | 1 + t/t9116-git-svn-log.sh | 1 + t/t9117-git-svn-init-clone.sh | 1 + t/t9118-git-svn-funky-branch-names.sh | 1 + t/t9120-git-svn-clone-with-percent-escapes.sh | 1 + t/t9122-git-svn-author.sh | 1 + t/t9123-git-svn-rebuild-with-rewriteroot.sh | 1 + t/t9124-git-svn-dcommit-auto-props.sh | 1 + t/t9125-git-svn-multi-glob-branch-names.sh | 1 + t/t9127-git-svn-partial-rebuild.sh | 1 + t/t9128-git-svn-cmd-branch.sh | 1 + t/t9129-git-svn-i18n-commitencoding.sh | 1 + t/t9131-git-svn-empty-symlink.sh | 1 + t/t9132-git-svn-broken-symlink.sh | 1 + t/t9133-git-svn-nested-git-repo.sh | 1 + t/t9134-git-svn-ignore-paths.sh | 1 + t/t9137-git-svn-dcommit-clobber-series.sh | 1 + t/t9138-git-svn-authors-prog.sh | 1 + t/t9140-git-svn-reset.sh | 1 + t/t9141-git-svn-multiple-branches.sh | 1 + t/t9142-git-svn-shallow-clone.sh | 1 + t/t9143-git-svn-gc.sh | 1 + t/t9144-git-svn-old-rev_map.sh | 1 + t/t9145-git-svn-master-branch.sh | 1 + t/t9146-git-svn-empty-dirs.sh | 1 + t/t9147-git-svn-include-paths.sh | 1 + t/t9148-git-svn-propset.sh | 1 + t/t9150-svk-mergetickets.sh | 1 + t/t9151-svn-mergeinfo.sh | 1 + t/t9153-git-svn-rewrite-uuid.sh | 1 + t/t9154-git-svn-fancy-glob.sh | 1 + t/t9155-git-svn-fetch-deleted-tag.sh | 1 + t/t9156-git-svn-fetch-deleted-tag-2.sh | 1 + t/t9157-git-svn-fetch-merge.sh | 1 + t/t9158-git-svn-mergeinfo.sh | 1 + t/t9159-git-svn-no-parent-mergeinfo.sh | 1 + t/t9160-git-svn-preserve-empty-dirs.sh | 1 + t/t9161-git-svn-mergeinfo-push.sh | 1 + t/t9162-git-svn-dcommit-interactive.sh | 1 + t/t9163-git-svn-reset-clears-caches.sh | 1 + t/t9164-git-svn-dcommit-concurrent.sh | 1 + t/t9165-git-svn-fetch-merge-branch-of-branch.sh | 1 + t/t9166-git-svn-fetch-merge-branch-of-branch2.sh | 1 + t/t9167-git-svn-cmd-branch-subproject.sh | 1 + t/t9168-git-svn-partially-globbed-names.sh | 1 + t/t9200-git-cvsexportcommit.sh | 1 + t/t9300-fast-import.sh | 1 + t/t9350-fast-export.sh | 1 + t/t9400-git-cvsserver-server.sh | 1 + t/t9401-git-cvsserver-crlf.sh | 1 + t/t9402-git-cvsserver-refs.sh | 1 + t/t9500-gitweb-standalone-no-errors.sh | 1 + t/t9502-gitweb-standalone-parse-output.sh | 1 + t/t9600-cvsimport.sh | 1 + t/t9601-cvsimport-vendor-branch.sh | 1 + t/t9602-cvsimport-branches-tags.sh | 1 + t/t9604-cvsimport-timestamps.sh | 1 + t/t9700-perl-git.sh | 1 + t/t9902-completion.sh | 1 + t/test-lib.sh | 4 ++++ 234 files changed, 249 insertions(+)
Signature · 1 line
2.11.0
PATCH 1/2 tests: mark tests that fail when the TEST_DIRECTORY is unusual
Mark tests that fail when the TEST_DIRECTORY has a name that's unusual, i.e. contains control characters, various punctuation etc.
This change is followed by a change that adds the code that picks up test_fails_on_unusual_directory_names to test-lib.sh, but comes before that change to not break most of the test suite during bisecting.
This change is the result of:
for f in $(grep -B3 last_fail_time .prove |grep sh | perl -pe 's/^ (.*?):/$1/');
do perl -0666 -pi -e 's/^(test_description)/test_fails_on_unusual_directory_names=1\n$1/m' $f
doneAfter running the test suite with the aforementioned change to test-lib.sh. The only exception is t0000-basic.sh, since its testing the test suite itself its failing 'test --verbose' test needs a change to the test suite wrapper code to be excluded.
--- t/t0000-basic.sh | 2 ++ t/t0003-attributes.sh | 1 + t/t0021-conversion.sh | 1 + t/t0060-path-utils.sh | 1 + t/t0300-credentials.sh | 1 + t/t0302-credential-store.sh | 1 + t/t1006-cat-file.sh | 1 + t/t1013-read-tree-submodule.sh | 1 + t/t1020-subdirectory.sh | 1 + t/t1050-large.sh | 1 + t/t1060-object-corruption.sh | 1 + t/t1300-repo-config.sh | 1 + t/t1305-config-include.sh | 1 + t/t1308-config-set.sh | 1 + t/t1309-early-config.sh | 1 + t/t1500-rev-parse.sh | 1 + t/t1504-ceiling-dirs.sh | 1 + t/t1507-rev-parse-upstream.sh | 1 + t/t1510-repo-setup.sh | 1 + t/t1515-rev-parse-outside-repo.sh | 1 + t/t2013-checkout-submodule.sh | 1 + t/t2025-worktree-add.sh | 1 + t/t2027-worktree-list.sh | 1 + t/t2028-worktree-move.sh | 1 + t/t3040-subprojects-basic.sh | 1 + t/t3050-subprojects-fetch.sh | 1 + t/t3409-rebase-preserve-merges.sh | 1 + t/t3426-rebase-submodule.sh | 1 + t/t3501-revert-cherry-pick.sh | 1 + t/t3512-cherry-pick-submodule.sh | 1 + t/t3513-revert-submodule.sh | 1 + t/t3600-rm.sh | 1 + t/t3900-i18n-commit.sh | 1 + t/t3906-stash-submodule.sh | 1 + t/t4027-diff-submodule.sh | 1 + t/t4030-diff-textconv.sh | 1 + t/t4031-diff-rewrite-binary.sh | 1 + t/t4035-diff-quiet.sh | 1 + t/t4041-diff-submodule-option.sh | 1 + t/t4059-diff-submodule-not-initialized.sh | 1 + t/t4060-diff-submodule-option-diff-format.sh | 1 + t/t4137-apply-submodule.sh | 1 + t/t4203-mailmap.sh | 1 + t/t4207-log-decoration-colors.sh | 1 + t/t4255-am-submodule.sh | 1 + t/t5000-tar-tree.sh | 1 + t/t5001-archive-attr.sh | 1 + t/t5002-archive-attr-pattern.sh | 1 + t/t5003-archive-zip.sh | 1 + t/t5150-request-pull.sh | 1 + t/t5300-pack-object.sh | 1 + t/t5304-prune.sh | 1 + t/t5305-include-tag.sh | 1 + t/t5306-pack-nobase.sh | 1 + t/t5310-pack-bitmaps.sh | 1 + t/t5311-pack-bitmaps-shallow.sh | 1 + t/t5400-send-pack.sh | 1 + t/t5401-update-hooks.sh | 1 + t/t5402-post-merge-hook.sh | 1 + t/t5403-post-checkout-hook.sh | 1 + t/t5404-tracking-branches.sh | 1 + t/t5406-remote-rejects.sh | 1 + t/t5407-post-rewrite-hook.sh | 1 + t/t5500-fetch-pack.sh | 1 + t/t5501-fetch-push-alternates.sh | 1 + t/t5502-quickfetch.sh | 1 + t/t5505-remote.sh | 1 + t/t5509-fetch-push-namespaces.sh | 1 + t/t5510-fetch.sh | 1 + t/t5512-ls-remote.sh | 1 + t/t5514-fetch-multiple.sh | 1 + t/t5515-fetch-merge-logic.sh | 1 + t/t5516-fetch-push.sh | 1 + t/t5519-push-alternates.sh | 1 + t/t5520-pull.sh | 1 + t/t5521-pull-options.sh | 1 + t/t5522-pull-symlink.sh | 1 + t/t5524-pull-msg.sh | 1 + t/t5525-fetch-tagopt.sh | 1 + t/t5526-fetch-submodules.sh | 1 + t/t5527-fetch-odd-refs.sh | 1 + t/t5531-deep-submodule-push.sh | 1 + t/t5533-push-cas.sh | 1 + t/t5535-fetch-push-symref.sh | 1 + t/t5536-fetch-conflicts.sh | 1 + t/t5537-fetch-shallow.sh | 1 + t/t5538-push-shallow.sh | 1 + t/t5539-fetch-http-shallow.sh | 1 + t/t5540-http-push-webdav.sh | 1 + t/t5541-http-push-smart.sh | 1 + t/t5542-push-http-shallow.sh | 1 + t/t5544-pack-objects-hook.sh | 1 + t/t5545-push-options.sh | 1 + t/t5547-push-quarantine.sh | 1 + t/t5550-http-fetch-dumb.sh | 1 + t/t5551-http-fetch-smart.sh | 1 + t/t5560-http-backend-noserver.sh | 1 + t/t5561-http-backend.sh | 1 + t/t5570-git-daemon.sh | 1 + t/t5572-pull-submodule.sh | 1 + t/t5600-clone-fail-cleanup.sh | 1 + t/t5601-clone.sh | 1 + t/t5604-clone-reference.sh | 1 + t/t5605-clone-local.sh | 1 + t/t5606-clone-options.sh | 1 + t/t5609-clone-branch.sh | 1 + t/t5610-clone-detached.sh | 1 + t/t5611-clone-config.sh | 1 + t/t5612-clone-refspec.sh | 1 + t/t5613-info-alternate.sh | 1 + t/t5614-clone-submodules.sh | 1 + t/t5615-alternate-env.sh | 1 + t/t5801-remote-helpers.sh | 1 + t/t5802-connect-helper.sh | 1 + t/t5810-proto-disable-local.sh | 1 + t/t5812-proto-disable-http.sh | 1 + t/t5813-proto-disable-ssh.sh | 1 + t/t5814-proto-disable-ext.sh | 1 + t/t5815-submodule-protos.sh | 1 + t/t5900-repo-selection.sh | 1 + t/t6008-rev-list-submodule.sh | 1 + t/t6030-bisect-porcelain.sh | 1 + t/t6040-tracking-info.sh | 1 + t/t6041-bisect-submodule.sh | 1 + t/t6050-replace.sh | 1 + t/t6060-merge-index.sh | 1 + t/t6134-pathspec-in-submodule.sh | 1 + t/t6200-fmt-merge-msg.sh | 1 + t/t6500-gc.sh | 1 + t/t7001-mv.sh | 1 + t/t7003-filter-branch.sh | 1 + t/t7005-editor.sh | 1 + t/t7006-pager.sh | 1 + t/t7008-grep-binary.sh | 1 + t/t7010-setup.sh | 1 + t/t7064-wtstatus-pv2.sh | 1 + t/t7103-reset-bare.sh | 1 + t/t7112-reset-submodule.sh | 1 + t/t7300-clean.sh | 1 + t/t7400-submodule-basic.sh | 1 + t/t7402-submodule-rebase.sh | 1 + t/t7403-submodule-sync.sh | 1 + t/t7405-submodule-merge.sh | 1 + t/t7406-submodule-update.sh | 1 + t/t7407-submodule-foreach.sh | 1 + t/t7408-submodule-reference.sh | 1 + t/t7409-submodule-detached-work-tree.sh | 1 + t/t7410-submodule-checkout-to.sh | 1 + t/t7411-submodule-config.sh | 1 + t/t7413-submodule-is-active.sh | 1 + t/t7504-commit-msg-hook.sh | 1 + t/t7506-status-submodule.sh | 1 + t/t7507-commit-verbose.sh | 1 + t/t7517-per-repo-email.sh | 1 + t/t7613-merge-submodule.sh | 1 + t/t7700-repack.sh | 1 + t/t7800-difftool.sh | 1 + t/t7810-grep.sh | 1 + t/t7814-grep-recurse-submodules.sh | 1 + t/t9001-send-email.sh | 1 + t/t9020-remote-svn.sh | 1 + t/t9100-git-svn-basic.sh | 1 + t/t9101-git-svn-props.sh | 1 + t/t9102-git-svn-deep-rmdir.sh | 1 + t/t9103-git-svn-tracked-directory-removed.sh | 1 + t/t9104-git-svn-follow-parent.sh | 1 + t/t9105-git-svn-commit-diff.sh | 1 + t/t9106-git-svn-commit-diff-clobber.sh | 1 + t/t9107-git-svn-migrate.sh | 1 + t/t9108-git-svn-glob.sh | 1 + t/t9109-git-svn-multi-glob.sh | 1 + t/t9110-git-svn-use-svm-props.sh | 1 + t/t9114-git-svn-dcommit-merge.sh | 1 + t/t9115-git-svn-dcommit-funky-renames.sh | 1 + t/t9116-git-svn-log.sh | 1 + t/t9117-git-svn-init-clone.sh | 1 + t/t9118-git-svn-funky-branch-names.sh | 1 + t/t9120-git-svn-clone-with-percent-escapes.sh | 1 + t/t9122-git-svn-author.sh | 1 + t/t9123-git-svn-rebuild-with-rewriteroot.sh | 1 + t/t9124-git-svn-dcommit-auto-props.sh | 1 + t/t9125-git-svn-multi-glob-branch-names.sh | 1 + t/t9127-git-svn-partial-rebuild.sh | 1 + t/t9128-git-svn-cmd-branch.sh | 1 + t/t9129-git-svn-i18n-commitencoding.sh | 1 + t/t9131-git-svn-empty-symlink.sh | 1 + t/t9132-git-svn-broken-symlink.sh | 1 + t/t9133-git-svn-nested-git-repo.sh | 1 + t/t9134-git-svn-ignore-paths.sh | 1 + t/t9137-git-svn-dcommit-clobber-series.sh | 1 + t/t9138-git-svn-authors-prog.sh | 1 + t/t9140-git-svn-reset.sh | 1 + t/t9141-git-svn-multiple-branches.sh | 1 + t/t9142-git-svn-shallow-clone.sh | 1 + t/t9143-git-svn-gc.sh | 1 + t/t9144-git-svn-old-rev_map.sh | 1 + t/t9145-git-svn-master-branch.sh | 1 + t/t9146-git-svn-empty-dirs.sh | 1 + t/t9147-git-svn-include-paths.sh | 1 + t/t9148-git-svn-propset.sh | 1 + t/t9150-svk-mergetickets.sh | 1 + t/t9151-svn-mergeinfo.sh | 1 + t/t9153-git-svn-rewrite-uuid.sh | 1 + t/t9154-git-svn-fancy-glob.sh | 1 + t/t9155-git-svn-fetch-deleted-tag.sh | 1 + t/t9156-git-svn-fetch-deleted-tag-2.sh | 1 + t/t9157-git-svn-fetch-merge.sh | 1 + t/t9158-git-svn-mergeinfo.sh | 1 + t/t9159-git-svn-no-parent-mergeinfo.sh | 1 + t/t9160-git-svn-preserve-empty-dirs.sh | 1 + t/t9161-git-svn-mergeinfo-push.sh | 1 + t/t9162-git-svn-dcommit-interactive.sh | 1 + t/t9163-git-svn-reset-clears-caches.sh | 1 + t/t9164-git-svn-dcommit-concurrent.sh | 1 + t/t9165-git-svn-fetch-merge-branch-of-branch.sh | 1 + t/t9166-git-svn-fetch-merge-branch-of-branch2.sh | 1 + t/t9167-git-svn-cmd-branch-subproject.sh | 1 + t/t9168-git-svn-partially-globbed-names.sh | 1 + t/t9200-git-cvsexportcommit.sh | 1 + t/t9300-fast-import.sh | 1 + t/t9350-fast-export.sh | 1 + t/t9400-git-cvsserver-server.sh | 1 + t/t9401-git-cvsserver-crlf.sh | 1 + t/t9402-git-cvsserver-refs.sh | 1 + t/t9500-gitweb-standalone-no-errors.sh | 1 + t/t9502-gitweb-standalone-parse-output.sh | 1 + t/t9600-cvsimport.sh | 1 + t/t9601-cvsimport-vendor-branch.sh | 1 + t/t9602-cvsimport-branches-tags.sh | 1 + t/t9604-cvsimport-timestamps.sh | 1 + t/t9700-perl-git.sh | 1 + t/t9902-completion.sh | 1 + 232 files changed, 233 insertions(+)
t/t0000-basic.sh +2 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2005 Junio C Hamano # +test_fails_on_unusual_directory_names=1 test_description='Test the very basics part #1. The rest of the test suite does not check the basic operation of git
@@ -56,6 +57,7 @@ _run_sub_test_lib_test_common () { cat >"$name.sh" <<-EOF && #!$SHELL_PATH + test_fails_on_unusual_directory_names=1 test_description='$descr (run in sub test-lib) This is run in a sub test-lib so that we do not get incorrect
t/t0003-attributes.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description=gitattributes . ./test-lib.sh
t/t0021-conversion.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='blob conversion via gitattributes' . ./test-lib.sh
t/t0060-path-utils.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 David Reiss # +test_fails_on_unusual_directory_names=1 test_description='Test various path utilities' . ./test-lib.sh
t/t0300-credentials.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='basic credential helper tests' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-credential.sh
t/t0302-credential-store.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='credential-store tests' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-credential.sh
t/t1006-cat-file.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git cat-file' . ./test-lib.sh
t/t1013-read-tree-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='read-tree can handle submodules' . ./test-lib.sh
t/t1020-subdirectory.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Junio C Hamano # +test_fails_on_unusual_directory_names=1 test_description='Try various core-level commands in subdirectory. '
t/t1050-large.sh +1 -0
@@ -1,6 +1,7 @@ #!/bin/sh # Copyright (c) 2011, Google Inc. +test_fails_on_unusual_directory_names=1 test_description='adding and checking out large blobs' . ./test-lib.sh
t/t1060-object-corruption.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='see how we handle various forms of corruption' . ./test-lib.sh
t/t1300-repo-config.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2005 Johannes Schindelin # +test_fails_on_unusual_directory_names=1 test_description='Test git config in different settings' . ./test-lib.sh
t/t1305-config-include.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test config file include directives' . ./test-lib.sh
t/t1308-config-set.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Test git config-set API in different settings' . ./test-lib.sh
t/t1309-early-config.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Test read_early_config()' . ./test-lib.sh
t/t1500-rev-parse.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test git rev-parse' . ./test-lib.sh
t/t1504-ceiling-dirs.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test GIT_CEILING_DIRECTORIES' . ./test-lib.sh
t/t1507-rev-parse-upstream.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test <branch>@{upstream} syntax' . ./test-lib.sh
t/t1510-repo-setup.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description="Tests of cwd/prefix/worktree/gitdir setup in all cases A few rules for repo setup:
t/t1515-rev-parse-outside-repo.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='check that certain rev-parse options work outside repo' . ./test-lib.sh
t/t2013-checkout-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='checkout can handle submodules' . ./test-lib.sh
t/t2025-worktree-add.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test git worktree add' . ./test-lib.sh
t/t2027-worktree-list.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test git worktree list' . ./test-lib.sh
t/t2028-worktree-move.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test git worktree move, remove, lock and unlock' . ./test-lib.sh
t/t3040-subprojects-basic.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Basic subproject functionality' . ./test-lib.sh
t/t3050-subprojects-fetch.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='fetching and pushing project with subproject' . ./test-lib.sh
t/t3409-rebase-preserve-merges.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright(C) 2008 Stephen Habermann & Andreas Ericsson # +test_fails_on_unusual_directory_names=1 test_description='git rebase -p should preserve merges Run "git rebase -p" and check that merges are properly carried along
t/t3426-rebase-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='rebase can handle submodules' . ./test-lib.sh
t/t3501-revert-cherry-pick.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test cherry-pick and revert with renames --
t/t3512-cherry-pick-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='cherry-pick can handle submodules' . ./test-lib.sh
t/t3513-revert-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='revert can handle submodules' . ./test-lib.sh
t/t3600-rm.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Carl D. Worth # +test_fails_on_unusual_directory_names=1 test_description='Test of the various options to git rm.' . ./test-lib.sh
t/t3900-i18n-commit.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Junio C Hamano # +test_fails_on_unusual_directory_names=1 test_description='commit and log output encodings' . ./test-lib.sh
t/t3906-stash-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='stash apply can handle submodules' . ./test-lib.sh
t/t4027-diff-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='difference in submodules' . ./test-lib.sh
t/t4030-diff-textconv.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='diff.*.textconv tests' . ./test-lib.sh
t/t4031-diff-rewrite-binary.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='rewrite diff on binary file' . ./test-lib.sh
t/t4035-diff-quiet.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Return value of diffs' . ./test-lib.sh
t/t4041-diff-submodule-option.sh +1 -0
@@ -4,6 +4,7 @@ # Copyright (c) 2011 Alexey Shumkin (+ non-UTF-8 commit encoding tests) # +test_fails_on_unusual_directory_names=1 test_description='Support for verbose submodule differences in git diff This test tries to verify the sanity of the --submodule option of git diff.
t/t4059-diff-submodule-not-initialized.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2016 Jacob Keller, based on t4041 by Jens Lehmann # +test_fails_on_unusual_directory_names=1 test_description='Test for submodule diff on non-checked out submodule This test tries to verify that add_submodule_odb works when the submodule was
t/t4060-diff-submodule-option-diff-format.sh +1 -0
@@ -5,6 +5,7 @@ # Copyright (c) 2016 Jacob Keller (copy + convert to --submodule=diff) # +test_fails_on_unusual_directory_names=1 test_description='Support for diff format verbose submodule difference in git diff This test tries to verify the sanity of --submodule=diff option of git diff.
t/t4137-apply-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git apply handling submodules' . ./test-lib.sh
t/t4203-mailmap.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='.mailmap configurations' . ./test-lib.sh
t/t4207-log-decoration-colors.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2010 Nazri Ramliy # +test_fails_on_unusual_directory_names=1 test_description='Test for "git log --decorate" colors' . ./test-lib.sh
t/t4255-am-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git am handling submodules' . ./test-lib.sh
t/t5000-tar-tree.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (C) 2005 Rene Scharfe # +test_fails_on_unusual_directory_names=1 test_description='git archive and git get-tar-commit-id test This test covers the topics of file contents, commit date handling and
t/t5001-archive-attr.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git archive attribute tests' . ./test-lib.sh
t/t5002-archive-attr-pattern.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git archive attribute pattern tests' . ./test-lib.sh
t/t5003-archive-zip.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git archive --format=zip test' . ./test-lib.sh
t/t5150-request-pull.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Test workflows involving pull request.' . ./test-lib.sh
t/t5300-pack-object.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2005 Junio C Hamano # +test_fails_on_unusual_directory_names=1 test_description='git pack-object '
t/t5304-prune.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Johannes E. Schindelin # +test_fails_on_unusual_directory_names=1 test_description='prune' . ./test-lib.sh
t/t5305-include-tag.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git pack-object --include-tag' . ./test-lib.sh
t/t5306-pack-nobase.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Google Inc. # +test_fails_on_unusual_directory_names=1 test_description='git-pack-object with missing base '
t/t5310-pack-bitmaps.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='exercise basic bitmap functionality' . ./test-lib.sh
t/t5311-pack-bitmaps-shallow.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='check bitmap operation with shallow repositories' . ./test-lib.sh
t/t5400-send-pack.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2005 Junio C Hamano # +test_fails_on_unusual_directory_names=1 test_description='See why rewinding head breaks send-pack '
t/t5401-update-hooks.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Shawn O. Pearce # +test_fails_on_unusual_directory_names=1 test_description='Test the update hook infrastructure.' . ./test-lib.sh
t/t5402-post-merge-hook.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Josh England # +test_fails_on_unusual_directory_names=1 test_description='Test the post-merge hook.' . ./test-lib.sh
t/t5403-post-checkout-hook.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Josh England # +test_fails_on_unusual_directory_names=1 test_description='Test the post-checkout hook.' . ./test-lib.sh
t/t5404-tracking-branches.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='tracking branch update checks for git push' . ./test-lib.sh
t/t5406-remote-rejects.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='remote push rejects are reported by client' . ./test-lib.sh
t/t5407-post-rewrite-hook.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2010 Thomas Rast # +test_fails_on_unusual_directory_names=1 test_description='Test the post-rewrite hook.' . ./test-lib.sh
t/t5500-fetch-pack.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2005 Johannes Schindelin # +test_fails_on_unusual_directory_names=1 test_description='Testing multi_ack pack fetching' . ./test-lib.sh
t/t5501-fetch-push-alternates.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='fetch/push involving alternates' . ./test-lib.sh
t/t5502-quickfetch.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test quickfetch from local' . ./test-lib.sh
t/t5505-remote.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git remote porcelain-ish' . ./test-lib.sh
t/t5509-fetch-push-namespaces.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='fetch/push involving ref namespaces' . ./test-lib.sh
t/t5510-fetch.sh +1 -0
@@ -1,6 +1,7 @@ #!/bin/sh # Copyright (c) 2006, Junio C Hamano. +test_fails_on_unusual_directory_names=1 test_description='Per branch config variables affects "git fetch". '
t/t5512-ls-remote.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git ls-remote' . ./test-lib.sh
t/t5514-fetch-multiple.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='fetch --all works correctly' . ./test-lib.sh
t/t5515-fetch-merge-logic.sh +1 -0
@@ -4,6 +4,7 @@ # # +test_fails_on_unusual_directory_names=1 test_description='Merge logic in fetch' . ./test-lib.sh
t/t5516-fetch-push.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Basic fetch/push functionality. This test checks the following functionality:
t/t5519-push-alternates.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='push to a repository that borrows from elsewhere' . ./test-lib.sh
t/t5520-pull.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='pulling into void' . ./test-lib.sh
t/t5521-pull-options.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='pull options' . ./test-lib.sh
t/t5522-pull-symlink.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='pulling from symlinked subdir' . ./test-lib.sh
t/t5524-pull-msg.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git pull message generation' . ./test-lib.sh
t/t5525-fetch-tagopt.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='tagopt variable affects "git fetch" and is overridden by commandline.' . ./test-lib.sh
t/t5526-fetch-submodules.sh +1 -0
@@ -1,6 +1,7 @@ #!/bin/sh # Copyright (c) 2010, Jens Lehmann +test_fails_on_unusual_directory_names=1 test_description='Recursive "git fetch" for submodules' . ./test-lib.sh
t/t5527-fetch-odd-refs.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test fetching of oddly-named refs' . ./test-lib.sh
t/t5531-deep-submodule-push.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='unpack-objects' . ./test-lib.sh
t/t5533-push-cas.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='compare & swap push force/delete safety' . ./test-lib.sh
t/t5535-fetch-push-symref.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='avoiding conflicting update thru symref aliasing' . ./test-lib.sh
t/t5536-fetch-conflicts.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='fetch handles conflicting refspecs correctly' . ./test-lib.sh
t/t5537-fetch-shallow.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='fetch/clone from a shallow clone' . ./test-lib.sh
t/t5538-push-shallow.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='push from/to a shallow clone' . ./test-lib.sh
t/t5539-fetch-http-shallow.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='fetch/clone from a shallow clone over http' . ./test-lib.sh
t/t5540-http-push-webdav.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Clemens Buchacher <[email protected]> # +test_fails_on_unusual_directory_names=1 test_description='test WebDAV http-push This test runs various sanity checks on http-push.'
t/t5541-http-push-smart.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Clemens Buchacher <[email protected]> # +test_fails_on_unusual_directory_names=1 test_description='test smart pushing over http via http-backend' . ./test-lib.sh
t/t5542-push-http-shallow.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='push from/to a shallow clone over http' . ./test-lib.sh
t/t5544-pack-objects-hook.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test custom script in place of pack-objects' . ./test-lib.sh
t/t5545-push-options.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='pushing to a repository using push options' . ./test-lib.sh
t/t5547-push-quarantine.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='check quarantine of objects during push' . ./test-lib.sh
t/t5550-http-fetch-dumb.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test dumb fetching over http via static file' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-httpd.sh
t/t5551-http-fetch-smart.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test smart fetching over http via http-backend' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-httpd.sh
t/t5560-http-backend-noserver.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test git-http-backend-noserver' . ./test-lib.sh
t/t5561-http-backend.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test git-http-backend' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-httpd.sh
t/t5570-git-daemon.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test fetching over git protocol' . ./test-lib.sh
t/t5572-pull-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='pull can handle submodules' . ./test-lib.sh
t/t5600-clone-fail-cleanup.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (C) 2006 Carl D. Worth <[email protected]> # +test_fails_on_unusual_directory_names=1 test_description='test git clone to cleanup after failure This test covers the fact that if git clone fails, it should remove
t/t5601-clone.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description=clone . ./test-lib.sh
t/t5604-clone-reference.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (C) 2006 Martin Waitz <[email protected]> # +test_fails_on_unusual_directory_names=1 test_description='test clone --reference' . ./test-lib.sh
t/t5605-clone-local.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test local clone' . ./test-lib.sh
t/t5606-clone-options.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='basic clone options' . ./test-lib.sh
t/t5609-clone-branch.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='clone --branch option' . ./test-lib.sh
t/t5610-clone-detached.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test cloning a repository with detached HEAD' . ./test-lib.sh
t/t5611-clone-config.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='tests for git clone -c key=value' . ./test-lib.sh
t/t5612-clone-refspec.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test refspec written by clone-command' . ./test-lib.sh
t/t5613-info-alternate.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (C) 2006 Martin Waitz <[email protected]> # +test_fails_on_unusual_directory_names=1 test_description='test transitive info/alternate entries' . ./test-lib.sh
t/t5614-clone-submodules.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Test shallow cloning of repos with submodules' . ./test-lib.sh
t/t5615-alternate-env.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='handling of alternates in environment variables' . ./test-lib.sh
t/t5801-remote-helpers.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2010 Sverre Rabbelier # +test_fails_on_unusual_directory_names=1 test_description='Test remote-helper import and export commands' . ./test-lib.sh
t/t5802-connect-helper.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='ext::cmd remote "connect" helper' . ./test-lib.sh
t/t5810-proto-disable-local.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test disabling of local paths in clone/fetch' . ./test-lib.sh . "$TEST_DIRECTORY/lib-proto-disable.sh"
t/t5812-proto-disable-http.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test disabling of git-over-http in clone/fetch' . ./test-lib.sh . "$TEST_DIRECTORY/lib-proto-disable.sh"
t/t5813-proto-disable-ssh.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test disabling of git-over-ssh in clone/fetch' . ./test-lib.sh . "$TEST_DIRECTORY/lib-proto-disable.sh"
t/t5814-proto-disable-ext.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test disabling of remote-helper paths in clone/fetch' . ./test-lib.sh . "$TEST_DIRECTORY/lib-proto-disable.sh"
t/t5815-submodule-protos.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test protocol whitelisting with submodules' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-proto-disable.sh
t/t5900-repo-selection.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='selecting remote repo in ambiguous cases' . ./test-lib.sh
t/t6008-rev-list-submodule.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Johannes E. Schindelin # +test_fails_on_unusual_directory_names=1 test_description='git rev-list involving submodules that this repo has' . ./test-lib.sh
t/t6030-bisect-porcelain.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2007 Christian Couder # +test_fails_on_unusual_directory_names=1 test_description='Tests git bisect functionality' exec </dev/null
t/t6040-tracking-info.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='remote tracking stats' . ./test-lib.sh
t/t6041-bisect-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='bisect can handle submodules' . ./test-lib.sh
t/t6050-replace.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2008 Christian Couder # +test_fails_on_unusual_directory_names=1 test_description='Tests replace refs functionality' exec </dev/null
t/t6060-merge-index.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='basic git merge-index / git-merge-one-file tests' . ./test-lib.sh
t/t6134-pathspec-in-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test case exclude pathspec' . ./test-lib.sh
t/t6200-fmt-merge-msg.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006, Junio C Hamano # +test_fails_on_unusual_directory_names=1 test_description='fmt-merge-msg test' . ./test-lib.sh
t/t6500-gc.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='basic git gc tests '
t/t7001-mv.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git mv in subdirs' . ./test-lib.sh
t/t7003-filter-branch.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git filter-branch' . ./test-lib.sh . "$TEST_DIRECTORY/lib-gpg.sh"
t/t7005-editor.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='GIT_EDITOR, core.editor, and stuff' . ./test-lib.sh
t/t7006-pager.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Test automatic use of a pager.' . ./test-lib.sh
t/t7008-grep-binary.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git grep in binary files' . ./test-lib.sh
t/t7010-setup.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='setup taking and sanitizing funny paths' . ./test-lib.sh
t/t7064-wtstatus-pv2.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git status --porcelain=v2 This test exercises porcelain V2 output for git status.'
t/t7103-reset-bare.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git reset in a bare repository' . ./test-lib.sh
t/t7112-reset-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='reset can handle submodules' . ./test-lib.sh
t/t7300-clean.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Michael Spang # +test_fails_on_unusual_directory_names=1 test_description='git clean basic tests' . ./test-lib.sh
t/t7400-submodule-basic.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Lars Hjemli # +test_fails_on_unusual_directory_names=1 test_description='Basic porcelain support for submodules This test tries to verify basic sanity of the init, update and status
t/t7402-submodule-rebase.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Johannes Schindelin # +test_fails_on_unusual_directory_names=1 test_description='Test rebasing, stashing, etc. with submodules' . ./test-lib.sh
t/t7403-submodule-sync.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 David Aguilar # +test_fails_on_unusual_directory_names=1 test_description='git submodule sync These tests exercise the "git submodule sync" subcommand.
t/t7405-submodule-merge.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='merging with submodules' . ./test-lib.sh
t/t7406-submodule-update.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009 Red Hat, Inc. # +test_fails_on_unusual_directory_names=1 test_description='Test updating submodules This test verifies that "git submodule update" detaches the HEAD of the
t/t7407-submodule-foreach.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009 Johan Herland # +test_fails_on_unusual_directory_names=1 test_description='Test "git submodule foreach" This test verifies that "git submodule foreach" correctly visits all submodules
t/t7408-submodule-reference.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009, Red Hat Inc, Author: Michael S. Tsirkin ([email protected]) # +test_fails_on_unusual_directory_names=1 test_description='test clone --reference' . ./test-lib.sh
t/t7409-submodule-detached-work-tree.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2012 Daniel Graña # +test_fails_on_unusual_directory_names=1 test_description='Test submodules on detached working tree This test verifies that "git submodule" initialization, update and addition works
t/t7410-submodule-checkout-to.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Combination of submodules and multiple workdirs' . ./test-lib.sh
t/t7411-submodule-config.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2014 Heiko Voigt # +test_fails_on_unusual_directory_names=1 test_description='Test submodules config cache infrastructure This test verifies that parsing .gitmodules configurations directly
t/t7413-submodule-is-active.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Test submodule--helper is-active This test verifies that `git submodue--helper is-active` correclty identifies
t/t7504-commit-msg-hook.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='commit-msg hook' . ./test-lib.sh
t/t7506-status-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git status for submodule' . ./test-lib.sh
t/t7507-commit-verbose.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='verbose commit template' . ./test-lib.sh
t/t7517-per-repo-email.sh +1 -0
@@ -4,6 +4,7 @@ # Copyright (c) 2016 Jeff King # +test_fails_on_unusual_directory_names=1 test_description='per-repo forced setting of email address' . ./test-lib.sh
t/t7613-merge-submodule.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='merge can handle submodules' . ./test-lib.sh
t/t7700-repack.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git repack works correctly' . ./test-lib.sh
t/t7800-difftool.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009, 2010, 2012, 2013 David Aguilar # +test_fails_on_unusual_directory_names=1 test_description='git-difftool Testing basic diff tool invocation
t/t7810-grep.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Junio C Hamano # +test_fails_on_unusual_directory_names=1 test_description='git grep various. '
t/t7814-grep-recurse-submodules.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='Test grep recurse-submodules feature This test verifies the recurse-submodules feature correctly greps across
t/t9001-send-email.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git send-email' . ./test-lib.sh
t/t9020-remote-svn.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='tests remote-svn' . ./test-lib.sh
t/t9100-git-svn-basic.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn basic tests' GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
t/t9101-git-svn-props.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn property tests' . ./lib-git-svn.sh
t/t9102-git-svn-deep-rmdir.sh +1 -0
@@ -1,4 +1,5 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git svn rmdir' . ./lib-git-svn.sh
t/t9103-git-svn-tracked-directory-removed.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn tracking removed top-level path' . ./lib-git-svn.sh
t/t9104-git-svn-follow-parent.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2006 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn fetching' . ./lib-git-svn.sh
t/t9105-git-svn-commit-diff.sh +1 -0
@@ -1,6 +1,7 @@ #!/bin/sh # # Copyright (c) 2006 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn commit-diff' . ./lib-git-svn.sh
t/t9106-git-svn-commit-diff-clobber.sh +1 -0
@@ -1,6 +1,7 @@ #!/bin/sh # # Copyright (c) 2006 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn commit-diff clobber' . ./lib-git-svn.sh
t/t9107-git-svn-migrate.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh # Copyright (c) 2006 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn metadata migrations from previous versions' . ./lib-git-svn.sh
t/t9108-git-svn-glob.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh # Copyright (c) 2007 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn globbing refspecs' . ./lib-git-svn.sh
t/t9109-git-svn-multi-glob.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh # Copyright (c) 2007 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn globbing refspecs' . ./lib-git-svn.sh
t/t9110-git-svn-use-svm-props.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn useSvmProps test' . ./lib-git-svn.sh
t/t9114-git-svn-dcommit-merge.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Eric Wong # Based on a script by Joakim Tjernlund <[email protected]> +test_fails_on_unusual_directory_names=1 test_description='git svn dcommit handles merges' . ./lib-git-svn.sh
t/t9115-git-svn-dcommit-funky-renames.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn dcommit can commit renames of files with ugly names' . ./lib-git-svn.sh
t/t9116-git-svn-log.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn log tests' . ./lib-git-svn.sh
t/t9117-git-svn-init-clone.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn init/clone tests' . ./lib-git-svn.sh
t/t9118-git-svn-funky-branch-names.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn funky branch names' . ./lib-git-svn.sh
t/t9120-git-svn-clone-with-percent-escapes.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Kevin Ballard # +test_fails_on_unusual_directory_names=1 test_description='git svn clone with percent escapes' . ./lib-git-svn.sh
t/t9122-git-svn-author.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git svn authorship' . ./lib-git-svn.sh
t/t9123-git-svn-rebuild-with-rewriteroot.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Jan Krüger # +test_fails_on_unusual_directory_names=1 test_description='git svn respects rewriteRoot during rebuild' . ./lib-git-svn.sh
t/t9124-git-svn-dcommit-auto-props.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2008 Brad King +test_fails_on_unusual_directory_names=1 test_description='git svn dcommit honors auto-props' . ./lib-git-svn.sh
t/t9125-git-svn-multi-glob-branch-names.sh +1 -0
@@ -1,6 +1,7 @@ #!/bin/sh # Copyright (c) 2008 Marcus Griep +test_fails_on_unusual_directory_names=1 test_description='git svn multi-glob branch names' . ./lib-git-svn.sh
t/t9127-git-svn-partial-rebuild.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Deskin Miller # +test_fails_on_unusual_directory_names=1 test_description='git svn partial-rebuild tests' . ./lib-git-svn.sh
t/t9128-git-svn-cmd-branch.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Deskin Miller # +test_fails_on_unusual_directory_names=1 test_description='git svn partial-rebuild tests' . ./lib-git-svn.sh
t/t9129-git-svn-i18n-commitencoding.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2008 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn honors i18n.commitEncoding in config' . ./lib-git-svn.sh
t/t9131-git-svn-empty-symlink.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test that git handles an svn repository with empty symlinks' . ./lib-git-svn.sh
t/t9132-git-svn-broken-symlink.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='test that git handles an svn repository with empty symlinks' . ./lib-git-svn.sh
t/t9133-git-svn-nested-git-repo.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn property tests' . ./lib-git-svn.sh
t/t9134-git-svn-ignore-paths.sh +1 -0
@@ -4,6 +4,7 @@ # Copyright (c) 2009 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn property tests' . ./lib-git-svn.sh
t/t9137-git-svn-dcommit-clobber-series.sh +1 -0
@@ -1,6 +1,7 @@ #!/bin/sh # # Copyright (c) 2007 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn dcommit clobber series' . ./lib-git-svn.sh
t/t9138-git-svn-authors-prog.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009 Eric Wong, Mark Lodato # +test_fails_on_unusual_directory_names=1 test_description='git svn authors prog tests' . ./lib-git-svn.sh
t/t9140-git-svn-reset.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009 Ben Jackson # +test_fails_on_unusual_directory_names=1 test_description='git svn reset' . ./lib-git-svn.sh
t/t9141-git-svn-multiple-branches.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009 Marc Branchaud # +test_fails_on_unusual_directory_names=1 test_description='git svn multiple branch and tag paths in the svn repo' . ./lib-git-svn.sh
t/t9142-git-svn-shallow-clone.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn shallow clone' . ./lib-git-svn.sh
t/t9143-git-svn-gc.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2009 Robert Allan Zeh +test_fails_on_unusual_directory_names=1 test_description='git svn gc basic tests' . ./lib-git-svn.sh
t/t9144-git-svn-old-rev_map.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2009 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn old rev_map preservd' . ./lib-git-svn.sh
t/t9145-git-svn-master-branch.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2009 Eric Wong # +test_fails_on_unusual_directory_names=1 test_description='git svn initial master branch is "trunk" if possible' . ./lib-git-svn.sh
t/t9146-git-svn-empty-dirs.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2009 Eric Wong +test_fails_on_unusual_directory_names=1 test_description='git svn creates empty directories' . ./lib-git-svn.sh
t/t9147-git-svn-include-paths.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2013 Paul Walmsley - based on t9134 by Vitaly Shukela # +test_fails_on_unusual_directory_names=1 test_description='git svn property tests' . ./lib-git-svn.sh
t/t9148-git-svn-propset.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2014 Alfred Perlstein # +test_fails_on_unusual_directory_names=1 test_description='git svn propset tests' . ./lib-git-svn.sh
t/t9150-svk-mergetickets.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Sam Vilain # +test_fails_on_unusual_directory_names=1 test_description='git-svn svk merge tickets' . ./lib-git-svn.sh
t/t9151-svn-mergeinfo.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007, 2009 Sam Vilain # +test_fails_on_unusual_directory_names=1 test_description='git-svn svn mergeinfo properties' . ./lib-git-svn.sh
t/t9153-git-svn-rewrite-uuid.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2010 Jay Soffian # +test_fails_on_unusual_directory_names=1 test_description='git svn --rewrite-uuid test' . ./lib-git-svn.sh
t/t9154-git-svn-fancy-glob.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2010 Jay Soffian # +test_fails_on_unusual_directory_names=1 test_description='git svn fancy glob test' . ./lib-git-svn.sh
t/t9155-git-svn-fetch-deleted-tag.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git svn fetch deleted tag' . ./lib-git-svn.sh
t/t9156-git-svn-fetch-deleted-tag-2.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git svn fetch deleted tag 2' . ./lib-git-svn.sh
t/t9157-git-svn-fetch-merge.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2010 Steven Walter # +test_fails_on_unusual_directory_names=1 test_description='git svn merge detection' . ./lib-git-svn.sh
t/t9158-git-svn-mergeinfo.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2010 Steven Walter # +test_fails_on_unusual_directory_names=1 test_description='git svn mergeinfo propagation' . ./lib-git-svn.sh
t/t9159-git-svn-no-parent-mergeinfo.sh +1 -0
@@ -1,4 +1,5 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git svn handling of root commits in merge ranges' . ./lib-git-svn.sh
t/t9160-git-svn-preserve-empty-dirs.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2011 Ray Chen # +test_fails_on_unusual_directory_names=1 test_description='git svn test (option --preserve-empty-dirs) This test uses git to clone a Subversion repository that contains empty
t/t9161-git-svn-mergeinfo-push.sh +1 -0
@@ -4,6 +4,7 @@ # Portions copyright (c) 2011 Bryan Jacobs # +test_fails_on_unusual_directory_names=1 test_description='git-svn svn mergeinfo propagation' . ./lib-git-svn.sh
t/t9162-git-svn-dcommit-interactive.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) 2011 Frédéric Heitzmann +test_fails_on_unusual_directory_names=1 test_description='git svn dcommit --interactive series' . ./lib-git-svn.sh
t/t9163-git-svn-reset-clears-caches.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2012 Peter Baumann # +test_fails_on_unusual_directory_names=1 test_description='git svn reset clears memoized caches' . ./lib-git-svn.sh
t/t9164-git-svn-dcommit-concurrent.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2012 Robert Luberda # +test_fails_on_unusual_directory_names=1 test_description='concurrent git svn dcommit' . ./lib-git-svn.sh
t/t9165-git-svn-fetch-merge-branch-of-branch.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2012 Steven Walter # +test_fails_on_unusual_directory_names=1 test_description='git svn merge detection' . ./lib-git-svn.sh
t/t9166-git-svn-fetch-merge-branch-of-branch2.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2012 Steven Walter # +test_fails_on_unusual_directory_names=1 test_description='git svn merge detection' . ./lib-git-svn.sh
t/t9167-git-svn-cmd-branch-subproject.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2013 Tobias Schulte # +test_fails_on_unusual_directory_names=1 test_description='git svn branch for subproject clones' . ./lib-git-svn.sh
t/t9168-git-svn-partially-globbed-names.sh +1 -0
@@ -1,4 +1,5 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git svn globbing refspecs with prefixed globs' . ./lib-git-svn.sh
t/t9200-git-cvsexportcommit.sh +1 -0
@@ -2,6 +2,7 @@ # # Copyright (c) Robin Rosenberg # +test_fails_on_unusual_directory_names=1 test_description='Test export of commits to CVS' . ./test-lib.sh
t/t9300-fast-import.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Shawn Pearce # +test_fails_on_unusual_directory_names=1 test_description='test git fast-import utility' . ./test-lib.sh . "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
t/t9350-fast-export.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Johannes E. Schindelin # +test_fails_on_unusual_directory_names=1 test_description='git fast-export' . ./test-lib.sh
t/t9400-git-cvsserver-server.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Frank Lichtenheld # +test_fails_on_unusual_directory_names=1 test_description='git-cvsserver access tests read access to a git repository with the
t/t9401-git-cvsserver-crlf.sh +1 -0
@@ -4,6 +4,7 @@ # Parts adapted from other tests. # +test_fails_on_unusual_directory_names=1 test_description='git-cvsserver -kb modes tests -kb mode for binary files when accessing a git
t/t9402-git-cvsserver-refs.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git-cvsserver and git refspecs tests ability for git-cvsserver to switch between and compare
t/t9500-gitweb-standalone-no-errors.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2007 Jakub Narebski # +test_fails_on_unusual_directory_names=1 test_description='gitweb as standalone script (basic tests). This test runs gitweb (git web interface) as CGI script from
t/t9502-gitweb-standalone-parse-output.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2009 Mark Rada # +test_fails_on_unusual_directory_names=1 test_description='gitweb as standalone script (parsing script output). This test runs gitweb (git web interface) as a CGI script from the
t/t9600-cvsimport.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git cvsimport basic tests' . ./lib-cvs.sh
t/t9601-cvsimport-vendor-branch.sh +1 -0
@@ -31,6 +31,7 @@ # Like imported-twice.txt, but with a vendor branch whose branch # tag has been removed. +test_fails_on_unusual_directory_names=1 test_description='git cvsimport handling of vendor branches' . ./lib-cvs.sh
t/t9602-cvsimport-branches-tags.sh +1 -0
@@ -3,6 +3,7 @@ # A description of the repository used for this test can be found in # t9602/README. +test_fails_on_unusual_directory_names=1 test_description='git cvsimport handling of branches and tags' . ./lib-cvs.sh
t/t9604-cvsimport-timestamps.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/sh +test_fails_on_unusual_directory_names=1 test_description='git cvsimport timestamps' . ./lib-cvs.sh
t/t9700-perl-git.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2008 Lea Wiemann # +test_fails_on_unusual_directory_names=1 test_description='perl interface (Git.pm)' . ./test-lib.sh
t/t9902-completion.sh +1 -0
@@ -3,6 +3,7 @@ # Copyright (c) 2012 Felipe Contreras # +test_fails_on_unusual_directory_names=1 test_description='test bash completion' . ./lib-bash.sh
Signature · 1 line
2.11.0
PATCH 2/2 test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
In reply to Ævar Arnfjörð BjarmasonChange the test library to insert non-alphanumeric ASCII characters into the TRASH_DIRECTORY name, that's the directory the test library creates, chdirs to and runs each individual test from.
Unless test_fails_on_unusual_directory_names=1 is declared before importing test-lib.sh (and if perl isn't available on the system), the trash directory will contain every non-alphanumeric character in ASCII, in order.
This includes all the control characters, !, [], {} etc. the "." character isn't included because it's already in the directory name, and nor is "/" for obvious reasons, although that would actually work, we'd just create a subdirectory, which would make the tests harder to inspect when they fail.i
This change is inspired by the "submodule: prevent backslash expantion in submodule names" patch[1]. If we'd had backslashes in the TRASH_DIRECTORY all along that bug would have been fixed a long time ago. This will flag such issues by marking tests that currently fail with "test_fails_on_unusual_directory_names=1", ensure that new tests aren't added unless a discussion is had about why the code can't handle unusual pathnames, and prevent future regressions.
1. <[email protected]>
--- t/README | 12 ++++++++++++ t/test-lib.sh | 4 ++++ 2 files changed, 16 insertions(+)
t/README +12 -0
@@ -345,6 +345,18 @@ assignment to variable 'test_description', like this: This test registers the following structure in the cache and tries to run git-ls-files with option --frotz.' +By default the tests will be run from a directory with a highly +unusual filename that includes control characters, a newline, various +punctuation etc., this is done to smoke out any bugs related to path +handling. If for whatever reason the tests can't deal with such +unusual path names, set: + + test_fails_on_unusual_directory_names=1 + +Before sourcing 'test-lib.sh' as described below. This option is +mainly intended to grandfather in existing broken tests & code, and +should usually not be used in new code, instead your tests or code +probably need fixing. Source 'test-lib.sh' --------------------
t/test-lib.sh +4 -0
@@ -914,6 +914,10 @@ fi # Test repository TRASH_DIRECTORY="trash directory.$(basename "$0" .sh)" +if test -z "$test_fails_on_unusual_directory_names" -a "$(perl -e 'print 1+1' 2>/dev/null)" = "2" +then + TRASH_DIRECTORY="$TRASH_DIRECTORY.$(perl -e 'print join q[], grep { /[^[:alnum:]]/ and !m<[./]> } map chr, 0x01..0x7f')" +fi test -n "$root" && TRASH_DIRECTORY="$root/$TRASH_DIRECTORY" case "$TRASH_DIRECTORY" in /*) ;; # absolute path is good
Signature · 1 line
2.11.0
Am 09.04.2017 um 21:11 schrieb Ævar Arnfjörð Bjarmason:
Quoted 7 lines
This series changes the test library so that we interpolate the result of:
perl -e 'print join q[], grep { /[^[:alnum:]]/ and !m<[./]> } map chr, 0x01..0x7f'Into the trash directory name we generate. Doing this makes 30% of the test suite fail.
Wow.
I know that I tend to bring out weird errors in systems, but this is much deeper than I could have ever expected.
You might want to additionally test directory names like "asdf" and 'asdf' - some shell might try to be smart about such names and automatically unquote them. This would probably mean running the test suite multiple times, which some people find offensive (myself included).
There's also high-bit characters that might cause oddness. 0x80 and 0xff look like interesting edge cases to me.
Note that just appending these bytes is going to cause failures with filesystems that expect UTF-8 file names, you'd want to use a Unicode code point that gets encoded using a 0x80 resp. 0xff byte (I suspect 0xff is actually not a valid UTF-8 encoding at all but I'd have to double-check that).
Is git supposed to run fine under Windows, or under Linux with an ntfs filesystem driver?
If yes, then I'd expect this patch to cause the other 70% of tests to crash, because NTFS forbids several non-alnum printable characters, among them <=>\
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
In reply to Ævar Arnfjörð BjarmasonQuoted 8 lines
Change the test library to insert non-alphanumeric ASCII characters into the
TRASH_DIRECTORYname, that's the directory the test library creates, chdirs to and runs each individual test from.Unless test_fails_on_unusual_directory_names=1 is declared before importing
test-lib.sh(and if perl isn't available on the system), the trash directory will contain every non-alphanumeric character in ASCII, in order.
At the very least there must be an easier way to disable this, e.g. a command line option.
This change is sure effective in smoking out bugs, but it's a major annoyance during development when it comes to debugging a test. At first I could not even cd into the trash directory, because TAB completing the directory name with all those non-printable characters didn't work (this may be a bug in the bash-completion package). And simply copy-pasting the dirname didn't work either, because 'ls' displayed it as
trash directory.t9902-completion.??????????????????????????????? !"#$%&'()*+,-:;<=>?@[\]^_`{|}~?
After some headscratching, Sunday night may be my excuse, I figured out that 'cd tr*' works... only to be greeted with the ugliest-ever three-line(!) shell prompt.
Therefore I would say that this should not even be enabled by default in test-lib.sh, so at least running a test directly from the command line as ./t1234-foo.sh would considerately give us an easily accessible trash directory even without any command line options. We could enable it for 'make test' by default via GIT_TEST_OPTS in t/Makefile, though.
Quoted 5 lines
This includes all the control characters, !, [], {} etc. the "." character isn't included because it's already in the directory name, and nor is "/" for obvious reasons, although that would actually work, we'd just create a subdirectory, which would make the tests harder to inspect when they fail.i
1. Heh. How an additional subdirectory would make the tests harder to inspect is nothing compared to the effect of all the other characters.
2. s/i$//
Quoted 54 lines
This change is inspired by the "submodule: prevent backslash expantion in submodule names" patch[1]. If we'd had backslashes in the
TRASH_DIRECTORYall along that bug would have been fixed a long time ago. This will flag such issues by marking tests that currently fail with "test_fails_on_unusual_directory_names=1", ensure that new tests aren't added unless a discussion is had about why the code can't handle unusual pathnames, and prevent future regressions.1. <[email protected]>
--- t/README | 12 ++++++++++++ t/test-lib.sh | 4 ++++ 2 files changed, 16 insertions(+)t/README +12
-0@@ -345,6 +345,18 @@ assignment to variable 'test_description', like this: This test registers the following structure in the cache and tries to run git-ls-files with option --frotz.' +By default the tests will be run from a directory with a highly +unusual filename that includes control characters, a newline, various +punctuation etc., this is done to smoke out any bugs related to path +handling. If for whatever reason the tests can't deal with such +unusual path names, set: + + test_fails_on_unusual_directory_names=1 + +Before sourcing 'test-lib.sh' as described below. This option is +mainly intended to grandfather in existing broken tests & code, and +should usually not be used in new code, instead your tests or code +probably need fixing. Source 'test-lib.sh' --------------------t/test-lib.sh +4
-0@@ -914,6 +914,10 @@ fi # Test repository TRASH_DIRECTORY="trash directory.$(basename "$0" .sh)" +if test -z "$test_fails_on_unusual_directory_names" -a "$(perl -e 'print 1+1' 2>/dev/null)" = "2" +then + TRASH_DIRECTORY="$TRASH_DIRECTORY.$(perl -e 'print join q[], grep { /[^[:alnum:]]/ and !m<[./]> } map chr, 0x01..0x7f')" +fi test -n "$root" && TRASH_DIRECTORY="$root/$TRASH_DIRECTORY" case "$TRASH_DIRECTORY" in /*) ;; # absolute path is goodSignature · 1 line
2.11.0
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
Quoted 25 lines · SZEDER Gábor
Quoted 8 lines
Change the test library to insert non-alphanumeric ASCII characters into the
TRASH_DIRECTORYname, that's the directory the test library creates, chdirs to and runs each individual test from.Unless test_fails_on_unusual_directory_names=1 is declared before importing
test-lib.sh(and if perl isn't available on the system), the trash directory will contain every non-alphanumeric character in ASCII, in order.At the very least there must be an easier way to disable this, e.g. a command line option.
This change is sure effective in smoking out bugs, but it's a major annoyance during development when it comes to debugging a test. At first I could not even cd into the trash directory, because TAB completing the directory name with all those non-printable characters didn't work (this may be a bug in the bash-completion package). And simply copy-pasting the dirname didn't work either, because 'ls'
trash directory.t9902-completion.??????????????????????????????? !"#$%&'()*+,-:;<=>?@[\]^_`{|}~?
After some headscratching, Sunday night may be my excuse, I figured out that 'cd tr*' works... only to be greeted with the ugliest-ever three-line(!) shell prompt.
Quoted 6 lines
Therefore I would say that this should not even be enabled by default in
test-lib.sh, so at least running a test directly from the command line as ./t1234-foo.sh would considerately give us an easily accessible trash directory even without any command line options. We could enable it for 'make test' by default viaGIT_TEST_OPTSin t/Makefile, though.
This definitely needs some tweaking as you and Joachim point out. E.g. some capabilities check in the test suite to check if we can even create these sorts of paths on the local filesystem.
A couple of comments on the above though:
a) If we have something that's a more strict mode that makes tests fail due to buggy code in various scenarios, we gain the most from having it on by default, and having some optional mode to have devs e.g. disable it for manual inspection of the test directories.
Most of the running of the test suite that really matters, i.e. just before the software is delivered to end users, is going to be running in some non-interactive build system preparing a package.
b) I think any sort of magic like using it with 'make test', but not when the *.sh is manually run, will just lead to frustrating seemingly heisenbugs from people trying to debug the test suite when things do fail, i.e. you run 'make test' on some obscure platform we haven't fixed path bugs on, 10 fail, you manually inspect them and every one of them succeeds, because some --use-garbage-dirs option wasn't passed.
Quoted 68 lines
Quoted 5 lines
This includes all the control characters, !, [], {} etc. the "." character isn't included because it's already in the directory name, and nor is "/" for obvious reasons, although that would actually work, we'd just create a subdirectory, which would make the tests harder to inspect when they fail.i
1. Heh. How an additional subdirectory would make the tests harder to inspect is nothing compared to the effect of all the other characters.
2. s/i$//
Quoted 54 lines
This change is inspired by the "submodule: prevent backslash expantion in submodule names" patch[1]. If we'd had backslashes in the
TRASH_DIRECTORYall along that bug would have been fixed a long time ago. This will flag such issues by marking tests that currently fail with "test_fails_on_unusual_directory_names=1", ensure that new tests aren't added unless a discussion is had about why the code can't handle unusual pathnames, and prevent future regressions.1. <[email protected]>
--- t/README | 12 ++++++++++++ t/test-lib.sh | 4 ++++ 2 files changed, 16 insertions(+)t/README +12
-0@@ -345,6 +345,18 @@ assignment to variable 'test_description', like this: This test registers the following structure in the cache and tries to run git-ls-files with option --frotz.' +By default the tests will be run from a directory with a highly +unusual filename that includes control characters, a newline, various +punctuation etc., this is done to smoke out any bugs related to path +handling. If for whatever reason the tests can't deal with such +unusual path names, set: + + test_fails_on_unusual_directory_names=1 + +Before sourcing 'test-lib.sh' as described below. This option is +mainly intended to grandfather in existing broken tests & code, and +should usually not be used in new code, instead your tests or code +probably need fixing. Source 'test-lib.sh' --------------------t/test-lib.sh +4
-1@@ -914,6 +914,10 @@ fi # Test repository TRASH_DIRECTORY="trash directory.$(basename "$0" .sh)" +if test -z "$test_fails_on_unusual_directory_names" -a "$(perl -e 'print 1+1' 2>/dev/null)" = "2" +then + TRASH_DIRECTORY="$TRASH_DIRECTORY.$(perl -e 'print join q[], grep { /[^[:alnum:]]/ and !m<[./]> } map chr, 0x01..0x7f')" +fi test -n "$root" && TRASH_DIRECTORY="$root/$TRASH_DIRECTORY" case "$TRASH_DIRECTORY" in /*) ;; # absolute path is good --2.11.0
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
Quoted 13 lines · Ævar Arnfjörð Bjarmason
Quoted 12 lines · SZEDER Gábor
Quoted 8 lines
Change the test library to insert non-alphanumeric ASCII characters into the
TRASH_DIRECTORYname, that's the directory the test library creates, chdirs to and runs each individual test from.Unless test_fails_on_unusual_directory_names=1 is declared before importing
test-lib.sh(and if perl isn't available on the system), the trash directory will contain every non-alphanumeric character in ASCII, in order.At the very least there must be an easier way to disable this, e.g. a command line option.
Quoted 8 lines
Quoted 8 lines
This change is sure effective in smoking out bugs, but it's a major annoyance during development when it comes to debugging a test. At first I could not even cd into the trash directory, because TAB completing the directory name with all those non-printable characters didn't work (this may be a bug in the bash-completion package). And simply copy-pasting the dirname didn't work either, because 'ls'
trash directory.t9902-completion.??????????????????????????????? !"#$%&'()*+,-:;<=>?@[\]^_`{|}~?
Btw, it seems most of the failures in t9902-completion are triggered by remote URL parsing. The trash directory's new name contains '[', ']' and even "@[", all of which are treated special by connect.c:host_end(), a helper function of parse_connect_url(), basically breaking anything trying to e.g.:
git fetch "$(pwd)/other"
What puzzles me most is that parse_connect_url() recognizes right at its beginning that a remote URL like this is not actually an URL, so why does it continue parsing it as if it were one?
A few other failures are triggered by the ':' in the trash directory's name, breaking the following commonly used pattern:
export GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY" && cd subdir && test-git-pretending-it's-run-outside-of-a-repository
I think ':' should therefore be excluded from the trash directory, too.
Quoted 15 lines
Quoted 10 lines
After some headscratching, Sunday night may be my excuse, I figured out that 'cd tr*' works... only to be greeted with the ugliest-ever three-line(!) shell prompt.
Therefore I would say that this should not even be enabled by default in
test-lib.sh, so at least running a test directly from the command line as ./t1234-foo.sh would considerately give us an easily accessible trash directory even without any command line options. We could enable it for 'make test' by default viaGIT_TEST_OPTSin t/Makefile, though.This definitely needs some tweaking as you and Joachim point out. E.g. some capabilities check in the test suite to check if we can even create these sorts of paths on the local filesystem.
Quoted 5 lines
A couple of comments on the above though:
a) If we have something that's a more strict mode that makes tests fail due to buggy code in various scenarios, we gain the most from having it on by default
I know, and I basically agree...
Quoted 2 lines
and having some optional mode to have devs
e.g. disable it for manual inspection of the test directories.
... but this is just too gross to live as default outside of a CI environment.
Quoted 11 lines
Most of the running of the test suite that really matters, i.e. just before the software is delivered to end users, is going to be running in some non-interactive build system preparing a package.
b) I think any sort of magic like using it with 'make test', but not when the *.sh is manually run, will just lead to frustrating seemingly heisenbugs from people trying to debug the test suite when things do fail, i.e. you run 'make test' on some obscure platform we haven't fixed path bugs on, 10 fail, you manually inspect them and every one of them succeeds, because some --use-garbage-dirs option wasn't passed.
That's not really an issue. When a test fails during 'make test' with garbage in trash dir names, the dev comes and attempts to cd into the trash dir, and will be instantly reminded that non-printable characters might play a role in the failure when he can't do so with ordinary means.
Quoted 68 lines
Quoted 68 lines
Quoted 5 lines
This includes all the control characters, !, [], {} etc. the "." character isn't included because it's already in the directory name, and nor is "/" for obvious reasons, although that would actually work, we'd just create a subdirectory, which would make the tests harder to inspect when they fail.i
1. Heh. How an additional subdirectory would make the tests harder to inspect is nothing compared to the effect of all the other characters.
2. s/i$//
Quoted 54 lines
This change is inspired by the "submodule: prevent backslash expantion in submodule names" patch[1]. If we'd had backslashes in the
TRASH_DIRECTORYall along that bug would have been fixed a long time ago. This will flag such issues by marking tests that currently fail with "test_fails_on_unusual_directory_names=1", ensure that new tests aren't added unless a discussion is had about why the code can't handle unusual pathnames, and prevent future regressions.1. <[email protected]>
--- t/README | 12 ++++++++++++ t/test-lib.sh | 4 ++++ 2 files changed, 16 insertions(+)t/README +12
-0@@ -345,6 +345,18 @@ assignment to variable 'test_description', like this: This test registers the following structure in the cache and tries to run git-ls-files with option --frotz.' +By default the tests will be run from a directory with a highly +unusual filename that includes control characters, a newline, various +punctuation etc., this is done to smoke out any bugs related to path +handling. If for whatever reason the tests can't deal with such +unusual path names, set: + + test_fails_on_unusual_directory_names=1 + +Before sourcing 'test-lib.sh' as described below. This option is +mainly intended to grandfather in existing broken tests & code, and +should usually not be used in new code, instead your tests or code +probably need fixing. Source 'test-lib.sh' --------------------t/test-lib.sh +4
-1@@ -914,6 +914,10 @@ fi # Test repository TRASH_DIRECTORY="trash directory.$(basename "$0" .sh)" +if test -z "$test_fails_on_unusual_directory_names" -a "$(perl -e 'print 1+1' 2>/dev/null)" = "2" +then + TRASH_DIRECTORY="$TRASH_DIRECTORY.$(perl -e 'print join q[], grep { /[^[:alnum:]]/ and !m<[./]> } map chr, 0x01..0x7f')" +fi test -n "$root" && TRASH_DIRECTORY="$root/$TRASH_DIRECTORY" case "$TRASH_DIRECTORY" in /*) ;; # absolute path is good --2.11.0
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
Quoted 24 lines · SZEDER Gábor
Quoted 13 lines · Ævar Arnfjörð Bjarmason
Quoted 12 lines · SZEDER Gábor
Quoted 8 lines
Change the test library to insert non-alphanumeric ASCII characters into the
TRASH_DIRECTORYname, that's the directory the test library creates, chdirs to and runs each individual test from.Unless test_fails_on_unusual_directory_names=1 is declared before importing
test-lib.sh(and if perl isn't available on the system), the trash directory will contain every non-alphanumeric character in ASCII, in order.At the very least there must be an easier way to disable this, e.g. a command line option.
Quoted 8 lines
Quoted 8 lines
This change is sure effective in smoking out bugs, but it's a major annoyance during development when it comes to debugging a test. At first I could not even cd into the trash directory, because TAB completing the directory name with all those non-printable characters didn't work (this may be a bug in the bash-completion package). And simply copy-pasting the dirname didn't work either, because 'ls'
trash directory.t9902-completion.??????????????????????????????? !"#$%&'()*+,-:;<=>?@[\]^_`{|}~?
Quoted 7 lines
Btw, it seems most of the failures in t9902-completion are triggered by remote URL parsing. The trash directory's new name contains '[', ']' and even "@[", all of which are treated special by connect.c:host_end(), a helper function of
parse_connect_url(), basically breaking anything trying to e.g.:git fetch "$(pwd)/other"
I'm going to work on this patch so that I can report on tests by type of character that triggers a failure.
Quoted 10 lines
What puzzles me most is that
parse_connect_url()recognizes right at its beginning that a remote URL like this is not actually an URL, so why does it continue parsing it as if it were one?A few other failures are triggered by the ':' in the trash directory's name, breaking the following commonly used pattern:
export GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY" && cd subdir && test-git-pretending-it's-run-outside-of-a-repository
Does GIT_CEILING_DIRECTORIES support escaping somehow? E.g. "foo\:bar". If so maybe we could use a wrapper to set it, if not that's a bug in the ceiling dir feature, surely.
Quoted 1 line
I think ':' should therefore be excluded from the trash directory, too.
I think it's preferable to have some mode to use : in dirnames for those tests that don't fail already, to protect them against future regressions. Disabling the use of a tricky character like ":" invites future bugs & regressions.
Quoted 41 lines
Quoted 15 lines
Quoted 10 lines
After some headscratching, Sunday night may be my excuse, I figured out that 'cd tr*' works... only to be greeted with the ugliest-ever three-line(!) shell prompt.
Therefore I would say that this should not even be enabled by default in
test-lib.sh, so at least running a test directly from the command line as ./t1234-foo.sh would considerately give us an easily accessible trash directory even without any command line options. We could enable it for 'make test' by default viaGIT_TEST_OPTSin t/Makefile, though.This definitely needs some tweaking as you and Joachim point out. E.g. some capabilities check in the test suite to check if we can even create these sorts of paths on the local filesystem.
Quoted 5 lines
A couple of comments on the above though:
a) If we have something that's a more strict mode that makes tests fail due to buggy code in various scenarios, we gain the most from having it on by default
I know, and I basically agree...
Quoted 2 lines
and having some optional mode to have devs
e.g. disable it for manual inspection of the test directories.... but this is just too gross to live as default outside of a CI environment.
Quoted 11 lines
Most of the running of the test suite that really matters, i.e. just before the software is delivered to end users, is going to be running in some non-interactive build system preparing a package.
b) I think any sort of magic like using it with 'make test', but not when the *.sh is manually run, will just lead to frustrating seemingly heisenbugs from people trying to debug the test suite when things do fail, i.e. you run 'make test' on some obscure platform we haven't fixed path bugs on, 10 fail, you manually inspect them and every one of them succeeds, because some --use-garbage-dirs option wasn't passed.
Quoted 5 lines
That's not really an issue. When a test fails during 'make test' with garbage in trash dir names, the dev comes and attempts to cd into the trash dir, and will be instantly reminded that non-printable characters might play a role in the failure when he can't do so with ordinary means.
When a test fails for me I cd to t/ and re-run the test *.sh manually. I don't go straight to inspecting the existing trash.
If those manual invocations were running in some different mode & succeeded that would be very confusing.
In any case, I'll try to come up with something more granular, e.g. to categorize tests by failure type.
Quoted 68 lines
Quoted 68 lines
Quoted 68 lines
Quoted 5 lines
This includes all the control characters, !, [], {} etc. the "." character isn't included because it's already in the directory name, and nor is "/" for obvious reasons, although that would actually work, we'd just create a subdirectory, which would make the tests harder to inspect when they fail.i
1. Heh. How an additional subdirectory would make the tests harder to inspect is nothing compared to the effect of all the other characters.
2. s/i$//
Quoted 54 lines
This change is inspired by the "submodule: prevent backslash expantion in submodule names" patch[1]. If we'd had backslashes in the
TRASH_DIRECTORYall along that bug would have been fixed a long time ago. This will flag such issues by marking tests that currently fail with "test_fails_on_unusual_directory_names=1", ensure that new tests aren't added unless a discussion is had about why the code can't handle unusual pathnames, and prevent future regressions.1. <[email protected]>
--- t/README | 12 ++++++++++++ t/test-lib.sh | 4 ++++ 2 files changed, 16 insertions(+)t/README +12
-0@@ -345,6 +345,18 @@ assignment to variable 'test_description', like this: This test registers the following structure in the cache and tries to run git-ls-files with option --frotz.' +By default the tests will be run from a directory with a highly +unusual filename that includes control characters, a newline, various +punctuation etc., this is done to smoke out any bugs related to path +handling. If for whatever reason the tests can't deal with such +unusual path names, set: + + test_fails_on_unusual_directory_names=1 + +Before sourcing 'test-lib.sh' as described below. This option is +mainly intended to grandfather in existing broken tests & code, and +should usually not be used in new code, instead your tests or code +probably need fixing. Source 'test-lib.sh' --------------------t/test-lib.sh +4
-1@@ -914,6 +914,10 @@ fi # Test repository TRASH_DIRECTORY="trash directory.$(basename "$0" .sh)" +if test -z "$test_fails_on_unusual_directory_names" -a "$(perl -e 'print 1+1' 2>/dev/null)" = "2" +then + TRASH_DIRECTORY="$TRASH_DIRECTORY.$(perl -e 'print join q[], grep { /[^[:alnum:]]/ and !m<[./]> } map chr, 0x01..0x7f')" +fi test -n "$root" && TRASH_DIRECTORY="$root/$TRASH_DIRECTORY" case "$TRASH_DIRECTORY" in /*) ;; # absolute path is good --2.11.0
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
Quoted 10 lines · Ævar Arnfjörð Bjarmason
Quoted 6 lines
A few other failures are triggered by the ':' in the trash directory's name, breaking the following commonly used pattern:
export GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY" && cd subdir && test-git-pretending-it's-run-outside-of-a-repository
Does
GIT_CEILING_DIRECTORIESsupport escaping somehow? E.g. "foo\:bar". If so maybe we could use a wrapper to set it, if not that's a bug in the ceiling dir feature, surely.
I don't think it does. But nor does $PATH (which is almost certainly another source of breakage). And neither does info/alternates allow pathnames with newline in them (that is the likely cause of a large number of failures, as it hits anywhere we use "clone -s").
Are those bugs? Maybe. Certainly they are limitations. But are they ones anybody _cares_ about? I think this may fall under "if it hurts, don't do it". If there are security bugs where a malicious input can cause us to do something bad, that's something to care about. But that's very different than asking "do these tests run to completion with a funny input".
As an aside, I'd also question whether your patch might actually _hide_ bugs. It's applying a blanket change to the on-disk state that is obviously breaking some features. How many of those breakages are things that show up as a test failure, and how many of them quietly cause a test to do something else entirely, like failing its setup in a way that makes the rest of the test a noop?
So given the pain this will cause to people actually looking at tests, and given that it's not clear to me if it has or will find any actual bugs, it seems premature to flip it on by default. If somebody wants to actually dig into these cases and look for actual bugs, I'm all for it.
But flipping the default and marking a bunch of tests blindly as "well, this fails" hasn't made the world a better place. It's made it slightly worse.
-Peff
PS If you want to test various characters, I think the simplest way is
just:
make GIT_TEST_OPTS=--root=/tmp/look-a-col:on test
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
In reply to Ævar Arnfjörð BjarmasonQuoted 5 lines · Ævar Arnfjörð Bjarmason
Quoted 3 lines · SZEDER Gábor
A few other failures are triggered by the ':' in the trash directory's name, breaking the following commonly used pattern:
Quoted 7 lines
Quoted 3 lines
export GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY" && cd subdir && test-git-pretending-it's-run-outside-of-a-repository
Does
GIT_CEILING_DIRECTORIESsupport escaping somehow? E.g. "foo\:bar". If so maybe we could use a wrapper to set it, if not that's a bug in the ceiling dir feature, surely.
It doesn't, these $PATH-style variables in git, in the shell or elsewhere tend not to.
Quoted 14 lines
Quoted 8 lines
Quoted 7 lines
b) I think any sort of magic like using it with 'make test', but not when the *.sh is manually run, will just lead to frustrating seemingly heisenbugs from people trying to debug the test suite when things do fail, i.e. you run 'make test' on some obscure platform we haven't fixed path bugs on, 10 fail, you manually inspect them and every one of them succeeds, because some --use-garbage-dirs option wasn't passed.
Quoted 5 lines
That's not really an issue. When a test fails during 'make test' with garbage in trash dir names, the dev comes and attempts to cd into the trash dir, and will be instantly reminded that non-printable characters might play a role in the failure when he can't do so with ordinary means.
Quoted 5 lines
When a test fails for me I cd to t/ and re-run the test *.sh manually. I don't go straight to inspecting the existing trash.
If those manual invocations were running in some different mode & succeeded that would be very confusing.
On the contrary, that's a clue to where you might want to look. Besides, this is already the case when someone sets some options in GIT_TEST_OPTS in his config.mak.
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
In reply to Jeff KingAm 10.04.2017 um 15:38 schrieb Jeff King:
Quoted 3 lines
Are those bugs? Maybe. Certainly they are limitations. But are they ones anybody _cares_ about? I think this may fall under "if it hurts, don't do it".
It's not always possible to avoid that.
URLs, for example, may contain "funny characters", including multi-byte characters of which the second byte is 0x0a. If they are guaranteed to always be URL-encoded this isn't a problem, but then we still need to make sure that URL-encoding does happen.
Next source of funny characters that comes to my mind is submodules. They derive their name from the URL by default, and the subdirectory name as well. Again, consider the multibyte name where the second character is 0x0a. Or 0x80: À (uppercase A with accent grave) happens to have that byte in UTF-8 encoding, Ẁ is U+1E80 which would be encoded as 0x80 0x1e on an NTFS filesystem (barring additional coding steps in APIs or webservices, which further complicate the situation but don't usually eliminate the problem, they just shift it around).
Quoted 4 lines
If there are security bugs where a malicious input can cause us to do something bad, that's something to care about. But that's very different than asking "do these tests run to completion with a funny input".
If the tests do not complete, git is doing something unexpected.
That in itself is not a security hole, but there's a pretty good chance that at least one of these ~230 unexpected things can be turned into one, given enough time and motivation. The risk multiplies as this is shell scripting, where the path from "string is misinterpreted" to "string is run as a command" is considerably shorter than in other languages.
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
Quoted 6 lines · Joachim Durchholz
Am 10.04.2017 um 15:38 schrieb Jeff King:
Quoted 3 lines
Are those bugs? Maybe. Certainly they are limitations. But are they ones anybody _cares_ about? I think this may fall under "if it hurts, don't do it".
It's not always possible to avoid that.
Sort of. I don't find anything wrong with saying "your local filesystem path for a repository cannot contain newlines; if it does, some features may be unavailable".
Quoted 4 lines
URLs, for example, may contain "funny characters", including multi-byte characters of which the second byte is
0x0a. If they are guaranteed to always be URL-encoded this isn't a problem, but then we still need to make sure that URL-encoding does happen.
Sure, but URLs have a way of encoding. And if we're not encoding when we should, then that's a bug. But the arguments that are fed to things like git-clone _aren't_ URLs. They're a specifier that uses some heuristics to decide between the various cases (URLs, host:path specifiers, local paths). If you feed syntactic garbage, aborting the operation (and failing the test!) may be the right thing for git to do.
Quoted 6 lines
Quoted 4 lines
If there are security bugs where a malicious input can cause us to do something bad, that's something to care about. But that's very different than asking "do these tests run to completion with a funny input".
If the tests do not complete, git is doing something unexpected.
I very much disagree with that. Git's test operate under a set of assumptions, and if you violate those assumptions, then the failures are not meaningful.
Take alternates, for instance. The on-disk storage format cannot represent paths with newlines in them. If a test does:
git clone -s "$(pwd)" parent.git child && test -d child
then that test is going to fail if the test directory has a newline in it. But that doesn't tell us anything meaningful. Maybe there is a bug and maybe there isn't, but we cannot know because the thing being tested cannot possibly work under the test environment given.
You can rewrite all the tests to say "skip this test if there's a newline in the test directory". But to what end? It's work to write and to maintain, and we haven't gained new information.
Quoted 5 lines
That in itself is not a security hole, but there's a pretty good chance that at least one of these ~230 unexpected things can be turned into one, given enough time and motivation. The risk multiplies as this is shell scripting, where the path from "string is misinterpreted" to "string is run as a command" is considerably shorter than in other languages.
Sure, and I'd encourage people who are interested to dig through the results and see if they can find a real problem. I looked at several and didn't find anything that wasn't an example of the "test assumptions" thing above.
I'll actually be surprised if there are shell injection problems in Git, because our scripts are usually pretty meticulous about quoting variables and not doing crazy things with eval. I think the issues are much more likely to be like the "submodule--helper --list" thing I pointed out, where we get phantom records in lists.
But again, I'm happy to be proven wrong. If there's a shell injection in Git it's clearly a bug and should be fixed. I just don't think plastering control characters into the test directory names all the time is a good way of finding those problems (and doesn't balance out the cost). Fuzzing the directory names and digging into specific cases _is_ a reasonable way to do it.
-Peff
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
Am 10.04.2017 um 18:57 schrieb Jeff King:
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
If there are security bugs where a malicious input can cause us to do something bad, that's something to care about. But that's very different than asking "do these tests run to completion with a funny input".
If the tests do not complete, git is doing something unexpected.
I very much disagree with that. Git's test operate under a set of assumptions, and if you violate those assumptions, then the failures are not meaningful.
In that case the tests do not validate that git can properly work with special characters. That's a pretty big coverage gap.
Quoted 10 lines
Take alternates, for instance. The on-disk storage format cannot represent paths with newlines in them. If a test does:
git clone -s "$(pwd)" parent.git child && test -d childthen that test is going to fail if the test directory has a newline in it. But that doesn't tell us anything meaningful. Maybe there is a bug and maybe there isn't, but we cannot know because the thing being tested cannot possibly work under the test environment given.
Sure. Not all tests are meaningful in all environments. That doesn't mean that the tests are generally meaningless.
Also, we're talking about two pretty different things here: gits interaction with the file system, and git's interaction with whatever shell its scripts are using.
In an ideal world, these two aspects would be orthogonal and could be tested independently of each other. Since in practice we do have correlations and dependencies, this isn't always possible, but it's what we should aim for.
Quoted 3 lines
You can rewrite all the tests to say "skip this test if there's a newline in the test directory". But to what end? It's work to write and to maintain, and we haven't gained new information.
Not on that "alternates" thing (whatever that is), but we have a test that will work and provide information on systems that do allow newlines.
Quoted 10 lines
Quoted 5 lines
That in itself is not a security hole, but there's a pretty good chance that at least one of these ~230 unexpected things can be turned into one, given enough time and motivation. The risk multiplies as this is shell scripting, where the path from "string is misinterpreted" to "string is run as a command" is considerably shorter than in other languages.
Sure, and I'd encourage people who are interested to dig through the results and see if they can find a real problem. I looked at several and didn't find anything that wasn't an example of the "test assumptions" thing above.
Don't assume that there's no risk just because you didn't find anything.
Also, git might not be the actual hole, but other software that relies on git not doing anything awkward might fail that assumption and expose the actual breach of security. You could argue that it's not a problem in git, but it is. Unless and until the git docs clearly state that things may break if "funny characters" are being used, and where.
Quoted 1 line
But again, I'm happy to be proven wrong.
With security, you need to be confident about the absence of /any/ type of hole, not the absence of a /specific/ type of hole such as a shell injection. So the way forward isn't proving you wrong by providing a specific exploit, it's making sure that no exploit with URLs and file names can possibly exist.
Now if I'm reading things like "heuristics" and "git uses URL-specific code even after it has determined it's not a URL"... well, that's the exact opposite of reassuring messages.
Quoted 4 lines
I just don't think
plastering control characters into the test directory names all the time is a good way of finding those problems (and doesn't balance out the cost).
Fair enough.
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
Quoted 7 lines · Joachim Durchholz
Quoted 3 lines
I very much disagree with that. Git's test operate under a set of assumptions, and if you violate those assumptions, then the failures are not meaningful.
In that case the tests do not validate that git can properly work with special characters.
That's a pretty big coverage gap.
That's not necessarily true either; there may be specific tests that create exotic paths and check them. My point is that the outcome depends on that paths. So you cannot just take a test which runs "git clone -s" and expect it to work both with and without paths with newlines. You need two tests, because there are two different outcomes, depending on the test environment.
So if you're proposing to write a bunch of new tests that check the proper behavior under various conditions, go for it. But I don't think running the entire existing test suite with exotic paths tells you much. A failure might be a bug, or it might be that the thing is untestable given the environment.
Quoted 6 lines
Quoted 4 lines
Sure, and I'd encourage people who are interested to dig through the results and see if they can find a real problem. I looked at several and didn't find anything that wasn't an example of the "test assumptions" thing above.
Don't assume that there's no risk just because you didn't find anything.
I'm not assuming that at all. Didn't I say somebody would need to dig into all of these to find out the real answer? I'm only arguing that blindly adding this feature to the test suite has no value. It's the digging that has value, and you do not even need to modify the test suite to do it (you can just use --root).
I've been trying to invite you to do that digging, if it's something you care about.
-Peff
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
In reply to Ævar Arnfjörð BjarmasonQuoted 3 lines · Ævar Arnfjörð Bjarmason
Change the test library to insert non-alphanumeric ASCII characters into the
TRASH_DIRECTORYname, that's the directory the test library creates, chdirs to and runs each individual test from.
I did a bit more work on getting more granularity on why things were failing. I wrote a script[1] that runs each of the failing tests once with each individual character in the non-alphanumeric ASCII range to narrow down issues.
I skipped the svn tests, and something went wrong in the middle of my run to make the http tests fail on everything, but the gist of it is:
* Most of the tests fail because git clone can't deal with cloning a repo with a \r in the path. The error we produce when we try is quite bad and doesn't indicate what went wrong:
$ rm -rf /tmp/git.*; mkdir /tmp/git.$(perl -e 'print chr 13') && cd /tmp/git.* && git init --bare b && file b && git clone b c /b/tialized empty Git repository in /tmp/git. b: directory Cloning into 'c'... fatal: '/tmp/git. /b' does not appear to be a git repository fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
So file(1) shows it exists, a strace shows that git knows it exists at some point, but something gets lost along the way.
* Much of it fails due to GIT_CEILING_DIRECTORIES not working with dirs with ":" in the name.
* That leaves the rest at:
$ grep FAIL results | grep -v -e svn -e svk | awk '{print $1 " "
$2}'|perl -nE 'chomp;my ($f, $c) = split / /, $_; push @{$f{$f}} =>
$c; END { for my $k (sort keys %f) { say "$k = " . join ", ", map { $_
< 32 ? $_ : "$_(" . chr($_) . ")" } @{$f{$k}} } }'|grep -E -v
'^.{150,}$'|grep -E -v -e '= 13$' -e '= 58\(:\)$' -e '= 13, 58\(:\)$'
t0021-conversion.sh = 37(%), 58(:)
t0060-path-utils.sh = 39(')
t0302-credential-store.sh = 9, 32( ), 34("), 40((), 39('), 38(&),
41()), 59(;), 60(<), 62(>), 96(`), 124(|)
t1305-config-include.sh = 9, 13, 34("), 35(#), 59(;), 92(\), 91([)
t1500-rev-parse.sh = 9, 13
t1510-repo-setup.sh = 13, 92(\)
t3900-i18n-commit.sh = 9, 32( ), 40((), 41()), 38(&), 59(;), 60(<),
62(>), 124(|)
t4030-diff-textconv.sh = 13, 34("), 96(`)
t4031-diff-rewrite-binary.sh = 13, 34("), 96(`)
t5150-request-pull.sh = 13, 92(\)
t5310-pack-bitmaps.sh = 9, 13
t5407-post-rewrite-hook.sh = 34("), 96(`)
t5505-remote.sh = 13, 35(#)
t5516-fetch-push.sh = 13, 39(')
t5601-clone.sh = 13, 34("), 39('), 96(`)
t7003-filter-branch.sh = 34("), 96(`)
t7008-grep-binary.sh = 13, 34("), 96(`)
t7402-submodule-rebase.sh = 13, 34("), 96(`)
t7405-submodule-merge.sh = 34("), 92(\)
t7406-submodule-update.sh = 13, 9, 34("), 35(#), 38(&), 59(;), 92(\)
t7407-submodule-foreach.sh = 13, 9, 42(*)
t7504-commit-msg-hook.sh = 34("), 96(`)
t7700-repack.sh = 9, 42(*)
t9001-send-email.sh = 13, 34("), 96(`)
t9200-git-cvsexportcommit.sh = 42(*), 63(?)
t9300-fast-import.sh = 34("), 92(\)
t9400-git-cvsserver-server.sh = 13, 59(;)
t9401-git-cvsserver-crlf.sh = 13, 59(;)
t9402-git-cvsserver-refs.sh = 13, 59(;)
t9600-cvsimport.sh = 42(*), 58(:), 63(?)
t9601-cvsimport-vendor-branch.sh = 42(*), 58(:), 63(?)
t9602-cvsimport-branches-tags.sh = 42(*), 63(?), 58(:)
t9604-cvsimport-timestamps.sh = 42(*), 58(:), 63(?)
t9700-perl-git.sh = 13, 92(\)I've fixed a few in https://github.com/avar/git/commit/55395613fe
There's one segfault in there:
$ ./t5601-clone.sh --root="xtmp.$(perl -e 'print chr 39')" -v -i -d [...] Cloning into 'ssh-bracket-clone-plink-4'... Segmentation fault not ok 45 - single quoted plink.exe in GIT_SSH_COMMAND
PATCH 1/1 connect.c: handle errors from split_cmdline
Quoted 7 lines · Ævar Arnfjörð Bjarmason
There's one segfault in there:
$ ./t5601-clone.sh --root="xtmp.$(perl -e 'print chr 39')" -v -i -d [...] Cloning into 'ssh-bracket-clone-plink-4'... Segmentation fault not ok 45 - single quoted plink.exe in GIT_SSH_COMMAND
Here's a fix for that one. I think there are a few other memory irregularities in that function, too. I'll send another patch in a minute, but I wanted to get this out in case you were working on it, too.
-- >8 --
Subject: [PATCH] connect.c: handle errors from split_cmdline
Commit e9d9a8a4d (connect: handle putty/plink also in GIT_SSH_COMMAND, 2017-01-02) added a call to split_cmdline(), but checks only for a non-zero return to see if we got any output. Since the function returns negative values (and a NULL argv) on error, we end up dereferencing NULL and segfaulting.
Arguably we could report on the parsing error here, but it's probably not worth it. This is a best-effort attempt to see if we are using plink. So we can simply return here with "no, it wasn't plink" and let the shell actually complain about the bogus quoting.
--- connect.c | 2 +- t/t5601-clone.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
connect.c +1 -1
@@ -730,7 +730,7 @@ static void handle_ssh_variant(const char *ssh_command, int is_cmdline,const char **ssh_argv; p =xstrdup (ssh_command); -if (split_cmdline (p, &ssh_argv)) { +if (split_cmdline (p, &ssh_argv) >0 ) { variant =basename ((char *)ssh_argv[0 ]);/* * At this point, variant points into the buffer
t/t5601-clone.sh +6 -0
@@ -427,6 +427,12 @@ test_expect_success 'GIT_SSH_VARIANT overrides plink to tortoiseplink' ' expect_ssh "-batch -P 123" myhost src ' +test_expect_success 'clean failure on broken quoting' ' + test_must_fail \ + env GIT_SSH_COMMAND="${SQ}plink.exe -v" \ + git clone "[myhost:123]:src" sq-failure +' + # Reset the GIT_SSH environment variable for clone tests. setup_ssh_wrapper
Signature · 1 line
2.12.2.952.g759391acc
Re: [PATCH] connect.c: handle errors from split_cmdline
Quoted 10 lines · Jeff King
Quoted 7 lines · Ævar Arnfjörð Bjarmason
There's one segfault in there:
$ ./t5601-clone.sh --root="xtmp.$(perl -e 'print chr 39')" -v -i -d [...] Cloning into 'ssh-bracket-clone-plink-4'... Segmentation fault not ok 45 - single quoted plink.exe in GIT_SSH_COMMAND
Quoted 4 lines
Here's a fix for that one. I think there are a few other memory irregularities in that function, too. I'll send another patch in a minute, but I wanted to get this out in case you were working on it, too.
Actually, nevermind. I thought there was an issue with freeing via the results of basename(), but there isn't. There is a minor memory leak, but it's best squashed into my original patch, like so:
-- >8 --
Subject: [PATCH] connect.c: handle errors from split_cmdline
Commit e9d9a8a4d (connect: handle putty/plink also in GIT_SSH_COMMAND, 2017-01-02) added a call to split_cmdline(), but checks only for a non-zero return to see if we got any output. Since the function returns negative values (and a NULL argv) on error, we end up dereferencing NULL and segfaulting.
Arguably we could report on the parsing error here, but it's probably not worth it. This is a best-effort attempt to see if we are using plink. So we can simply return here with "no, it wasn't plink" and let the shell actually complain about the bogus quoting.
While we're here, let's also fix the leak when our split fails (as it turns out, split_cmdline can never return 0, so this leak wasn't actually triggerable before).
--- connect.c | 6 ++++-- t/t5601-clone.sh | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-)
connect.c +4 -2
@@ -729,18 +729,20 @@ static void handle_ssh_variant(const char *ssh_command, int is_cmdline, }else {const char **ssh_argv; p =xstrdup (ssh_command); -if (split_cmdline (p, &ssh_argv)) { +if (split_cmdline (p, &ssh_argv) >0 ) { variant =basename ((char *)ssh_argv[0 ]);/* * At this point, variant points into the buffer * referenced by p, hence we do not need ssh_argv * any longer. */ free (ssh_argv); - }else + }else { +free (p);return ; + } }if (!strcasecmp (variant,"plink" ) || !strcasecmp (variant,"plink.exe" ))
t/t5601-clone.sh +6 -0
@@ -426,8 +426,14 @@ test_expect_success 'GIT_SSH_VARIANT overrides plink to tortoiseplink' ' git clone "[myhost:123]:src" ssh-bracket-clone-variant-4 && expect_ssh "-batch -P 123" myhost src ' +test_expect_success 'clean failure on broken quoting' ' + test_must_fail \ + env GIT_SSH_COMMAND="${SQ}plink.exe -v" \ + git clone "[myhost:123]:src" sq-failure +' + # Reset the GIT_SSH environment variable for clone tests. setup_ssh_wrapper counter=0
Signature · 1 line
2.12.2.952.g759391acc
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
In reply to Ævar Arnfjörð BjarmasonQuoted 12 lines · Ævar Arnfjörð Bjarmason
* Most of the tests fail because git clone can't deal with cloning a repo with a \r in the path. The error we produce when we try is quite bad and doesn't indicate what went wrong:
$ rm -rf /tmp/git.*; mkdir /tmp/git.$(perl -e 'print chr 13') && cd /tmp/git.* && git init --bare b && file b && git clone b c /b/tialized empty Git repository in /tmp/git. b: directory Cloning into 'c'... fatal: '/tmp/git. /b' does not appear to be a git repository fatal: Could not read from remote repository.
Quoted 5 lines
Please make sure you have the correct access rights and the repository exists.
So file(1) shows it exists, a strace shows that git knows it exists at some point, but something gets lost along the way.
It's the round-trip through the config. It writes:
[remote "origin"]
url = /tmp/git.^M/b
into the config (where ^M is a literal CR). And then on reading it back, unquoted whitespace in config values is converted to spaces, which is why you see "git. /b" in the error message (the other ones are ugly because it's writing the raw CR in via printf, and your terminal respects it. Try "2>&1 | cat -A" when debugging this sort of thing (our error and warning messages clean up cruft like this already, but informational messages don't always go through vreportf()).
Anyway, something like this would fix it (it actually adds "\r" to the config format, which is how we handle \n and \t; we could do it without touching the parsing side if we taught store_write_pair() to recognize that \r needs to go in double-quotes).
config.c +6 -0
@@ -526,6 +526,9 @@ static char *parse_value(void)case 'n' : c ='\n' ;break ; +case 'r' : + c ='\r' ; +break ;/* Some characters escape as themselves */ case '\\' :case '"' :break ;
@@ -2172,6 +2175,9 @@ static int store_write_pair(int fd, const char *key, const char *value)case '\t' :strbuf_addstr (&sb,"\\t" );break ; +case '\r' : +strbuf_addstr (&sb,"\\r" ); +break ;case '"' :case '\\' :strbuf_addch (&sb,'\\' );
-Peff
Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name
In reply to Ævar Arnfjörð BjarmasonAm 11.04.2017 um 01:23 schrieb Ævar Arnfjörð Bjarmason:
Quoted 2 lines
* Much of it fails due to
GIT_CEILING_DIRECTORIESnot working with dirs with ":" in the name.
Oh. That might hit me: I'm using URLs for parent directory names in a cache directory.
urlencode may or may not work:
Quoted 1 line
t0021-conversion.sh= 37(%), 58(:)
Even if it works, I'll have a cache directory with pretty unreadable names. I had hoped I could avoid this kind of ugliness.
Re: [PATCH] connect.c: handle errors from split_cmdline
In reply to Jeff KingQuoted 82 lines · Jeff King
Quoted 10 lines · Jeff King
Quoted 7 lines · Ævar Arnfjörð Bjarmason
There's one segfault in there:
$ ./t5601-clone.sh --root="xtmp.$(perl -e 'print chr 39')" -v -i -d [...] Cloning into 'ssh-bracket-clone-plink-4'... Segmentation fault not ok 45 - single quoted plink.exe in GIT_SSH_COMMANDQuoted 4 lines
Here's a fix for that one. I think there are a few other memory irregularities in that function, too. I'll send another patch in a minute, but I wanted to get this out in case you were working on it, too.
Actually, nevermind. I thought there was an issue with freeing via the results of
basename(), but there isn't. There is a minor memory leak, but it's best squashed into my original patch, like so:-- >8 --
Subject: [PATCH]connect.c: handle errors fromsplit_cmdlineCommit
e9d9a8a4d(connect: handle putty/plink also inGIT_SSH_COMMAND, 2017-01-02) added a call tosplit_cmdline(), but checks only for a non-zero return to see if we got any output. Since the function returns negative values (and a NULL argv) on error, we end up dereferencing NULL and segfaulting.Arguably we could report on the parsing error here, but it's probably not worth it. This is a best-effort attempt to see if we are using plink. So we can simply return here with "no, it wasn't plink" and let the shell actually complain about the bogus quoting.
While we're here, let's also fix the leak when our split fails (as it turns out,
split_cmdlinecan never return 0, so this leak wasn't actually triggerable before).Reported-by Ævar Arnfjörð Bjarmason <[email protected]>Signed-off-by Jeff King <[email protected]>--- connect.c | 6 ++++-- t/t5601-clone.sh | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-)connect.c +4
-2@@ -729,18 +729,20 @@ static void handle_ssh_variant(const char *ssh_command, int is_cmdline, }else {const char **ssh_argv; p =xstrdup (ssh_command); -if (split_cmdline (p, &ssh_argv)) { +if (split_cmdline (p, &ssh_argv) >0 ) { variant =basename ((char *)ssh_argv[0 ]);/* * At this point, variant points into the buffer * referenced by p, hence we do not need ssh_argv * any longer. */ free (ssh_argv); - }else + }else { +free (p);return ; + } }if (!strcasecmp (variant,"plink" ) || !strcasecmp (variant,"plink.exe" ))t/t5601-clone.sh +0
-0@@ -426,8 +426,14 @@ test_expect_success 'GIT_SSH_VARIANT overrides plink to tortoiseplink' ' git clone "[myhost:123]:src" ssh-bracket-clone-variant-4 && expect_ssh "-batch -P 123" myhost src
t/t5601-clone.sh test_expect_success 'GIT_SSH_VARIANT overrides plink to tortoiseplink' ' · line 437
Quoted 10 lines
t/t5601-clone.sh +6
-0' +test_expect_success 'clean failure on broken quoting' ' + test_must_fail \ + env GIT_SSH_COMMAND="${SQ}plink.exe -v" \ + git clone "[myhost:123]:src" sq-failure +' + # Reset the GIT_SSH environment variable for clone tests. setup_ssh_wrapper
Thanks. That makes it work.
Junio: If you're not in some rush to pick this up I'll take this, fix up a bunch of other bugs & tests failures on odd --root directories and submit this and Jeff's \r patch (after adding tests etc) along with it.
Re: [PATCH] connect.c: handle errors from split_cmdline
Quoted 4 lines · Ævar Arnfjörð Bjarmason
Junio: If you're not in some rush to pick this up I'll take this, fix up a bunch of other bugs & tests failures on odd --root directories and submit this and Jeff's \r patch (after adding tests etc) along with it.
That's fine by me. We may want to pick up the segfault one separately (though I don't think it's security-interesting).
-Peff
Re: [PATCH] connect.c: handle errors from split_cmdline
Quoted 9 lines · Jeff King
Quoted 4 lines · Ævar Arnfjörð Bjarmason
Junio: If you're not in some rush to pick this up I'll take this, fix up a bunch of other bugs & tests failures on odd --root directories and submit this and Jeff's \r patch (after adding tests etc) along with it.
That's fine by me. We may want to pick up the segfault one separately (though I don't think it's security-interesting).
Up to you, but in case it's less work for you & Junio I already have it in my branch of fallout from this series/discussion, so if it's easier for you/Junio I can submit it, and it would save my a tiny bit of work since I could just base on master instead of some other in-flight patch.
Re: [PATCH] connect.c: handle errors from split_cmdline
Quoted 8 lines · Ævar Arnfjörð Bjarmason
Quoted 2 lines
That's fine by me. We may want to pick up the segfault one separately (though I don't think it's security-interesting).
Up to you, but in case it's less work for you & Junio I already have it in my branch of fallout from this series/discussion, so if it's easier for you/Junio I can submit it, and it would save my a tiny bit of work since I could just base on master instead of some other in-flight patch.
Sure, with existing backlog I probably won't get around to it before you have a clean series anyway. It may not be a bad idea to base the patches on 'maint', though, if possible.
Thanks.
Re: [PATCH] connect.c: handle errors from split_cmdline
In reply to Ævar Arnfjörð BjarmasonQuoted 10 lines · Ævar Arnfjörð Bjarmason
Quoted 9 lines · Jeff King
Quoted 4 lines · Ævar Arnfjörð Bjarmason
Junio: If you're not in some rush to pick this up I'll take this, fix up a bunch of other bugs & tests failures on odd --root directories and submit this and Jeff's \r patch (after adding tests etc) along with it.
That's fine by me. We may want to pick up the segfault one separately (though I don't think it's security-interesting).
This one cleanly applied on top of sf/putty-w-args, so I'll queue it there without introducing a new "jk/fix-something" topic. That way, even when sf/putty-w-args were to be merged to older maintenance track, this fix will also be there as well.
Thanks.
Re: [PATCH] connect.c: handle errors from split_cmdline
Quoted 10 lines · Junio C Hamano
Quoted 8 lines · Ævar Arnfjörð Bjarmason
Quoted 7 lines · Jeff King
Quoted 4 lines · Ævar Arnfjörð Bjarmason
Junio: If you're not in some rush to pick this up I'll take this, fix up a bunch of other bugs & tests failures on odd --root directories and submit this and Jeff's \r patch (after adding tests etc) along with it.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
That's fine by me. We may want to pick up the segfault one separately (though I don't think it's security-interesting).
This one cleanly applied on top of sf/putty-w-args, so I'll queue it there without introducing a new "jk/fix-something" topic. That way, even when sf/putty-w-args were to be merged to older maintenance track, this fix will also be there as well.
Thanks. That resubmission is going to take me longer than I expected, so it makes sense to have that branch applied independently.