Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

add projection test handlers to test suite #39

Merged
merged 3 commits into from
Feb 12, 2019

Conversation

chrisd8088
Copy link
Collaborator

@chrisd8088 chrisd8088 commented Feb 12, 2019

This PR should address most of #7 as it is written, although more work is required to actually test direction projection, so that'll be a follow-up PR or two.

The primary changes here add the --retval-file option so that the simple new projection-callback logging added in 0775f50 only generates messages when they are expected by the test scripts. Otherwise, background processes (like gvfs-udisks2-volume-monitor or even our wait_mount helper) cause initial log messages as they probe the new mount point which then throw off our tests. We only want to start logging once things are up and running, after we know that -- at a minimum -- wait_mount (if not some other system daemon) has ensured that at least one program has triggered projection (really, hydration) of the top-level mount point directory.

We can also control the return values injected by the test handlers by placing values into the "control file" specified with --retval-file. This isn't used much yet, but we could potentially combine many of the existing test scripts using this functionality.

@chrisd8088 chrisd8088 added testing projection Filesystem projection logic labels Feb 12, 2019
Using this option instead of the blanket --retval option will
allow handler test programs to inject error (or other) responses
only at times determined by the test script.
When the file specified with --retval-file exists, the test
handlers log messages on each event; when the file does not exist,
no messages are output from the test handlers.

This commit has no functional change on the test suite, but once
we add test handlers for projection events, we will need to toggle
test handler output on and off, or else initial projection events
triggered by external system processes may interfere with our tests.

(If additional control proves necessary in the future, we can also
add a list of valid process names or process groups to the control file
and then only report handler events corresponding to those processes.)
@chrisd8088 chrisd8088 force-pushed the projection-test-handlers branch from 0775f50 to 76946dd Compare February 12, 2019 22:03
@chrisd8088 chrisd8088 requested a review from kivikakk February 12, 2019 22:50
Copy link
Contributor

@kivikakk kivikakk left a comment

Choose a reason for hiding this comment

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

Yay, progress!

@kivikakk kivikakk merged commit 27772ea into master Feb 12, 2019
@kivikakk kivikakk deleted the projection-test-handlers branch February 12, 2019 23:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
projection Filesystem projection logic testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants