Skip to content

Fix test failure on non-darwin bots #78281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

rastogishubham
Copy link
Contributor

The test still fails on non-Darwin bots, for example:

https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64

RUN: at line 1: /home/build-user/build/buildbot_linux/swift-linux-aarch64/bin/sil-opt -target aarch64-unknown-linux-gnu  -module-cache-path /home/build-user/build/buildbot_linux/swift-linux-aarch64/swift-test-results/aarch64-unknown-linux-gnu/clang-module-cache  --diagnose-unreachable -o - /home/build-user/swift/test/DebugInfo/dropped-var.sil -sil-stats-lost-variables --target=aarch64-apple-darwin 2>&1 | /usr/bin/python3.7 /home/build-user/swift/utils/PathSanitizingFileCheck --allow-unused-prefixes --sanitize BUILD_DIR=/home/build-user/build/buildbot_linux/swift-linux-aarch64 --sanitize SOURCE_DIR=/home/build-user/swift --use-filecheck /home/build-user/build/buildbot_linux/llvm-linux-aarch64/bin/FileCheck   /home/build-user/swift/test/DebugInfo/dropped-var.sil
+ /usr/bin/python3.7 /home/build-user/swift/utils/PathSanitizingFileCheck --allow-unused-prefixes --sanitize BUILD_DIR=/home/build-user/build/buildbot_linux/swift-linux-aarch64 --sanitize SOURCE_DIR=/home/build-user/swift --use-filecheck /home/build-user/build/buildbot_linux/llvm-linux-aarch64/bin/FileCheck /home/build-user/swift/test/DebugInfo/dropped-var.sil
+ /home/build-user/build/buildbot_linux/swift-linux-aarch64/bin/sil-opt -target aarch64-unknown-linux-gnu -module-cache-path /home/build-user/build/buildbot_linux/swift-linux-aarch64/swift-test-results/aarch64-unknown-linux-gnu/clang-module-cache --diagnose-unreachable -o - /home/build-user/swift/test/DebugInfo/dropped-var.sil -sil-stats-lost-variables --target=aarch64-apple-darwin
/home/build-user/swift/test/DebugInfo/dropped-var.sil:4:12: error: CHECK: expected string not found in input
 // CHECK: function, lostvars, Pass List Pipeline, DiagnoseUnreachable, 1, 1, {{[0-9]+}}, $s4test3bar1yS2i_tF
           ^
<stdin>:1:1: note: scanning from here
SOURCE_DIR/test/DebugInfo/dropped-var.sil:9:8: error: no such module 'Swift'
^

Input file: <stdin>
Check file: /home/build-user/swift/test/DebugInfo/dropped-var.sil

-dump-input=help explains the following input dump.

Input was:
<<<<<<
         1: SOURCE_DIR/test/DebugInfo/dropped-var.sil:9:8: error: no such module 'Swift' 
check:4     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
         2: import Swift 
check:4     ~~~~~~~~~~~~~
         3:  ^ 
check:4     ~~~
>>>>>>

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test

@adrian-prantl
Copy link
Contributor

SOURCE_DIR/test/DebugInfo/dropped-var.sil:9:8: error: no such module 'Swift'

Are there no other SIL tests that do something similar to this test that depend on Swift? How do they invoke the compiler?

@rastogishubham
Copy link
Contributor Author

@adrian-prantl you are right, I am confused, we can see in test/AutoDiff/sil_combine.sil

// RUN: %target-sil-opt -sil-print-types -enable-sil-verify-all %s -sil-combine | %FileCheck %s

// SILCombine tests for differentiation-related instructions.

sil_stage canonical

import Swift
import _Differentiation

And it does pass on the same bot

@rastogishubham
Copy link
Contributor Author

The problem seems to be the --target=aarch64-apple-darwin on the sil-opt invocation, which makes sense because it is a non-darwin bot that is failing

Removed the --target option on the sil-opt command invocation.
@rastogishubham rastogishubham changed the title Add REQUIRES: OS=macosx to dropped-var.sil Fix test failure on non-darwin bots Dec 19, 2024
@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test

@rastogishubham rastogishubham merged commit 1dd1925 into swiftlang:main Dec 20, 2024
3 checks passed
@rastogishubham rastogishubham deleted the FixDropped branch December 20, 2024 02:02
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.

2 participants