Skip to content

Tests leave nmsh-semantic-* and nmsh-zdotdir-* directories in TMPDIR #208

Description

@raiseCatError

Observed

A full npm test run leaves about 70 directories in $TMPDIR: about 65 nmsh-semantic-* and about 6 nmsh-zdotdir-*. Repeated runs accumulate thousands of them, each small but a real inode cost. Measured on the v0.6 stack.

Cause

  • nmsh-semantic-*: SemanticService creates a temporary ZDOTDIR and removes it in kill(), which TerminalApp.stop() calls. Many tests construct a TerminalApp and never stop it. Production exits are clean; only an abrupt SIGKILL of a window leaves one behind.
  • nmsh-zdotdir-*: shells killed with SIGKILL skip ShellSession cleanup.

Suggested fix (test hygiene, not a release blocker)

Stop every TerminalApp a test creates (a shared helper would help). Or run the test suite with a per-run TMPDIR that is removed afterwards. Keep it short, because Unix socket paths inside it are length-limited.

Already fixed

The nmsh-svc-* leaks from session-service tests (shells writing their spool after the test removed the directory) were fixed in #205 and #207.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions