Skip to content

fail CI when successful tests leave stuff in TMPDIR #992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 3, 2022

Conversation

davepacheco
Copy link
Collaborator

See #991. This approach won't work until #990 is fixed.

Base automatically changed from test-cleanup to main April 28, 2022 21:00
@davepacheco
Copy link
Collaborator Author

On commit d00eab3, the Ubuntu run fails as expected:
https://github.com/oxidecomputer/omicron/runs/6218199983?check_suite_focus=true#step:14:8

rmdir: failed to remove '/tmp/omicron_tmp': Directory not empty

and the saved artifact includes at least the expected files:

drwxr-xr-x   8 dap  staff     256 Apr 28 14:52 ./
drwx------@ 33 dap  staff    1056 Apr 28 14:52 ../
drwxr-xr-x@  6 dap  staff     192 Apr 28  2022 .tmp2TLg0X/
drwxr-xr-x@  6 dap  staff     192 Apr 28  2022 .tmp5AbIJ6/
drwxr-xr-x@  6 dap  staff     192 Apr 28  2022 .tmpwkn9vC/
drwxr-xr-x@  3 dap  staff      96 Apr 28  2022 internal-dns-test.MemxaLPsS91D/
drwxr-xr-x@  3 dap  staff      96 Apr 28  2022 internal-dns-test.V6irJIMKSeF8/

I'm not yet sure what's up with those .tmp directories. I didn't expect those here.

The buildomat log shows similar files and then fails as expected:



6174 | 2022-04-28T21:09:40.123Z | + echo 'files in /var/tmp/omicron_tmp (none expected on success):'
-- | -- | --
6175 | 2022-04-28T21:09:40.129Z | files in /var/tmp/omicron_tmp (none expected on success):
6176 | 2022-04-28T21:09:40.135Z | + find /var/tmp/omicron_tmp -ls
6177 | 2022-04-28T21:09:40.141Z | 197333   17 drwxr-xr-x   7 build    build           7 Apr 28 21:09 /var/tmp/omicron_tmp
...
6302 | 2022-04-28T21:09:40.927Z | 201530    1 -rw-r-----   1 build    build          15 Apr 28 21:06 /var/tmp/omicron_tmp/.tmpyYVTg9/data/cockroach.advertise-addr
-- | -- | --
6303 | 2022-04-28T21:09:40.933Z | 201513    2 -rw-r--r--   1 build    build         710 Apr 28 21:06 /var/tmp/omicron_tmp/.tmpyYVTg9/cockroachdb_stderr
6304 | 2022-04-28T21:09:40.938Z | 201279    1 -rw-r-----   1 build    build          50 Apr 28 21:06 /var/tmp/omicron_tmp/.tmpyYVTg9/listen-url
6305 | 2022-04-28T21:09:40.945Z | + rmdir /var/tmp/omicron_tmp
6306 | 2022-04-28T21:09:40.951Z | rmdir: directory "/var/tmp/omicron_tmp": Directory not empty
6307 | 2022-04-28T21:09:40.958Z | process exited: duration 2484565 ms, exit code 2

Next I'm going to resync with "main", which includes the fix for #990.

@davepacheco
Copy link
Collaborator Author

I found the cause of the three extra .tmp* directories by running groups of tests individually until I found the ones that were leaking stuff. (Yeah, this kind of sucks. It'd be better if we created these directories named by the test in question.) Anyway, I'm rolling that fix into this change. Between that and pulling in #993 I'm hopeful the next run will be clean.

@davepacheco davepacheco requested a review from smklein April 28, 2022 23:16
@davepacheco davepacheco enabled auto-merge (squash) May 3, 2022 18:12
@davepacheco davepacheco merged commit 4b32480 into main May 3, 2022
@davepacheco davepacheco deleted the fail-ci-on-test-detritus branch May 3, 2022 21:54
leftwo pushed a commit that referenced this pull request Oct 16, 2023
Propolis changes:
PHD: refactor & add support Propolis server "environments" (#547)
Begin making Accessor interface more robust
Update Crucible and Omicron deps for Hakari fixes
Add cloud-init volume generation to standalone
Use specified toolchain version for all GHA checks
Use params to configure rust-toolchain in GHA
Update and lock GHA dependencies

Crucible changes:
Use regions_dataset path for apply_smf (#1000)
Don't unwrap when we can't create a dataset (#992)
Fix tests and update log messages. (#995)
Better backpressure (#990)
Update Rust crate proptest to 1.3.1 (#977)
Read only downstairs can skip Live Repair (#984)
Update Rust crate expectorate to 1.1.0 (#975)
Add trait for `ExtentInner` (#982)
report backpressure in upstairs_info dtrace probe (#987)
Support multiple downstairs operations in GtoS (#985)
leftwo added a commit that referenced this pull request Oct 16, 2023
Propolis changes:
PHD: refactor & add support Propolis server "environments" (#547) Begin
making Accessor interface more robust
Update Crucible and Omicron deps for Hakari fixes
Add cloud-init volume generation to standalone
Use specified toolchain version for all GHA checks Use params to
configure rust-toolchain in GHA
Update and lock GHA dependencies

Crucible changes:
Use regions_dataset path for apply_smf (#1000)
Don't unwrap when we can't create a dataset (#992) Fix tests and update
log messages. (#995)
Better backpressure (#990)
Update Rust crate proptest to 1.3.1 (#977)
Read only downstairs can skip Live Repair (#984)
Update Rust crate expectorate to 1.1.0 (#975)
Add trait for `ExtentInner` (#982)
report backpressure in upstairs_info dtrace probe (#987) Support
multiple downstairs operations in GtoS (#985)

---------

Co-authored-by: Alan Hanson <alan@oxide.computer>
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.

2 participants