gtramontina / ooze

🧬 Go Mutation Testing
MIT License
254 stars 8 forks source link

Tests do not compile on Windows #20

Open Bios-Marcel opened 1 year ago

Bios-Marcel commented 1 year ago

There are calls to syscall.Umask, which isn't supported on Windows. That test could be moved to a !windows only file.

gtramontina commented 1 year ago

Perhaps there's a different way of asserting that the overwritten file has the correct permissions…? I can't recall why exactly that assertion is in place, to be honest. 🤔

Bios-Marcel commented 1 year ago

Wouldn't calling FileMode be enough? I am a little confused as to what we need umask for?

Bios-Marcel commented 1 year ago

I noticed that there are a couple more tests that don't really work on windows.

19 also plays into this. When actually using hardlinks, we can't check for correct linkage anymore, as we can't necessarily detect whether we are a hardlink, since hardlinks are basically just normal files, unlike symlinks.

A workaround would be to manipulate the file and see whether both files change.

Additionally, some of the tests make assumptions on filepaths (different separators).