Message ID | CAOQ4uxj5QxcGRMGT78qQf0vmjjP2Do8uaOX-B31HYXt-Wz3Fjg@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Oct 19, 2016 at 9:41 AM, Amir Goldstein <amir73il@gmail.com> wrote: > But I noticed a strange behavior: > When you run t_truncate_self from upper you get success for not being > able to truncate. > When you run t_truncate_self from lower you get an error for being > able to truncate > This is ok as you write, but... > When you re-run t_truncate_self file that just got copied-up you get > segmentation fault > and that is not ok. > > You get try the patch to xfstest below to reproduce the problem: Why would a program want to self truncate itself, except to test denywrite? Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Oct 19, 2016 at 11:12 AM, Miklos Szeredi <miklos@szeredi.hu> wrote: > On Wed, Oct 19, 2016 at 9:41 AM, Amir Goldstein <amir73il@gmail.com> wrote: > >> But I noticed a strange behavior: >> When you run t_truncate_self from upper you get success for not being >> able to truncate. >> When you run t_truncate_self from lower you get an error for being >> able to truncate >> This is ok as you write, but... >> When you re-run t_truncate_self file that just got copied-up you get >> segmentation fault >> and that is not ok. >> >> You get try the patch to xfstest below to reproduce the problem: > > Why would a program want to self truncate itself, except to test denywrite? > Forget it. my re-run test was silly. Because the truncate succeeded it was trying to run a corrupted executable. I will send patches to fix the test according to new behavior. Thanks, Amir. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Oct 19, 2016 at 11:30 AM, Amir Goldstein <amir73il@gmail.com> wrote: > On Wed, Oct 19, 2016 at 11:12 AM, Miklos Szeredi <miklos@szeredi.hu> wrote: >> On Wed, Oct 19, 2016 at 9:41 AM, Amir Goldstein <amir73il@gmail.com> wrote: >> >>> But I noticed a strange behavior: >>> When you run t_truncate_self from upper you get success for not being >>> able to truncate. >>> When you run t_truncate_self from lower you get an error for being >>> able to truncate >>> This is ok as you write, but... >>> When you re-run t_truncate_self file that just got copied-up you get >>> segmentation fault >>> and that is not ok. >>> >>> You get try the patch to xfstest below to reproduce the problem: >> >> Why would a program want to self truncate itself, except to test denywrite? >> > > > Forget it. my re-run test was silly. Because the truncate succeeded > it was trying to run a corrupted executable. > > I will send patches to fix the test according to new behavior. Sent patches to fstests. Please review. > > Thanks, > Amir. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/tests/overlay/013 b/tests/overlay/013 index 09f3eb1..cd3d0c0 100755 --- a/tests/overlay/013 +++ b/tests/overlay/013 @@ -59,7 +59,7 @@ upperdir=$SCRATCH_DEV/$OVERLAY_UPPER_DIR mkdir -p $lowerdir mkdir -p $upperdir cp $here/src/t_truncate_self $lowerdir/test_lower -cp $here/src/t_truncate_self $lowerdir/test_upper +cp $here/src/t_truncate_self $upperdir/test_upper _scratch_mount @@ -67,8 +67,9 @@ _scratch_mount # test programs truncate themselfs, all should fail with ETXTBSY $SCRATCH_MNT/test_lower $SCRATCH_MNT/test_upper +# run test again after copy-up +$SCRATCH_MNT/test_lower # success, all done -echo "Silence is golden" status=0 exit diff --git a/tests/overlay/013.out b/tests/overlay/013.out index 3e66423..a8ee7cd 100644 --- a/tests/overlay/013.out +++ b/tests/overlay/013.out @@ -1,2 +1,2 @@ QA output created by 013 -Silence is golden +truncate(argv[0]) should have failed