From: Eryu Guan <eguan@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic: make sure file size resource limit is honored by fs
Date: Fri, 16 Dec 2016 12:11:09 +0800 [thread overview]
Message-ID: <20161216041109.GK28577@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20161215173635.GB5355@birch.djwong.org>
On Thu, Dec 15, 2016 at 09:36:35AM -0800, Darrick J. Wong wrote:
> On Sat, Dec 03, 2016 at 02:26:00PM +0800, Eryu Guan wrote:
> > If a file size limitation is set, underlying filesystem should not
> > break the limit and exceed the max file size.
> >
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
[snip]
> > +
> > +# set max file size to 1G (in block number of 1k blocks), so it should be big
> > +# enough to let test run without bringing any trouble to test harness
> > +ulimit -f $((1024 * 1024))
> > +
> > +# exercise file size limit boundaries
> > +do_truncate $((1024 * 1024 * 1024 - 1)) $TEST_DIR/$seq.$$-1
> > +do_truncate $((1024 * 1024 * 1024)) $TEST_DIR/$seq.$$
> > +do_truncate $((1024 * 1024 * 1024 + 1)) $TEST_DIR/$seq.$$+1 2>&1 | \
> > + grep -o "File size limit exceeded"
>
> So I tried this out in a shell and was very surprised to get a core dump
> in addition to the 'File size limit exceeded' message. Other than that
> little surprise it looks ok to me....
Ah, default action to SIGXFSZ is coredump.. and I didn't see a coredump
because my shell doesn't allow it by default
# ulimit -a
core file size (blocks, -c) 0
...
Perhaps I can add a "ulimit -c 0" to avoid coredump & leaving a core
file in your fstests dir.
>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Thanks for the review!
Eryu
prev parent reply other threads:[~2016-12-16 4:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-03 6:26 [PATCH] generic: make sure file size resource limit is honored by fs Eryu Guan
2016-12-15 7:05 ` Eryu Guan
2016-12-15 17:36 ` Darrick J. Wong
2016-12-16 4:11 ` Eryu Guan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161216041109.GK28577@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox