Closed azubieta closed 5 years ago
Run the function on an AppImage that is already executable, and have the test fail if libappimage tries to set the executable bit again despite that it is already there?
fail if libappimage tries to set the executable
I have no way of intercept this without modifying the libappimage
code.
Why do you think the libappimage
code should not be modified?
Why do you think the libappimage code should not be modified?
I guess that I didn't explain it properly. To the set execution permissions is performed by a single function call inside the register method. It would be required to extract that call and put it inside some kind of weird wrapper to be able to know from the tests environment whether it has been called or not. All of that will also reduce performance and will increase the complexity or our code base.
In this scenario the relation effort vs gain is really bad. That's why I don't want to do such modification on libappiimage.
The ideal use case will be having an AppImage file without execution permission that doesn't belongs to the current user. We cold create such file but once we do chown
on it we will lose control and this may just lead to weird things.
I'm also thinking on a way on creating a uni-test for this scenario. Any ideas @probonopd