Skip to content

feat: Wire up LLD tests via wild-linker/lld-tests submodule - #2399

Open
deepakshirkem wants to merge 1 commit into
wild-linker:mainfrom
deepakshirkem:feat/lld-vendor-batch-1
Open

feat: Wire up LLD tests via wild-linker/lld-tests submodule#2399
deepakshirkem wants to merge 1 commit into
wild-linker:mainfrom
deepakshirkem:feat/lld-vendor-batch-1

Conversation

@deepakshirkem

@deepakshirkem deepakshirkem commented Aug 15, 2026

Copy link
Copy Markdown
Member

Replaces the directly-committed test files from earlier commits on this PR with a proper git submodule pointing at wild-linker/lld-tests, which vendors the full lld/test/ directory (ELF, COFF, MachO, MinGW, Unit, wasm) and has its own sync script.

Test activation is intentionally left as a no-op for now collect_tests returns early without registering any tests. The full LLD suite includes many untriaged tests, and deciding what should run vs. be skip-listed is left to a follow-up PR. This PR is scoped to just the submodule wiring.

Part of #2380.

@deepakshirkem
deepakshirkem marked this pull request as ready for review August 15, 2026 10:17

@marxin marxin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Frankly speaking, I don't like us taking the copy of the LLVM's lld/test/ELF sub-folder and tracking them as part of the main git repository. If we include all files in the aforementioned folder, we're speaking about ~2400 files.

I would rather see us using an existing submodule https://github.com/wild-linker/test-files, where we can also put the synchronization script.

@deepakshirkem

Copy link
Copy Markdown
Member Author

Frankly speaking, I don't like us taking the copy of the LLVM's lld/test/ELF sub-folder and tracking them as part of the main git repository. If we include all files in the aforementioned folder, we're speaking about ~2400 files.

@marxin That makes sense to me. @davidlattimore what you think?

@davidlattimore

Copy link
Copy Markdown
Member

Frankly speaking, I don't like us taking the copy of the LLVM's lld/test/ELF sub-folder and tracking them as part of the main git repository. If we include all files in the aforementioned folder, we're speaking about ~2400 files.

@marxin That makes sense to me. @davidlattimore what you think?

Hmm, that is quite a few. The other option would be for us to create a new repository under the wild-linker org and put it in there, then make that be a git submodule. That'd make it more like how we do for the mold tests, but instead of using the upstream repo as a submodule, we'd be using our own cut-down copy of it due to size reasons. But we'd need a name - perhaps "lld-tests"?

@marxin

marxin commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

But we'd need a name - perhaps "lld-tests"?

Works for me! I'm fine with us doing one more git submodule (under wild-linker org) and using it. The repository might be easily just a copy of the LLVM subfolder (lld/test). Btw. worth noticing - given our coverage for other platform, we should probably integrate not only ELF subfolder:

~/Programming/llvm-project/lld/test on  wasm-ld--no-demangle via △ v4.4.2 via 🐍 v3.14.7
❯ ls
Permissions Size User   Date Modified Name
drwxr-xr-x     - marxin  4 Aug 09:51   COFF
drwxr-xr-x     - marxin  4 Aug 09:53   ELF
drwxr-xr-x     - marxin  4 Aug 09:53   MachO
drwxr-xr-x     - marxin 30 Jun 16:06   MinGW
drwxr-xr-x     - marxin 25 Nov  2025   Unit
drwxr-xr-x     - marxin  4 Aug 09:53   wasm
.rw-r--r--  2.1k marxin 13 Feb 10:46   CMakeLists.txt
.rw-r--r--  5.1k marxin 27 Jul 19:24   lit.cfg.py
.rw-r--r--  1.5k marxin 13 Feb 10:46   lit.site.cfg.py.in

Note the folder contains ~4K files.

@deepakshirkem

Copy link
Copy Markdown
Member Author

A few name options, no strong preference either way:

lld-tests
lld-test-suite
llvm-lld-tests

Once the repo's up, I'll rework this PR to pull from it as a submodule, same as external_test_suites/mold.

@davidlattimore

Copy link
Copy Markdown
Member

I've created https://github.com/wild-linker/lld-tests.

@marxin
marxin marked this pull request as draft August 16, 2026 05:45
@deepakshirkem
deepakshirkem force-pushed the feat/lld-vendor-batch-1 branch from 4b234ee to 2967ce4 Compare August 16, 2026 14:07
@deepakshirkem deepakshirkem changed the title feat: Add skip-list mechanism for LLD tests, vendor first x86_64 batch feat: Wire up LLD tests via wild-linker/lld-tests submodule Aug 16, 2026
@deepakshirkem
deepakshirkem requested a review from marxin August 16, 2026 14:11
@deepakshirkem

Copy link
Copy Markdown
Member Author

@marxin Can you take another look? I've made this PR submodule-specific now if there's anything else you think I should remove.

@deepakshirkem
deepakshirkem marked this pull request as ready for review August 16, 2026 14:13

@marxin marxin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we should include running of a selected subset of tests as part of this PR - either by explicitly listing them, or similarly to Mold, by skipping the unsupported ones.

Comment thread wild/tests/external_tests/lld_tests.rs Outdated
return Ok(());
}

// Test activation is not yet implemented. The submodule wiring

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well, it does not make much sense to merge the PR that is actually not running any of the tests.

Ok(())
}

fn load_skip_tests_config() -> &'static Option<Vec<String>> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Similarly here, it's a code that is not actually run.

@deepakshirkem
deepakshirkem force-pushed the feat/lld-vendor-batch-1 branch from 2967ce4 to be4d64a Compare August 17, 2026 12:40
Replaces directly-committed test files with a proper git submodule
pointing at wild-linker/lld-tests, which vendors the full lld/test/
directory with its own sync script.

Test activation is intentionally left as a no-op for now — the full
LLD suite includes many untriaged tests, and deciding what should
run vs. be skip-listed is left to a follow-up PR.
@deepakshirkem
deepakshirkem force-pushed the feat/lld-vendor-batch-1 branch from be4d64a to 07ff4c9 Compare August 17, 2026 12:43
@deepakshirkem

Copy link
Copy Markdown
Member Author

@marxin I added the tests, but I wanted to confirm with you as well — is my understanding of these tests correct?

@deepakshirkem
deepakshirkem requested a review from marxin August 17, 2026 12:46

@davidlattimore davidlattimore left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you think you could split adding the git submodule out to a separate PR and get that in first? Especially if we might iterate on this a bit. I often like to pull down PRs to try them out, but having a submodule addition makes it tricky because if I initialise the submodule, then once I move off the commit that adds it, things get messy. Basically it'd be good to get the submodule in quickly, then I can more easily review the remainder of the change.

I'm not sure that the "feat" prefix is ideal for this change. It would mean that this would appear in the "features" section of the release notes - but from the perspective of a user of the linker, this isn't a feature. "test" is probably more appropriate.

Comment thread .typos.toml
ot = "ot"
FRE = "FRE"
aranges = "aranges"
preemptable = "preemptable"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a typo that I've been known to make myself, so it'd be good if we could avoid adding it here. I just did some experimentation, and it looks like we can skip typo checking specifically for the excluded test lists with something like this:

[type.external-test-list]
extend-glob = ["*_skip_tests.toml"]
extend-ignore-re = ['(?m)^\s*tests\s*=\s*\[[^\]]*\]\s*$']

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.

3 participants