public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib/tst_device.c: Add exception handling of function tst_find_free_loopdev
Date: Fri, 12 Mar 2021 11:56:49 +0100	[thread overview]
Message-ID: <YEtI8Xbl5BYv5Emo@yuki.lan> (raw)
In-Reply-To: <F3D3F6AC3820BB4C9FCA340DB5C32CB403891318@dggeml511-mbs.china.huawei.com>

Hi!
> > In addition, when "loopdevno = ioctl(fd, LOOP_CTL_GET_FREE)" get free
> > loop device i, and the loop device file /dev/loop%i has been removed??
> > set_dev_path will return 1 and set " /dev/block/loop%i "
> > in path. It might happened in many Embedded Systems because the test
> > process's id is root always. So we could also Add exception handling?
> 
> Or maybe we can try to create it when node doesn't exist?
> 	mknod("/dev/loop%i", S_IFBLK|0644, makedev(7, i))

I do not really get what happens on your system. It looks like dev fs is
not properly populated, which would be bug in your system rather than in
the test library.

What is the state of /dev/loop* and /dev/block/loop* before you attempt
to run the test?

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-03-12 10:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  9:54 [LTP] [PATCH] lib/tst_device.c: Add exception handling of function tst_find_free_loopdev zhaogongyi
2021-03-12 10:56 ` Cyril Hrubis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-15 12:06 zhaogongyi
2021-03-12  7:18 zhaogongyi
2021-03-10  8:10 Zhao Gongyi
2021-03-10 11:13 ` Petr Vorel
2021-03-10 12:20 ` Li Wang
2021-03-10 14:03   ` Petr Vorel

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=YEtI8Xbl5BYv5Emo@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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