pmemfile icon indicating copy to clipboard operation
pmemfile copied to clipboard

preload_basic_commands test fails when executed from root

Open marcinslusarz opened this issue 7 years ago • 6 comments

It takes write permission from a file and expects overwriting it should fail.

marcinslusarz avatar Aug 03 '17 10:08 marcinslusarz

Those tests should not be run as root.

GBuella avatar Aug 03 '17 11:08 GBuella

I agree. We just need to detect it and refuse to run tests at all (I think it's preferred) or skip some of them.

marcinslusarz avatar Aug 03 '17 12:08 marcinslusarz

Yup, libpmemfile should just abort when root.

GBuella avatar Aug 03 '17 12:08 GBuella

libpmemfile tests, not libpmemfile!

marcinslusarz avatar Aug 03 '17 12:08 marcinslusarz

Well, both, that is the best.

GBuella avatar Aug 03 '17 12:08 GBuella

Then we wouldn't be able to test libpmemfile with pjdfstest. And I don't see any problem with handling root correctly. We already support chown, capabilities affecting file APIs, setuid & co.

marcinslusarz avatar Aug 03 '17 16:08 marcinslusarz