From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] How to identify all LTP tests needing block device and how to skip them?
Date: Mon, 30 Nov 2015 12:04:25 +0100 [thread overview]
Message-ID: <20151130110425.GA11935@rei.lan> (raw)
In-Reply-To: <565847AC.9040807@st.com>
Hi!
> I contact you because i am running LTP tests on a board and at the end i
> always get this error message :
> "
> <<<test_end>>>
> INFO: ltp-pan reported some tests FAIL
> LTP Version: 20140422
>
> ###############################################################
>
> Done executing testcases.
> LTP Version: 20140422
> ###############################################################
> losetup: /dev/loop0: failed to use device: No such file or directory
> "
There is ~40 testcases that needs a block device to run, mostly
testcases that test mount() syscall but there are also tests for quite a
lot of filesystem related syscalls to test conditions as ENOSPC and
things like mkfs testcases.
> I think that occurs because some tests actually need block device which
> i don't have.
This is a bit more complicated. The testcases needs a block device, if
you do not pass it to the runltp script (or does not export it as
TST_DEVICE) the testcases try to create a loopback device.
Now looking at the error above it looks like loosetup failed because
there is no support for loop devices in kernel. So the failure is from a
test coded in shell (since the C library calls the ioctls() directly).
And the equivalent functionality written in C library should handle the
situation more gracefully and exit the test with TCONF.
> Although all tests are executed regardless of this error,
> the blocking point is that i run LTP tests from custom script and this
> error provokes an exit from custom script (of course after LTP tests
> execution is done).
> My question is how can i identify all these tests which can potentially
> create this error and skip them?
Grep for tst_acquire_device() function in the source code. There are two
variants, one is coded in shell and one is coded in C. You are proably
looking for the testcases that are written in shell though.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2015-11-30 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 12:08 [LTP] How to identify all LTP tests needing block device and how to skip them? Tidjani Ali Hissein ACHE
2015-11-30 11:04 ` Cyril Hrubis [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=20151130110425.GA11935@rei.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