Skip to content

Add check-clang-unit, check-llvm-unit with LLVM_WINDOWS_PREFER_FORWARD_SLASH enabled on llvm-clang-x86_64-win-fast bot#856

Open
Jwata wants to merge 2 commits into
llvm:mainfrom
Jwata:win-fast-dual-test
Open

Add check-clang-unit, check-llvm-unit with LLVM_WINDOWS_PREFER_FORWARD_SLASH enabled on llvm-clang-x86_64-win-fast bot#856
Jwata wants to merge 2 commits into
llvm:mainfrom
Jwata:win-fast-dual-test

Conversation

@Jwata
Copy link
Copy Markdown

@Jwata Jwata commented May 28, 2026

This PR enables running check-clang-unit, check-llvm-unit tests twice on llvm-clang-x86_64-win-fast bot: once with default settings (backslash path behavior), and once with the forward slash override enabled (LLVM_WINDOWS_PREFER_FORWARD_SLASH=1).

Context & Rationale

There is no test coverage for LLVM_WINDOWS_PREFER_FORWARD_SLASH feature. Adding LLVM_WINDOWS_PREFER_FORWARD_SLASH enabled tests will improve the coverage, so that the change owners can notice test breakages.
It was also discussed to add tests with the flag to an existing bot, rather than adding a new builder.

Key Changes

  • llvm-clang-x86_64-win-fast will run the following tests:

    1. check-llvm-unit (Default)
    2. check-clang-unit (Default)
    3. check-llvm-unit-forward-slashes (with LLVM_WINDOWS_PREFER_FORWARD_SLASH=1 override)
    4. check-clang-unit-forward-slashes (with LLVM_WINDOWS_PREFER_FORWARD_SLASH=1 override)
  • Introduces a new check type with target, env_override, name_suffix to support overriding an environment variable.

Questions for reviewers

  • Is there a better way than the env_override approach?
  • Should llvm-clang-x86_64-expensive-checks-win also duplicate the checks, too?

Jwata added 2 commits May 28, 2026 06:58
Add MergedEnv class to zorg/buildbot/process/properties.py to support
merging runtime-resolved environment variables (Properties) with step-specific
overrides.

Update addNinjaSteps in zorg/buildbot/builders/UnifiedTreeBuilder.py to
accept advanced check configurations (dictionaries) with environment overrides
and name suffixes, utilizing MergedEnv.

TAG=agy
CONV=a6ee1ccc-7c38-4bdf-b088-f962c0b3ba01
…verride

Configure llvm-clang-x86_64-win-fast builder to run its unit tests twice:
once with default settings, and once with LLVM_WINDOWS_PREFER_FORWARD_SLASH=1
override, utilizing the new advanced checks support.

TAG=agy
CONV=a6ee1ccc-7c38-4bdf-b088-f962c0b3ba01
@Jwata Jwata marked this pull request as ready for review May 28, 2026 07:24
@zmodem
Copy link
Copy Markdown

zmodem commented May 28, 2026

Can you provide a non-AI-generated description?

@Jwata Jwata changed the title Enable dual-testing on Windows fast bot (Default vs. Forward Slash) Add check-clang-unit, check-llvm-unit with LLVM_WINDOWS_PREFER_FORWARD_SLASH enabled on llvm-clang-x86_64-win-fast bot May 28, 2026
@Jwata
Copy link
Copy Markdown
Author

Jwata commented May 28, 2026

Can you provide a non-AI-generated description?

Hmm, it might be too verbose. I made it concise. PTAL

@Jwata
Copy link
Copy Markdown
Author

Jwata commented Jun 1, 2026

@boomanaiden154
Can you take a look or help find someone can review this PR?

"check-clang-unit",
{
'target': 'check-llvm-unit',
'env_override': {'LLVM_WINDOWS_PREFER_FORWARD_SLASH': '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.

Why exactly does this need to be passed as an env variable?

It seems like this should just be a CMake option. https://github.com/llvm/llvm-project/blob/56ccbc25315030088b04435e4828efbc22f0e926/llvm/CMakeLists.txt#L638

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.

This allows us to build only once and run tests twice: the first ones with default, and the second ones with LLVM_WINDOWS_PREFER_FORWARD_SLASH feature, rather than building twice or duplicating the bot.

@boomanaiden154
Copy link
Copy Markdown
Contributor

Can you take a look or help find someone can review this PR?

You need to get approval from the bot's owner.

@Jwata
Copy link
Copy Markdown
Author

Jwata commented Jun 2, 2026

Can you take a look or help find someone can review this PR?

You need to get approval from the bot's owner.

I see. Thanks.

@gkistanova Could you take a look?

Copy link
Copy Markdown
Contributor

@rnk rnk left a comment

Choose a reason for hiding this comment

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

Instead of configuring the buildbot level to build the check*unit* targets twice in different environments, I would configure this at the lit test suite level. You can look at the sanitizer tests, which do some matrix testing (re-running the test suite in multiple configurations). They do this in a way that allows you to run all the tests in a single lit invocation, reducing bottlenecks, improving utilization, and reducing cycle time.

You could control that via a cmake option.

@vvereschaka
Copy link
Copy Markdown
Contributor

Thank you for PR @Jwata , but there are few moments:

  • a goal of the llvm-clang-x86_64-win-fast builder is a building of each commit for the main components -- LLVM/Clang -- as fast as it possible and adding two additional steps of the testing increases an average build time for 30-35%. It seems to much for me and I wouldn't like to slowdown this builder that much at least for now.

  • actually, you don't need to run both of those checks on the same builder. There are few more Windows bots running the LLVM/Clang unit tests (check-clang/check-llvm or check-all) and they already testing the build config without LLVM_WINDOWS_PREFER_FORWARD_SLASH (-win-x- as example). You'll need just a builder that checks a build with LLVM_WINDOWS_PREFER_FORWARD_SLASH=ON. We can add -DLLVM_WINDOWS_PREFER_FORWARD_SLASH=ON as CMake parameter of the build configuration for this builder and check it here without any additional checks.

  • I see a failed LLVM-Unit test when I built with -DLLVM_WINDOWS_PREFER_FORWARD_SLASH=ON on my local computer:

********************
Failed Tests (1):
  LLVM-Unit :: Support/./SupportTests.exe/FileSystemTest/CreateRelativeDirectorySymlink


Testing Time: 13.42s

Total Discovered Tests: 11096
  Skipped:   644 (5.80%)
  Passed : 10451 (94.19%)
  Failed :     1 (0.01%)

This test must be fixed before applying that changes on the buildbot configuration.

  • Also, I don't see this failure when build without CMake's LLVM_WINDOWS_PREFER_FORWARD_SLASH, but run them with set LLVM_WINDOWS_PREFER_FORWARD_SLASH=1 environment variable. Looks like the environment variable is not supported at all (or does not work as expected).

PS. You can find the owners of the builders on https://lab.llvm.org/buildbot/#/workers page at Admin column.

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.

5 participants