From: Cyril Hrubis <chrubis@suse.cz>
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [RFC PATCH] Asynchronous module unloading and tst_run_cmd
Date: Tue, 20 Jan 2015 12:43:29 +0100 [thread overview]
Message-ID: <20150120114329.GA11013@rei> (raw)
In-Reply-To: <54BE2EF3.3010604@oracle.com>
Hi!
> >> There is one more issue with tbio. :(
> >>
> >> Sometimes it may fail with:
> >>
> >> ltp_tbio 0 TINFO : Device opened successfully
> >> ltp_tbio 1 TPASS : success on LTP_TBIO_ALLOC test
> >> ltp_tbio 2 TPASS : success on LTP_TBIO_CLONE test
> >> ltp_tbio 3 TPASS : success on LTP_TBIO_GET_NR_VECS test
> >> ltp_tbio 4 TPASS : success on LTP_TBIO_ADD_PAGE test
> >> ltp_tbio 5 TPASS : success on LTP_TBIO_SPLIT:write to dev
> >> ltp_tbio 6 TPASS : success on LTP_TBIO_DO_IO:write to dev
> >> ltp_tbio 7 TPASS : success on LTP_TBIO_DO_IO:read from dev
> >> ltp_tbio 8 TPASS : success on LTP_TBIO_PUT test
> >> ERROR: Module ltp_tbio is in use
> >> ltp_tbio 9 TBROK : tst_run_cmd.c:84: failed to exec cmd 'rmmod' at tst_run_cmd.c:84
> >> ltp_tbio 10 TBROK : tst_run_cmd.c:84: Remaining cases broken
> >
> > Hmm, would switch to modprobe -r fix that?
> >
> > I've been told several times that rrmod should not be used anymore
> > because modprobe handles things better...
> >
> > Or will modprobe -r fail the same way?
>
> Yes, modprobe -r will fail the same way. And using modprobe complicates
> the module loading/unloading wrappers, because we will need to place
> modules in /lib/modules/`uname-r`.
Ok, then we need this patchset to fix that.
Just side note, for modprobe -r the path for loading modules should not
matter and for loading modules we pass right path with -d.
> >> This is a rfc patch which fixes this problem.
> >>
> >> The main idea is to execute rmmod up to a timeout, and check if the module
> >> has been unloaded after each execution of rmmod.
> >>
> >> Summary of changes:
> >> * introduce tst_module_is_loaded() - checks if the module is in /proc/modules
> >> * change a bit interfaces of tst_run_cmd and cmd_run_cmd_fds (to conditionally
> >> check the program exit code to be able to continue the test if the program failed)
> >> * introducing a loop into tst_module_unload
> >>
> >
> > That sounds reasonably.
> >
> >> I would like somebody to review the general idea. If it's ok, I'll split this patch
> >> into several logically coupled ones and resend them.
> >>
> >> I'm really unsure if the changes to tst_run_cmd and cmd_run_cmd_fds are acceptable.
> >
> > I'm OK with adding the flag, it would need a better name though.
> >
>
> int check_exit_status ? check if it's set to a non-zero value
Maybe we can change the functions to pass the exit value (return int) in
case that it's not used internally and name the flag pass_exit_val.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2015-01-20 11:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 16:43 [LTP] [RFC PATCH] Asynchronous module unloading and tst_run_cmd Stanislav Kholmanskikh
2015-01-19 14:52 ` Cyril Hrubis
[not found] ` <54BE2EF3.3010604@oracle.com>
2015-01-20 11:43 ` Cyril Hrubis [this message]
2015-01-26 10:15 ` [LTP] [PATCH 1/2] tst_run_cmd: add an option to pass the program exit code Stanislav Kholmanskikh
2015-01-26 13:04 ` Cyril Hrubis
2015-02-02 14:01 ` [LTP] [PATCH] doc: document tst_run_cmd Stanislav Kholmanskikh
2015-02-03 14:35 ` Cyril Hrubis
[not found] ` <54D0E4C2.6030004@oracle.com>
2015-02-03 16:00 ` [LTP] [PATCH V2] " Stanislav Kholmanskikh
2015-02-03 16:12 ` Cyril Hrubis
2015-02-03 16:08 ` [LTP] [PATCH] " Cyril Hrubis
2015-01-26 10:15 ` [LTP] [PATCH 2/2] tst_module: introduce a timeout to unload modules Stanislav Kholmanskikh
2015-01-26 13:11 ` Cyril Hrubis
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=20150120114329.GA11013@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=stanislav.kholmanskikh@oracle.com \
--cc=vasily.isaenko@oracle.com \
/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