]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-path: Set umask explicitly (#8616)
authorFilipe Brandenburger <filbranden@google.com>
Wed, 4 Apr 2018 09:17:19 +0000 (02:17 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 4 Apr 2018 09:17:19 +0000 (11:17 +0200)
commitedb3ca0d611e33033058db1482150e929c55916f
tree4122e2c84ebec0c7e61c7fd5185fbaab8f71fd9c
parentadd384dd4d2b96db6ace5ad9c52b1dd7553ebec2
test-path: Set umask explicitly (#8616)

Running `test-path` under an umask such as 027 fails with:

  Assertion '(s.st_mode & S_IRWXO) == 0004' failed at ../src/test/test-path.c:247, function test_path_makedirectory_directorymode(). Aborting.

Looking at directory /tmp/test-path_makedirectory, it was indeed created
with mode 0740, applying the umask to the requested 0744.

Set an explicit umask for this test, to ensure reproducible results.
src/test/test-path.c