AFS sort of supports hardlinks, but not really - you can only hardlink
within directories, not across them. This means that the hardlink test
suite probe will pass, but ccache is unable to create hardlinks to its
cache directory and the test suite will fail. Modify
SUITE_hardlink_PROBE() to use a cross-directory hardlink to correctly
detect this case.
Co-authored-by: Alexander Lanin <alex@lanin.de>
Co-authored-by: Joel Rosdahl <joel@rosdahl.net>
SUITE_hardlink_PROBE() {
- touch file1
- if ! ln file1 file2 >/dev/null 2>&1; then
+ # Probe hard link across directories since AFS doesn't support those.
+ mkdir dir
+ touch dir/file1
+ if ! ln dir/file1 file2 >/dev/null 2>&1; then
echo "file system doesn't support hardlinks"
fi
}