This is an archive of the discontinued LLVM Phabricator instance.

[mlir] - [NFC] Fix failing lit test

Authored by mamrami on Jan 10 2023, 5:23 AM.



The test added in exits with exit code 1.
Adding not at the command solves the problem.

Diff Detail

Event Timeline

mamrami created this revision.Jan 10 2023, 5:23 AM
mamrami requested review of this revision.Jan 10 2023, 5:23 AM
mamrami retitled this revision from [mlir] - Fix failing lit test to [mlir] - [NFC] Fix failing lit test.Jan 10 2023, 11:43 PM
springerm added inline comments.Jan 11 2023, 12:15 AM

Could we return %c0 here instead?

mamrami added inline comments.Jan 11 2023, 5:56 AM

I tried it and it still fails.
I see they do the same "not" here: mlir/test/mlir-cpu-runner/invalid.mlir

// RUN: not mlir-cpu-runner --no-implicit-module %s 2>&1 | FileCheck %s

// CHECK: Error: top-level op must be a symbol table.
llvm.func @main()
springerm accepted this revision.Jan 12 2023, 12:57 AM
springerm added inline comments.

Interesting, I was thinking about the sparse tests (e.g., Integration/Dialect/SparseTensor/CPU/sparse_sum.mlir). But maybe they also exit with error code 1.

This revision is now accepted and ready to land.Jan 12 2023, 12:57 AM
mamrami added inline comments.Jan 12 2023, 3:32 AM

From what I see Integration/Dialect/SparseTensor/CPU/sparse_sum.mlir does not create any runtime errors.
In the test here there is a runtime error, so the exit code is 1.

Since this is my first commit, I can't commit it by myself.
Can you please commit it for me? (

mamrami abandoned this revision.Feb 5 2023, 6:09 AM