# Check hard link with nonzero size field in tarball. -*- Autotest -*- # Copyright 2026 Free Software Foundation, Inc. # This file is part of GNU tar. # GNU tar is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # GNU tar is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Check extracting from a nonconforming tarball that has # a hard link with nonzero size. AT_SETUP([hard link with a nonzero size field]) AT_KEYWORDS([extract extrac34 hard link]) AT_DATA([archive.in], [/Td6WFoAAATm1rRGBMBwgFAhARwAAAAAAAAAAAbKrCjgJ/8AaF0AMIAzUBhoiawFdYeRen4lxlj0 QWRLpUM+28ArRsXVY5bGv4H5kijsqiJ4Z9YIVhZd01+IppF+AkltS60aB8fuUW35Tp/3XzUx9Mq2 4ypJFzvcgHXsSIvc9L+mmTDuHzhvJQ/oe7ya8QAASbOfD7CgZcIAAYwBgFAAAEWxohaxxGf7AgAA AAAEWVo= ]) AT_CHECK([base64 --help >/dev/null 2>&1 || AT_SKIP_TEST xz --help >/dev/null 2>&1 || AT_SKIP_TEST base64 -d < archive.in | xz -c -d > archive.tar ]) AT_CHECK([mkdir dir ]) AT_CHECK([tar -C dir -xf archive.tar || exit 1 cmp dir/a dir/b ]) AT_CLEANUP