aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Fix duplicated filters in logging (#6399)gh-11528Patrick Quist2024-04-27
|
* Migrate to eslint-plugin-n; as ...-node is deprecated (#6387)gh-11484Matt Godbolt2024-04-23
| | | Replaces #6310
* More structured logging of compiles (#5105)gh-11468Matt Godbolt2024-04-22
|
* Dynamic instruction set for documentation (#6173)gh-11461Patrick Quist2024-04-22
|
* Use vitest instead of approvals (#6366)gh-11429Matt Godbolt2024-04-18
| | | | | | | | | Move to using `vitest`'s built-in behaviour, or nearer to it. Rename all the txt to `.json` files, as that's what they are. A bit of a workaround, though we might decide to keep it. To update the "expected" you can run `npx vitest test/filter-tests.ts --update` or similar.
* disable filter-tests for windows (#6365)gh-11378Patrick Quist2024-04-15
|
* fix part of the windows tests (#6351)gh-11339Patrick Quist2024-04-15
|
* Fix missed demangles (#6350)gh-11305Jeremy Rifkin2024-04-13
| | | | | | | | | | This PR fixes missed demangle cases pointed out in #6348, namely of the form `mov eax, OFFSET FLAT:_Z...` and `jmp qword ptr [rip + _Z...]`. Closes #6348. --------- Co-authored-by: Patrick Quist <partouf@gmail.com>
* Fix a test that used relied on `toMatch` matching an arraygh-11145Matt Godbolt2024-03-30
|
* Decode UTF-8 encoded strings in numeric tooltip (#6234)gh-10999narpfel2024-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilers like to encode short-ish strings into immediate arguments to various assembly instructions. This makes it hard to read the assembly. To improve readability, show a string representation of a number’s bytes when they’re valid UTF-8. This now also shows a string representation for *unprintable* ASCII characters, such as `10` being shown as `"\n"` or `1` as `"\u0001"`. Resolves #6220. ## Examples ([link](https://godbolt.org/z/7hzn6b8YG)) * 8583909746840200552: `8'583'909'746'840'200'552 = 0x7720'2C6F'6C6C'6568 = 6.5188685003648344e+265 = "hello, w"` * 1684828783: `1'684'828'783 = 0x646C'726F = 1.74467096e+22f = "orld"` * -6934491452449512253: `-6'934'491'452'449'512'253 = 0x9FC3'BCC3'B6C3'A4C3 = -1.1500622354593239e-155 = "äöüß"` * 1633837924: `1'633'837'924 = 0x6162'6364 = 2.61007876e+20f = "dcba"` * 97: `97 = 0x61 = 1.35925951e-43f = "a"` * 10: `10 = 0xA = 1.40129846e-44f = "\n"` * 92: `92 = 0x5C = 1.28919459e-43f = "\\"` ## Open questions * The code assumes little-endian encoding, so the string representation is reversed compared to the numeric representation (see `integer` example). Should this be configurable or should the bytes not be reversed? * Negative numbers are masked to 64-bit unsigned ints (same as in the hex representation), so if the number is shorter than 8 bytes, it has some leading `ff` bytes and is not valid UTF-8 (see `small_negative_number` in the example link). Is this an acceptable limitation? * I'd like to add some tests for `getNumericToolTip`, but I’m not really familiar with TypeScript. I tried to importing `static/panes/compiler.ts` in a test file, but ([after](https://github.com/vitest-dev/vitest/discussions/1806#discussioncomment-3570047) some [struggling](https://vitest.dev/config/#environment)) it seems that that file needs a [specific DOM element](https://github.com/compiler-explorer/compiler-explorer/blob/3c26c64ca320853cb383b3751d3e08a86b581639/static/options.ts#L27) that is not present during testing. The simplest solution I could come up with is moving `getNumericToolTip` into another file (such as `static/utils.ts`). Is that okay or is is it possible test `static/panes/compiler.ts` some other way? --------- Co-authored-by: Patrick Quist <partouf@gmail.com>
* Vitest (#6219)gh-10925Matt Godbolt2024-03-08
| | | | Port to vitest. Port everything to typescript. Remove chai, mocha and chai-as-promised. Adds some docs.
* Add digit separators to long numbers in numeric tooltip (#6221)gh-10881narpfel2024-03-05
| | | | | | | | | | | | | | | | | | | | | Long numbers are sometimes hard to read in the numeric tooltip. To improve readability, this PR adds language-specific digit separators to the numeric tooltip. Decimal numbers are grouped into chunks of three digits while hexadecimal numbers are grouped into chunks of length four. The digit separator is language-specific and chosen so that the number is a valid token in the source language. [Examples](https://godbolt.org/z/s86cMbjeK): * for C++, hovering the number `8583909746840200552` shows this tooltip: `8'583'909'746'840'200'552 = 0x7720'2C6F'6C6C'6568 = 6.5188685003648344e+265` * for Python, hovering the number `-12345678` shows this tooltip: `-123_456_789 = 0xFFFF_FFFF_F8A4_32EB = -2.66427945e+34f` For languages that don’t have a `digitSeparator` set, the tooltip is not changed.
* Support colour background for think-cell (#6223)gh-10880Matt Godbolt2024-03-05
|
* Accept tail calls for llvm.dbg filters (#6129)gh-10612Marc Auberer2024-02-12
| | | | | | | This adds support for filtering tail calls to `llvm.dbg.*` intrinsics using the regex-based filter mechanism. Previously, normal calls were filtered out, but tail calls are not caught by the regex so they remained in the output. Example with the previous state: https://play.spicelang.com/z/MGGn98
* Add Fortran library support (#5533)gh-10554Patrick Quist2024-02-09
|
* transform paths given through options.ldPath (#6086)gh-10465Patrick Quist2024-02-04
|
* Fix nsjail environment variables that need mapping to destination paths (#6084)gh-10443Matt Godbolt2024-02-04
| | | | | | | | Maps env vars just like we map everything else, to catch all cases where "app dir" is an input to jailed processes, the jailed process only sees the "right" path (`/app/something`). Tested locally and fixes the dot net "read only `/nosym`" thing while keeping the `/nosym` behaviour etc
* Add more typings (#6082)gh-10439Matt Godbolt2024-02-04
|
* Support a new sponsor layout (#6063)gh-10369Matt Godbolt2024-01-29
|
* Unify the way tmp dir is used (#6052)gh-10336Matt Godbolt2024-01-28
| | | | | | | Instead of having several globals, set via environment variables, explicitly set the "correct" env var if passed `--tmpDir` and then consistently use it in the rest of the program. See @apmorton's comments in #1707
* Bump timeout on packager tests to deal with flakinessgh-10223Matt Godbolt2024-01-15
|
* Add support for dex2oat (latest) (#5916)gh-10184kevinjeon-g2024-01-15
| | | | | | | Adds Dex2OatCompiler, which applies to the Android Java and Android Kotlin languages. Dex2OatCompiler runs on .dex files output by D8Compiler, which in turn runs on .class files output by JavaCompiler or KotlinCompiler. A parser has been added for dex2oat optimization passes.
* Fix semver ordering for libraries (#5959)gh-10113Patrick Quist2024-01-08
| | | | | | | Fix #5951 Fix #5085 Extended the fictitious version number for non-numbers, so that trunk can be listed higher than a `yyyymmdd` as a version (EVE uses this)
* fix unittestsgh-10044partouf2024-01-01
|
* Fix #5889: add block-lookahead logic to processAST (#5903)gh-10033Ofek2023-12-28
| | | | | | | | | | | | | | | The code here assumes a top-level AST subtree can be in 3 states: 1. The header line indicates it's system code (e.g. includes `/usr` etc.) 2. The header line indicates it's user code (includes `<source>`) 3. The header contains no such info (typically it includes `<invalid sloc>`) For the 3rd case this PR looks-ahead inside the current subtree and decides based on its contents. This is enough to filter out `<vector>` or `<string>` contents, as demonstrated in issue #5889 (added a test). This solution holds also for the case from issue #3849.
* Limit exec streams to max string length (#5898)gh-10000J. Ryan Stinnett2023-12-23
| | | | | | | | Some operations set `exec`'s `maxOutput` to a value larger than the max string length. This change ensures we always cap output to the engine's string limit (currently 512 MB in recent Node versions). This also tweaks handling when reaching the string limit to ensure adding the "truncated" message itself does not send us beyond the limit.
* Update to ts5 (#5879)gh-9974Matt Godbolt2023-12-18
| | | Co-authored-by: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com>
* Add Racket optimisation pipeline (#5836)gh-9905J. Ryan Stinnett2023-12-11
| | | | | | | | | | | | | | | | | | | | | This adds a Racket optimisation pipeline view by reusing the existing LLVM-focused optimisation pipeline UI. A Racket-specific pass parser translates its output into passes for the UI to present. This new Racket optimisation pipeline view is currently only enabled for Racket nightly, as it depends on [recent changes](https://github.com/racket/racket/pull/4842) to Racket's compiler output to function. This also extends the opt pipeline view to allow customising the function selector label as well as the options and filters for each compiler where needed. ![image](https://github.com/compiler-explorer/compiler-explorer/assets/279572/f540b41e-fd55-4375-bb2d-a0bb977530b3) --------- Co-authored-by: Matt Godbolt <matt@godbolt.org>
* Cache AWS creds at startup and reuse (#5814)gh-9719Matt Godbolt2023-11-27
| | | | | | Also errors early if we can't get them at all, and configures retries and timeouts Mitigation for #5813
* Fix #5784 (#5793)gh-9687Ofek2023-11-27
| | | Fix the name of the entry block in an IR control flow graph.
* Changes to support CMake for Windows (#5769)gh-9647Patrick Quist2023-11-22
|
* add unittest for pathsgh-9640partouf2023-11-21
|
* Fix #4931 and #2218 (#5706)gh-9504Ofek2023-11-11
|
* Fix shared state close issue (#5725)gh-9487Patrick Quist2023-11-10
|
* Execution with heaptrack (#5644)gh-9459Patrick Quist2023-11-07
|
* update clientstate with filter binaryObject & libraryCodegh-9453partouf2023-11-07
|
* LLVM TableGen: Add actions to Overrides menu (#5699)gh-9391David Spickett2023-11-04
|
* Fix #5694 (#5703)gh-9390Ofek2023-11-04
|
* Fix tests so the ts tests are rangh-9383Jeremy2023-11-03
|
* Handle errors in the LLVM transform (#5690)gh-9309Matt Godbolt2023-10-30
| | | | | | Previously an error in e.g. YAML parsing would take down the whole process. Part of #5686 but doesn't fix the underlying issue.
* Relax asm parse time test threshold for github CI being slowgh-9231Jeremy2023-10-24
|
* extra unwrappartouf2023-10-22
|
* Test conversion ts (#5517)gh-9163Rounak Shrestha2023-10-22
|
* Fix another ReDoS vulnerability, turns out this was exploitable too with the ↵gh-9151Jeremy2023-10-21
| | | | same input
* support new IR Dump header (#5603)gh-9085Patrick Quist2023-10-15
|
* Reduce the size of tests for bug #1285 (#5561)gh-8987Matt Godbolt2023-10-08
| | | | | | | | | As best I can tell the bug happens due to stuff happening _before_ the user code. So I have removed anything after the user code (ie the giant gob of dwarf debug info and symbols), in an attempt to reduce the test sizes in general. I manually undid the fix from #1285 and the tests correctly fail with this reduced input.
* Reduce binary tests to first 5000 lines (#5562)gh-8941Matt Godbolt2023-10-05
| | | | | | Just to reduce test size. Unlike an earlier change I haven't done extensive investigation as to what we might be missing as these weren't specifically targeted tests, more smoke/regression tests, and my hope is 5000 lines is enough (previously they were 30+k each)
* Admit a certain amount of defeat (for now) and bump the timeout to 10sgh-8931Matt Godbolt2023-10-05
|
* asm-parser: Recognize more dataDefn directives (#5535)gh-8922fghzxm2023-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds more data definition directives to be recognized by `AsmParser` in lib/parsers/asm-parser.ts. Fixes #5489, as well as inappropriate filtering of `.double` directives in test/filter-cases/diab.asm which is similar to #5489. The list of data directives are taken from the "Assembler Directives" chapter of the [GNU `as` manual][as]. Directives added by this patch are: - `.dc[size]` - `.dcb[size]` - `.ds[size]` - `.double` - `.fill` - `.float` - `.int` - `.single` - `.skip` - `.space` - `.string8`, `.string16`, `.string32`, `.string64` The `.space` directive is not a data directive when assembling for the HPPA architecture; this must be fixed if HPPA support is to be added to Compiler Explorer. Some of the directives such as `.string64` are pretty unlikely to be emitted by actual compilers, but we add them because it can't break existing input (no `as`-compatible compiler can use them as non-data directives), and will futureproof us against future compilers that do emit them. Architecture-specific directives documented in the "Machine Dependent Features" chapter are not added in this patch, even though it may be better to add some of them (such as `.stringz`) as well. Existing directives that are not found on the "Assembler Directives" list are not removed. `.sleb128` and `.uleb128` are technically data directives, but aren't added because we assume they're only used in debuginfo. [as]: https://sourceware.org/binutils/docs-2.41/as/index.html <!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE IT Thanks for taking the time to improve CE. We really appreciate it. Before opening the PR, please make sure that the tests & linter pass their checks, by running `make check`. In the best case scenario, you are also adding tests to back up your changes, but don't sweat it if you don't. We can discuss them at a later date. Feel free to append your name to the CONTRIBUTORS.md file Thanks again, we really appreciate this! -->
* Support abandoned queued compilations (#5278)gh-8398Matt Godbolt2023-08-07
| | | | | | | | | | | | | | | | | After some time we know either the client or CloudFront will give up on pending compilations. As such, if we continue to process compilations after the client's timed out we're just clogging up the compilation queue with pointless work. As such, this change now supports the notion of "stale" work which will be abandoned once it's made it to the front of the queue. Only compiles coming from the user will be abandoned, so discovery and health checks are unaffected. Hopefully this will mitigate the number of nodes marked unhealthy due to being overloaded: work they were doing was "pointless" anyway, and them being killed by going unhealthy is equivalent to abandoning all the work in flight anyway, but this means there's a fighting chance the node will recover quickly enough to return a "healthy" status.