mirror of https://github.com/proot-me/proot.git
Fix test failure due to increased shebang limit (#276)
On linux kernel 5.1+
This commit is contained in:
parent
4f431c6470
commit
18e4c77ec2
|
@ -26,15 +26,17 @@ RESULT="$(${PROOT} ${TMP})"
|
|||
EXPECTED="$(${TMP})"
|
||||
|
||||
[ "${RESULT}" = "${EXPECTED}" ]
|
||||
[ "${RESULT}" = "${TMP}" ]
|
||||
|
||||
echo '#!/../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../usr/bin/echo XXXXXXXXX' > "${TMP}"
|
||||
|
||||
if ${TMP}; then
|
||||
# Linux kernel 5.1-rc1 increases the shebang limit to 256
|
||||
[ "${RESULT}" = "XXXXXXXXX ${TMP}" ]
|
||||
${PROOT} ${TMP}
|
||||
else
|
||||
[ "${RESULT}" = "${TMP}" ]
|
||||
! ${PROOT} ${TMP}
|
||||
[ $? -eq 0 ]
|
||||
|
||||
! ${TMP}
|
||||
[ $? -eq 0 ]
|
||||
fi
|
||||
|
||||
echo '#! ' > ${TMP}
|
||||
|
||||
|
|
Loading…
Reference in New Issue