public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: Petr Vorel <pvorel@suse.cz>, Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] Verify virtual device availability
Date: Wed, 11 Dec 2024 09:00:24 +0100	[thread overview]
Message-ID: <97682364-faaa-417d-aeee-c792fd227de7@suse.com> (raw)
In-Reply-To: <20241210202231.GA349775@pevik>

Hi Petr,

On 12/10/24 21:22, Petr Vorel wrote:
> Hi Andrea,
>
> ...
>>   static void setup(void)
>>   {
>>   	fd_send = open_uinput();
>> +	if (fd_send == -1)
>> +		tst_brk(TCONF, "Virtual device is not available");
> Thinking about it twice, how about renaming the function safe_open_uinput()
> and add tst_brk(TCONF, ...) there?
>
> Function is not used in library where tst_brk(TCONF, ...) would be problematic,
> therefore I would not even bother with having SAFE_OPEN_UINPUT() which would
> evaluate open_uinput().
Usually SAFE_* macros just TBROK the tests, so I'm not sure about this 
approach.
Alternatives?
> Kind regards,
> Petr
Andrea

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2024-12-11  8:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 14:13 [LTP] [PATCH] Verify virtual device availability Andrea Cervesato
2024-12-10 17:21 ` Petr Vorel
2024-12-11 10:15   ` Andrea Cervesato via ltp
2024-12-10 20:22 ` Petr Vorel
2024-12-11  8:00   ` Andrea Cervesato via ltp [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=97682364-faaa-417d-aeee-c792fd227de7@suse.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=andrea.cervesato@suse.de \
    --cc=pvorel@suse.cz \
    /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