Skip to content

Thousands of /tmp/rustdoctest* directories #139899

Closed
@m-ou-se

Description

@m-ou-se
Member

While working on rustc, I often have:

$ ls /tmp/rustdoctest* | wc -l
6197

😬

Almost all these directories are completely empty.

We should probably do a better job at cleaning them up. Or move them into the build directory instead of littering all over /tmp.

Activity

added
A-doctestsArea: Documentation tests, run by rustdoc
C-bugCategory: This is a bug.
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on Apr 16, 2025
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Apr 16, 2025
GuillaumeGomez

GuillaumeGomez commented on Apr 16, 2025

@GuillaumeGomez
Member

How do you run doctests and under which edition? Asking because we recently changed how we were running doctests so like that I know where to look at.

added
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
C-bugCategory: This is a bug.
on Apr 16, 2025
m-ou-se

m-ou-se commented on Apr 16, 2025

@m-ou-se
MemberAuthor

@GuillaumeGomez I just run ./x.py test in the rust-lang/rust repo.

GuillaumeGomez

GuillaumeGomez commented on Apr 16, 2025

@GuillaumeGomez
Member

Ah. So I guess I'll check if rustc is using the old or new doctests soon enough. :)

GuillaumeGomez

GuillaumeGomez commented on May 6, 2025

@GuillaumeGomez
Member

Problem is that if doctests fail, exit is called and temporary folder is not cleaned up. No clue how I will add a regression test for that but at least the fix is done.

GuillaumeGomez

GuillaumeGomez commented on May 6, 2025

@GuillaumeGomez
Member

Fix opened in #140706.

lolbinarycat

lolbinarycat commented on May 6, 2025

@lolbinarycat
Contributor

No clue how I will add a regression test for that but at least the fix is done.

run_make test with TMPDIR set to a local dir, probably?

10 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: Documentation tests, run by rustdocC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @m-ou-se@GuillaumeGomez@lolbinarycat@jieyouxu@rustbot

      Issue actions

        Thousands of /tmp/rustdoctest* directories · Issue #139899 · rust-lang/rust