Skip to content

t: mark "files"-backend specific tests

Patrick Steinhardt git 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 3 repliesIn review
  2. v36 patches 0 repliesSuperseded
  3. v26 patches 12 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches11 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6t1300: make tests more robust with non-default ref backendst/t1300-config.sh+50 -281 reply
2/6t1301: mark test for `core.sharedRepository` as reffiles specifict/t1301-shared-repo.sh+1 -10 replies
3/6t1302: make tests more robust with new extensionst/t1302-repo-version.sh+15 -80 replies
4/6t1419: mark test suite as files-backend specifict/t1419-exclude-refs.sh+6 -00 replies
5/6t5526: break test submodule differentlyt/t5526-fetch-submodules.sh+1 -10 replies
6/6t: mark tests regarding git-pack-refs(1) to be backend specifict/t1409-avoid-packing-refs.sh t/t3210-pack-refs.sh+12 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/6] t: mark "files"-backend specific tests

Hi,

this is the fourth version of my patch series that addresses tests which are specific to the "files" backend. There is only a single change compared to v3, which is an improved commit message for the first patch.

Thanks!

Patrick

Patrick Steinhardt (6):
t1300: make tests more robust with non-default ref backends
t1301: mark test for core.sharedRepository as reffiles specific
t1302: make tests more robust with new extensions
t1419: mark test suite as files-backend specific
t5526: break test submodule differently
t: mark tests regarding git-pack-refs(1) to be backend specific

 t/t1300-config.sh             | 78 ++++++++++++++++++++++-------------
 t/t1301-shared-repo.sh        |  2 +-
 t/t1302-repo-version.sh       | 23 +++++++----
 t/t1409-avoid-packing-refs.sh |  6 +++
 t/t1419-exclude-refs.sh       |  6 +++
 t/t3210-pack-refs.sh          |  6 +++
 t/t5526-fetch-submodules.sh   |  2 +-
 7 files changed, 85 insertions(+), 38 deletions(-)

Range-diff against v3:
1: a57e57a7c3 ! 1: 80a74bbb56 t1300: make tests more robust with non-default ref backends
@@ Commit message
t1300: make tests more robust with non-default ref backends

The t1300 test suite exercises the git-config(1) tool. To do so, the
- test overwrites ".git/config" to contain custom contents. While this is
- easy enough to do, it may create problems when using a non-default
- repository format because this causes us to overwrite the repository
- format version as well as any potential extensions. With the upcoming
- "reftable" ref backend the result is that Git would try to access refs
- via the "files" backend even though the repository has been initialized
- with the "reftable" backend, which will cause failures when trying to
- access any refs.
+ test overwrites ".git/config" to contain custom contents in several
+ places with code like the following:

- Refactor tests which access the refdb to be more robust by using their
- own separate repositories, which allows us to be more careful and not
- discard required extensions.
+ ```
+ cat > .git/config <<\EOF
+ ...
+ EOF
+ ```
+
+ While this is easy enough to do, it may create problems when using a
+ non-default repository format because this causes us to overwrite the
+ repository format version as well as any potential extensions. With the
+ upcoming "reftable" ref backend the result is that Git would try to
+ access refs via the "files" backend even though the repository has been
+ initialized with the "reftable" backend, which will cause failures when
+ trying to access any refs.
+
+ Ideally, we would rewrite the whole test suite to not depend on state
+ written by previous tests, but that would result in a lot of changes in
+ this test suite. Instead, we only refactor tests which access the refdb
+ to be more robust by using their own separate repositories, which allows
+ us to be more careful and not discard required extensions.

Note that we also have to touch up how the CUSTOM_CONFIG_FILE gets accessed. This environment variable contains the relative path to a

2:  fd6dd92c23 = 2:  4359d3ffa8 t1301: mark test for `core.sharedRepository` as reffiles specific
3:  ec90320ff1 = 3:  b72d85df60 t1302: make tests more robust with new extensions
4:  d0d70c3f18 = 4:  1faa8687ae t1419: mark test suite as files-backend specific
5:  066c297189 = 5:  4b95277e20 t5526: break test submodule differently
6:  7b8921817b = 6:  53aea8236d t: mark tests regarding git-pack-refs(1) to be backend specific

base-commit: b50a608ba20348cb3dfc16a696816d51780e3f0f

Signature · 1 line
2.43.GIT