[Reproduce] Fix thin archive member reproducer paths - #1741
[Reproduce] Fix thin archive member reproducer paths#1741Rachit Mehta (rachitmeht) wants to merge 1 commit into
Conversation
|
Rachit Mehta (@rachitmeht) Can you please add tests? |
Parth (parth-07)
left a comment
There was a problem hiding this comment.
Rachit Mehta (@rachitmeht) With this fix, will the created reproducer work standalone?
cc5b631 to
481ff1c
Compare
481ff1c to
e7aa304
Compare
e7aa304 to
48831aa
Compare
48831aa to
1a18e43
Compare
|
Rachit Mehta (@rachitmeht) Can you reply/mark-resolve the comments which are completed? |
| RUN: %mkdir %t.replay | ||
| RUN: %tar %gnutaropts -xf %t.repro.tar -C %t.replay --strip-components=1 | ||
| RUN: cd %t.replay | ||
| RUN: %python -c "import shlex, subprocess; args = shlex.split(open('response.txt').read())[1:]; args[args.index('-o') + 1] = r'%t.same.replay.out'; subprocess.check_call(shlex.split(r'%link') + args)" |
There was a problem hiding this comment.
Why do we have this inline python script here? What was wrong with replaying the response file using bash?
There was a problem hiding this comment.
Why is the test unsupported for windows? and we likely do not need reproduce_fail either here.
The windows restriction was there because I used bash -x to replay response.txt, I will change it.
For changing the windows restrictions I changed it to python script
There was a problem hiding this comment.
Reproduce/Namespec.test this also uses python script for replay.
There was a problem hiding this comment.
Many tests use %link response.txt for replaying the reproducer link (for example: test/Common/standalone/CommandLine/Reproduce/SysrootMarker.test). Can you check if there is any benefit of using this long inline python script over the %link response.txt method?
There was a problem hiding this comment.
No, there is no benefit over %link response.txt, I will change it.
Use the parent archive path hash and thin archive member name to form the generated input identity. This prevents members with identical basenames from colliding in --reproduce archives without depending on child offsets. Resolves qualcomm#1737 Signed-off-by: Rachit Mehta <rachmeht@qti.qualcomm.com>
1a18e43 to
4d30cbe
Compare
| RUN: --dump-response-file %t.response | ||
| RUN: %filecheck %s < %t.mapping.ini | ||
| RUN: %mkdir %t.replay | ||
| RUN: %tar %gnutaropts -xf %t.repro.tar -C %t.replay --strip-components=1 |
There was a problem hiding this comment.
tar .... -C is not compatible with Windows. you can cd into %t.replay first that way you don't need -C
Include the thin archive member name and child offset in the generated input identity. This prevents members with identical basenames from colliding in --reproduce archives and preserves both files during replay.
Resolves #1737