github / libprojfs

Linux projected filesystem library
GNU Lesser General Public License v2.1
92 stars 14 forks source link

complete mirror tests #13

Closed kivikakk closed 5 years ago

kivikakk commented 5 years ago

Fixes #8.

This is still a WIP, but opening a PR because otherwise the branch can be a bit invisible.

I'll work on finishing these out today, thanks to the helpful comments in #8.

kivikakk commented 5 years ago

@chrisd8088 Tests for all operations should now be present (would appreciate a second set of eyes confirming this though); last is to go over each operation and test them on symlinks (or make sure such a test already exists), since they special case eeeverything.

kivikakk commented 5 years ago

@chrisd8088 ready for review!

kivikakk commented 5 years ago

❗️ Rebased after the #5 merge.

kivikakk commented 5 years ago

I realized you might be able to get rid of the parsing of output from stat entirely by using stat --printf to control the output to be just what you need. E.g., maybe basename $(stat --printf '%n\n' target/symlink) to get the file name alone, without a path? And I think the --printf option should also work for filesystem stats in t006 too.

Indeed, and I do use stat -c (--format) in a few other places; it was just handy to get a whole chunk of information at once and then compare or grep against it. I failed to realise how unreliable the output format of stat would be.