Skip to content

Test runner fails if /tmp is mounted with "noexec" #12558

Closed
@felixc

Description

@felixc

When running make check, it failed during the doc-std target with 244 failures and 0 successes. All of them produced an error of the form "'couldn't run the test: permission denied', [snip]/rust/src/librustdoc/test.rs:131".

Investigating this further, it turns out to be because rustdoc's test.rs attempts to create a file in a temporary directory and then execute it. By default on my platform, this happens in /tmp. My /tmp, however, is mounted with the "noexec" option that prevents executing files from it.

Arguably this is just user error on my part for configuring things this way, but I don't think it's an uncommon setup. It was also quite a mysterious way for things to fail. Perhaps the test runner could check for this and fail more usefully?

In the meantime, a workaround is to run the tests with the environment variable TMPDIR set to something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions