public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] How to identify all LTP tests needing block device and how to skip them?
@ 2015-11-27 12:08 Tidjani Ali Hissein ACHE
  2015-11-30 11:04 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Tidjani Ali Hissein ACHE @ 2015-11-27 12:08 UTC (permalink / raw)
  To: ltp

Hello,

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
"

I think that occurs because some tests actually need block device which
i don't have. 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?

Thank you for your reply.

Regards,
Tidjani ACHE

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [LTP] How to identify all LTP tests needing block device and how to skip them?
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2015-11-30 11:04 UTC (permalink / raw)
  To: ltp

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-30 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox