-
Notifications
You must be signed in to change notification settings - Fork 78
fix backslashes in path used for asm_tests
#624
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
Conversation
That was a very stupid bug. Thanks for the fix! |
I remember that these tests were disabled because some of them required a feature unavailable in GCC, which is the ability to parse the asm and output a single asm syntax. @GuillaumeGomez: Was there something else needed by these tests? |
We cannot pick which asm syntax we want to use, hence why we can't run (most of) the asm tests. |
yeah, the two errors that I see are firstly
so for most x86 tests that's game over. And then the other one seems to have basically the same issue
I think this is just a difference between intel and at&t syntax (the argument order is swapped). It seems kind of important to me that you test the assembly output of a new codegen backend though? So long term some solution is needed I'd think? |
It's kinda planned but it'll have to wait for the GCC backend to be fully integrated into rustc pipeline, which isn't the case currently. |
I don't believe we'll ever be able to support this since AFAIK, GCC won't ever parse asm. |
There is inline assembly iirc. Just no support for other syntaxes. |
No parsing of asm as such is happening. The FileCheck tool just applies a bunch of rules/regexes to the assembly output text. But the rust tests implicitly assume an asm syntax. And if gcc does not use the same syntax, you get lots of unhelpful failures. |
I was talking about the flag |
Is this PR ready to be merged? |
eh, yes?
ah right. I think that one is rare though, and it would be easy to refactor the test suite to minimize its use |
Thanks for your contribution! @folkertdev: are there tests failing that don't use this flag? |
yes. Only two tests actually run, and they both fail
the top one runs into the flag not existing. the bottom one is runs into this check
failing on this assembly emitted by GCC
So GCC emits the assembly verbatim using intel syntax, while the test is written to use AT&T syntax (e.g. The rest of the tests is ignored
|
Interesting. The test |
AT&T is the default, so the test author just tests to use that. I also just noticed that this command runs the tests in |
According to the doc:
|
That's confusing, but we can see that the default is AT&T in the test suite, right? you have to explicitly pick intel if you want it (roughly half of the x86 tests seem to do that). |
Perhaps the output by |
yes exactly. |
If I understand correctly, the normal compilation uses the Intel syntax, while |
inline asm blocks also accept intel by default, and will give syntax errors when trying to use AT&T. Anyway, some way of specifying the format is needed that knows how the test is invoked (gcc or llvm) and then passes the right format specifier |
fixes #622
The problem is with escaping the
--compiletest-rustc-args
argument. Use of\
and"
or even'
does not work because of how this string is eventually used.With this change I can actually run the asm tests
If it's useful I can re-enable this test in
run_all
, but only 2 tests actually run (the rest is ignored) and those both fail right now.