From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 110354] Confusing Junk in the results: Last errno: 25, Inappropriate ioctl for device
Date: Mon, 08 Apr 2019 14:53:33 +0000 [thread overview]
Message-ID: <bug-110354-502-CaLFntU52A@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-110354-502@http.bugs.freedesktop.org/>
[-- Attachment #1.1: Type: text/plain, Size: 1652 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=110354
--- Comment #1 from Arek Hiler <arkadiusz.hiler@intel.com> ---
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 266aa832..b235b18c 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -984,8 +984,11 @@ void igt_debug_wait_for_keypress(const char *var)
{
struct termios oldt, newt;
- if (!isatty(STDIN_FILENO))
+ if (!isatty(STDIN_FILENO)) {
+ errno = 0; /* otherwise may be ENOTTY */
return;
+ }
+
if (!igt_interactive_debug)
return;
Found the culprit in this particular case. This would suppress most of the
weird errno logged in kms tests.
The questions is now: do we really want to hunt all similar cases down? A round
of gdb through a couple of tests with 'watch errno' shows that it gets set to
non-zero value about a dozen times every single subtest. Depending when we hit
an assert we may get any of those printed out adding to confusion.
I see 3 options:
1. make sure that errno is reset to 0 by everything that touches it and change
my nickname to Sisyphus
2. get rid of printing errno in igt_assert(), but then lose valuable
information for all those igt_assert(write(...));
3. change igt_assert*(expr,...) macros so that they 'errno = 0;' before
evaluating expr
I think that 3 makes the most sense, then we can quickly go through all the
4000-ish of calls we have to make sure that we don't have any weird 'int ret =
write(); igt_assert(ret);' for those functions where errno matters.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2511 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-04-08 14:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 11:43 [Bug 110354] Confusing Junk in the results: Last errno: 25, Inappropriate ioctl for device bugzilla-daemon
2019-04-08 14:53 ` bugzilla-daemon [this message]
2019-08-06 8:30 ` bugzilla-daemon
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=bug-110354-502-CaLFntU52A@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@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;
as well as URLs for NNTP newsgroup(s).