From: Petri Latvala <petri.latvala@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: IGT development <igt-dev@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests: close(fd) without igt_fixture considered harmful
Date: Mon, 26 Nov 2018 14:55:27 +0200 [thread overview]
Message-ID: <20181126125527.GE17124@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20181126100824.31623-1-daniel.vetter@ffwll.ch>
On Mon, Nov 26, 2018 at 11:08:24AM +0100, Daniel Vetter wrote:
> Some tests assume that close on an unopened fd is fine, except it's
> not just unopened but actually stack garbage. There's a good chance we
> end up running close(0), which wreaks the testcase enumeration. Fix
> this.
>
> Not sure there's a better way to catch this than git grep plus lots of
> manual auditing ... The unit tests only catch it by accident (x86
> works fine, I hit it in one testcase only cross-building to aarch64).
Not sure if this is better... At least it's a doublecheck:
# for a in `find -maxdepth 1 -executable -type f`; do valgrind --log-file=${a}.valgrind $a --list-subtests; done
...
# grep 'close(fd)' *.valgrind
gem_tiled_fence_blits.valgrind:==32746== Syscall param close(fd) contains uninitialised byte(s)
gem_tiled_swapping.valgrind:==32441== Syscall param close(fd) contains uninitialised byte(s)
For a bonus missing igt_fixture,
gem_ctx_param.valgrind:==32483== Syscall param ioctl(fd) contains uninitialised byte(s)
--
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-11-26 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 10:08 [igt-dev] [PATCH i-g-t] tests: close(fd) without igt_fixture considered harmful Daniel Vetter
2018-11-26 12:10 ` Jani Nikula
2018-11-26 14:26 ` Daniel Vetter
2018-11-26 12:55 ` Petri Latvala [this message]
2018-11-26 13:41 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-11-26 17:30 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20181126125527.GE17124@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=igt-dev@lists.freedesktop.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