Skip to content

test: Clean /dev/shm a bit better#459

Merged
chrissie-c merged 3 commits intoClusterLabs:mainfrom
chrissie-c:clean-more
Mar 18, 2022
Merged

test: Clean /dev/shm a bit better#459
chrissie-c merged 3 commits intoClusterLabs:mainfrom
chrissie-c:clean-more

Conversation

@chrissie-c
Copy link
Copy Markdown
Contributor

This isn't perfect, but it does tidy more of /dev/shm than
previously. Because some of the tests leave empty directories
we have no way of telling (in resources.test) whether they
belong to this test run, another test run, or a running
application.

This isn't perfect, but it does tidy more of /dev/shm than
previously. Because some of the tests leave empty directories
we have no way of telling (in resources.test) whether they
belong to this test run, another test run, or a running
application.
Copy link
Copy Markdown

@kgaillot kgaillot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, though I didn't test it

echo
echo "There were some empty leftovers (expected), removing them"
echo "${leftovers}" | tee /dev/stderr | xargs rm
echo "${leftovers}" | tee /dev/stderr
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems odd to output just the names to both stdout and stderr, I would expect all the echos to go to one place. echo blah >&2 goes to just stderr

for dd in $leftovers; do
rm $dd
rmdir `dirname $dd` 2>/dev/null
done
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be worth functionizing since it's used twice

@chrissie-c chrissie-c merged commit 2d3cd76 into ClusterLabs:main Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants