Repository navigation
test(hrr): skip the ownership stamp test where git has no ownership check - #14458
Merged
Merged
Conversation
…heck (AIRUNTIME-3091)
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
andraghetti
reviewed
Oct 28, 2026
andraghetti
left a comment
Contributor
There was a problem hiding this comment.
Tested on gbt350 (git 2.55): the test runs and passes, fails with -c safe.directory=* in the stamp, and is skipped under safe.directory = *.
…s (AIRUNTIME-3091) A probe in a fresh temporary repository still runs the test where the checkout itself is trusted (safe.directory = <checkout> in the user's git config), and there the test fails although the stamp is right. Probe the checkout: it skips exactly where git trusts it and still fails a stamp that bypasses the check.
1 task done
andraghetti
approved these changes
Oct 29, 2026
Contributor
TheRock Submodule Bump ActivityNewest first
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA ID : AIRUNTIME-3091
Motivation
test_checkout_owned_by_someone_else_reports_unknown(added by #14342) fails in theHRR script testsjob on #13256 (run 40687541194): the stamp reports a revision, notunknown. That job is not a container job; it runs on a hosted ubuntu-24.04 runner with git 2.56.0 as userrunner. Git there trusts every directory (asafe.directory = *in its system/global config), soGIT_TEST_ASSUME_DIFFERENT_OWNER=1has no effect and reading the revision is correct. The test only means something where git enforces the ownership check.Technical Details
projects/hrr/tests/scripts/test_version_stamp.py: probe git once at import, in the checkout the stamp reads (not a throwaway repo, so a checkout trusted throughsafe.directoryin the user's git config also skips), with the same environment the test uses. If git does not refuse the repository,unittest.skipUnlessskips the ownership test. Where git does enforce the check the test is unchanged and still fails against a stamp that bypasses it. The env setup moves into a sharedgit_env()helper.Issue Tracking
JIRA ID : AIRUNTIME-3091
Test Plan
python3 -m unittest test_version_stampwith a normal git (test runs, passes).HOMEpointing at a~/.gitconfigholdingsafe.directory = *(test skipped, owned-repo test passes).-c safe.directory=*to the stamp'sgit rev-parseand run with a normal git (test fails).Test Result
unittest discoveroverprojects/hrr/tests/scripts: 152 tests OK.safe.directory = *in HOME gitconfig: OK (skipped=1).Submission Checklist