google / mount-zip

FUSE file system for ZIP archives
GNU General Public License v3.0
159 stars 16 forks source link

Test fails when run as root #21

Closed tenzap closed 7 months ago

tenzap commented 7 months ago

running the blackbox tests as root fails with this error (there is no problem when run as a regular user):

INFO:root:Checking '/tmp/tmpglxkaon7'...
ERROR:root:Want error: 21, Got error: 29 in Command '['mount-zip', '/tmp/tmpglxkaon7', '/tmp/tmpta59ago2']' returned non-zero exit status 29.
---------- 1 root   root      0 Apr 12 07:20 tmpglxkaon7
fdegros commented 7 months ago

Ah indeed.

I don't develop as root, which explains why I didn't see this failing test.

In this case, it turns out that the root user can read a file even if all its access bits are set to 0. So a test checking for a particular error condition fails in a different way than expected when getting run as root.

tenzap commented 7 months ago

thanks for the fixes of #21 & #22