Skip to content

[Reproduce] Fix thin archive member reproducer paths - #1741

Open
Rachit Mehta (rachitmeht) wants to merge 1 commit into
qualcomm:mainfrom
rachitmeht:fix/reproduce-thin-archive-members
Open

[Reproduce] Fix thin archive member reproducer paths#1741
Rachit Mehta (rachitmeht) wants to merge 1 commit into
qualcomm:mainfrom
rachitmeht:fix/reproduce-thin-archive-members

Conversation

@rachitmeht

Copy link
Copy Markdown

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

@rachitmeht Rachit Mehta (rachitmeht) changed the title Fix thin archive member reproducer paths [Reproduce] Fix thin archive member reproducer paths Aug 20, 2026
@parth-07

Copy link
Copy Markdown
Contributor

Rachit Mehta (@rachitmeht) Can you please add tests?

@parth-07 Parth (parth-07) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rachit Mehta (@rachitmeht) With this fix, will the created reproducer work standalone?

Comment thread lib/Support/OutputTarWriter.cpp
@rachitmeht
Rachit Mehta (rachitmeht) force-pushed the fix/reproduce-thin-archive-members branch from cc5b631 to 481ff1c Compare August 21, 2026 08:22
Comment thread lib/Support/OutputTarWriter.cpp Outdated
@rachitmeht
Rachit Mehta (rachitmeht) force-pushed the fix/reproduce-thin-archive-members branch from 481ff1c to e7aa304 Compare August 21, 2026 11:36
@parth-07
Parth (parth-07) force-pushed the fix/reproduce-thin-archive-members branch from e7aa304 to 48831aa Compare August 23, 2026 14:16
@rachitmeht
Rachit Mehta (rachitmeht) force-pushed the fix/reproduce-thin-archive-members branch from 48831aa to 1a18e43 Compare August 24, 2026 10:47
@parth-07

Copy link
Copy Markdown
Contributor

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)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have this inline python script here? What was wrong with replaying the response file using bash?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduce/Namespec.test this also uses python script for replay.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tar .... -C is not compatible with Windows. you can cd into %t.replay first that way you don't need -C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--reproduce mishandles thin archive members with identical basenames

3 participants