Although hardlinks across filesystems worked quite well in the current
implementation, we will run into problems when we try to implement
different backends for each sub-filesystem.
Note: EPERM is used instead of EXDEV since the mv command will silently
try to use copy-and-unlink when rename(2) fails with EXDEV.
The rules for linking has been reverted back:
- Before commit: Any inode, including forwarders, could be linked as
long as the parent is not a forwarder and is a directory.
- After commit: Only non-forwarders and root-forwarders are allowed to
be linked, and must be linked under a directory and not a forwarder.
- Test both file and directory.
- Test combinations of forwarder/non-forwarder source/destinations
- Test different destination filenames
- Test empty file
Can't test early failure behaviour when destination can't be unlinked,
since right now only non-empty directories and root directories can't be
unlinked and busybox's mv program does not support mv
--no-target-directory.
If mountpoint already exists, then we're silently making its children
inaccessible which may not be what we expected/intended.
Create a new forwarder inode upon mounting.
The testing "framework" code is slowly turning into spaghetti due to the
asynchronous nature of the triggers. Using async functions will help
clarify the program flow if we think we should address this issue.
I wrongly assumed that libv86 would perform faster than libv86-debug.
Using libv86 caused ttyS0 to timeout before initialising, so there was
not serial terminal to use by the time debian booted.
These tests do not work yet: it fails to capture the serial output
after root login.
In addition, these tests are currently too slow to run
since it takes a while to boot the debian image (> 16 minutes on my
machine while running the test in the terminal.)
Would need to switch to a newer minimal linux image when available.