A d entry without a mode reset an existing directory to 0755. On
finix a bare "d /tmp" line took the sticky bit and the write
permission for others off the /tmp mount, so nobody but root could
create files there:
mkdir -p /tmp/t && chmod 1777 /tmp/t
echo 'd /tmp/t' > t.conf
tmpfiles --create t.conf
stat -c %a /tmp/t
This gave 755. Commit 3a72d126 made the chmod of an existing
directory work, and it used the 0755 default for a new directory as
the mode to set.
The default is now only for creating the directory. With no mode in
the entry, dirperm() leaves the mode alone.
Fixes #523
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
(cherry picked from commit 94bdccd2002d8847736743cb31e9b7bd56bdcada)
Finit Test Suite
Finit comes with a set of tests and a small framework for running them. Contributors are encouraged to write new tests when implementing features, or fixing bugs.
Each test is run in isolation, in it's own namespace. Finit will therefore be able to be launched as PID 1. Since it's also running with it's own root directory it will be able to function properly without having any super user privileges in the host environment.
Running tests
To run the test suite, first build Finit, e.g:
./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc --localstatedir=/var --enable-testserv-plugin
make -j9 clean all
Then run (parallel does not work atm):
make check
make check will set up the required assets for the test environment, and then
run the full set of tests. The environment is not removed afterwards so at
this point individual tests can be executed without having to run the entire
test suite, which is handy when developing new tests or debugging existing
test. To execute an individual test, simply invoke the script containing it:
./test/name-of-the-test.sh
Another way to run a single (or more) test(s) is to define the TESTS
environment variable:
TESTS="start-kill-service" make check