Page MenuHomePhabricator

tests/ecore: check uid on ecore-file tests
ClosedPublic

Authored by zmike on Jul 9 2018, 3:35 AM.

Details

Summary

these tests will fail if run with root permission, so avoid checking them
when run as root

ref T7094

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zmike created this revision.Jul 9 2018, 3:35 AM
zmike requested review of this revision.Jul 9 2018, 3:35 AM
devilhorns requested changes to this revision.Jul 9 2018, 6:37 AM
devilhorns added inline comments.
src/tests/ecore/ecore_test_ecore_file.c
310

I think this #endif should be moved to below the }. Reasoning is that if HAVE_GETUID and HAVE_GETEUID are NOT defined, then the code inside the brackets would still get run.

326

Same as above

342

Same as above

This revision now requires changes to proceed.Jul 9 2018, 6:37 AM
zmike requested review of this revision.Jul 9 2018, 9:32 AM
zmike added inline comments.
src/tests/ecore/ecore_test_ecore_file.c
310

This is intentional; if the system does not have these functions then there is either no need to check for root user or the method of checking is different and needs a separate case.

devilhorns accepted this revision.Jul 9 2018, 9:53 AM

Ahh ok

This revision is now accepted and ready to land.Jul 9 2018, 9:53 AM
This revision was automatically updated to reflect the committed changes.