canonical / canonical/multipass

SSHFSMountsTest not deleting mock processes

Open
#1,469 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
9.2k
Forks
829
Avg merge
3d 2h
Merged PRs (30d)
45

Description

Describe the bug
The mock processes created in SSHFSMountsTests are not being deleted reliably when those tests finish, so they don't get the expectation verification in the right tests.

Most often (depending on the test order) these mock processes are often deleted in other tests. Expectations are currently honored, so that goes by silently.

However, when shuffling, the tests may finish with some mock processes still around, which google test detects and reports. This is what we hit in #1399.

To Reproduce
Running these tests in isolation is enough to trigger the source problem:

multipass_tests --gtest_filter=SSHFSMounts*

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate SSHFSMountsTests and first run multipass_tests --gtest_filter=SSHFSMounts* to reproduce the leftover mock processes. Trace how those processes are created and cleaned up during the test lifecycle; done means isolated and shuffled runs leave no mock processes for Google Test to report and expectations are verified in the intended tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.