Skip to content

filterfs: don't use /dev in test#1848

Open
hdonnay wants to merge 1 commit intoquay:mainfrom
hdonnay:bug/filterfs-concurrent
Open

filterfs: don't use /dev in test#1848
hdonnay wants to merge 1 commit intoquay:mainfrom
hdonnay:bug/filterfs-concurrent

Conversation

@hdonnay
Copy link
Copy Markdown
Member

@hdonnay hdonnay commented Apr 28, 2026

The TestDev test used the machine's /dev directory to test special files getting filtered out. However when running concurrently with tests starting and stopping PostgreSQL, the test would flap on shm files disappearing from underneath it.

This replaces the test with creating a fifo in a test-created directory, which will not have files change unexpectedly.

@hdonnay hdonnay requested a review from a team as a code owner April 28, 2026 22:44
@hdonnay hdonnay requested review from crozzy and removed request for a team April 28, 2026 22:44
@hdonnay hdonnay force-pushed the bug/filterfs-concurrent branch from f2205c0 to 9c530b4 Compare April 28, 2026 22:45
Comment thread internal/filterfs/fs_test.go Outdated
Comment thread internal/filterfs/fs_test.go Outdated
Comment thread internal/filterfs/fs_test.go Outdated
@hdonnay
Copy link
Copy Markdown
Member Author

hdonnay commented Apr 29, 2026

Ah, yeah, I'm not sure this is testing the right thing now. Will rework a bit.

The `TestDev` test used the machine's `/dev` directory to test special
files getting filtered out. However when running concurrently with
tests starting and stopping PostgreSQL, the test would flap on `shm`
files disappearing from underneath it.

This replaces the test with creating a socket in a test-created directory,
which will not have files change unexpectedly.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Change-Id: I43f94ee1f59234a423dfead4bccddbfb6a6a6964
@hdonnay hdonnay force-pushed the bug/filterfs-concurrent branch from 9c530b4 to 39499d2 Compare April 29, 2026 18:33
@hdonnay hdonnay requested a review from crozzy April 29, 2026 18:36
@hdonnay
Copy link
Copy Markdown
Member Author

hdonnay commented Apr 29, 2026

Updated:

  • use net.Listen to create a unix socket: The previous invocation was not actually creating a "special" file.
  • use slices.DeleteFunc: The ruby arrow was bugging me.
  • misc doc touchups

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants