The test shell preserves $HOME
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Déjà Dup |
Fix Released
|
Low
|
Naël |
Bug Description
The test shell (deja-dup/
Is this intentional? I expected $HOME to be adjusted to point to the so-called data playground.
The drawbacks of not adjusting $HOME are, in my opinion:
* backup tests using the default include-list ['$HOME'] backup the user's potentially very large home directory, instead of the much smaller data in the data playground
* backup tests using the default backup repository ($HOME/deja-dup) write data out of the data playground, leading at best to leftover data in $HOME after exiting the test shell, at worst to messing up with the user's backups if he actually stores them in the default location
Wouldn't adjusting $HOME to the data playground bring more peace of mind to hacking and testing, and be less prone to accidents? Would it cause problems I am not foreseeing?
This can be done by simply adding HOME="${ROOTDIR}" to the test shell's script, in the section "Create fake home environment" or "If we are in local mode, point at our own data files and built objects". I'm not sure of what is the non-local mode and what should happen for it.
Included is a trivial patch that can be applied on top of Déjà Dup's current revision 1570. All the tests (make check) pass. One can also check that the two drawbacks I mentioned are now avoided with "DEJA_DUP_DEBUG=1 deja-dup --backup > patch.log" and the default settings.
Related branches
- Michael Terry: Approve
-
Diff: 55 lines (+16/-2)1 file modifiedtests/shell (+16/-2)
Changed in deja-dup: | |
status: | Triaged → Fix Committed |
Changed in deja-dup: | |
assignee: | nobody → Naël (nathanael-naeri) |
Changed in deja-dup: | |
status: | In Progress → Fix Committed |
Changed in deja-dup: | |
assignee: | nobody → Nathanaël Naeri (Naël) (nathanael-naeri) |
I can confirm this as well.