Details
- Reviewers
marmoute - Group Reviewers
hg-reviewers - Commits
- rHGe96a0a53de20: tests: Adapt expected output for minor differences with rhg
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
tests/test-basic.t | ||
---|---|---|
10 ↗ | (On Diff #26194) | You can use (rhg !) for this. Alternatively, we could also set it since if does not use normal hg invocation. |
tests/test-globalopts.t | ||
267–271 | Why do we need a fallback here ? | |
tests/test-hgrc.t | ||
62 | What's the possible difference here ? | |
tests/test-ssh.t | ||
406–423 | I don't think the behavior in the alternative block is correct. It look like the think above is trying to flag some potential security issue. I recommend we don't record the behavior of rhg not doing it and instead keep the if with a comment to flag this for future investigation. (This is fine if rhg does not handling this yet) |
tests/test-hgrc.t | ||
---|---|---|
62 | Maybe it's the same as this issue I had a while ago: https://www.mercurial-scm.org/repo/hg/file/74e2256a56b8/tests/common-pattern.py#l126 |
tests/test-basic.t | ||
---|---|---|
10 ↗ | (On Diff #26194) | I’ve seen other tests do something similar, but it’s not documented in https://www.mercurial-scm.org/wiki/WritingTests#Filtering_output and I filed to find the code implementing it in run-tests.py so I didn’t know how to use it. Does it mark a line that is there when that feature is enabled or disabled? Is ! a negation? I considered always setting this but the current run-tests.py code doesn’t have a meaningful value when in non-rhg mode. |
tests/test-globalopts.t | ||
267–271 | Whatever error causes a Python traceback (either inexistent cwd or config parse error I suppose?) goes through Rust code instead when in rhg mode, so there is no traceback. chg already had the same behavior so that seemed reasonable. | |
tests/test-hgrc.t | ||
62 | Right, the Display impl for io::Error prints the numeric errno value next to the error string: https://github.com/rust-lang/rust/blob/1.50.0/library/std/src/io/error.rs#L538-L541 so the output is (Permission denied (os error 13)) | |
tests/test-ssh.t | ||
406–423 | Yes, abort: potentially unsafe serve indeed blocks a security issue in the serve command. As far as I can tell the current rhg behavior is safe since it aborts (although with a different message) before getting anywhere near the serve. Keeping the if but removing the else simply reduces test coverage. Having a test expect the current behavior even if it’s not the "ideal" behavior seems preferable to me as it lets us find out if a patch changes it accidentally. |
tests/test-ssh.t | ||
---|---|---|
406–423 | Should we use (missing-correct-output !) (known-bad-output !) there then ? |
Why do we need a fallback here ?