From: chrubis@suse.cz
To: alexey.kodanev@oracle.com
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v3] fw_load: new test of device firmware loading
Date: Tue, 18 Jun 2013 16:21:18 +0200 [thread overview]
Message-ID: <20130618142118.GA15772@rei.suse.cz> (raw)
In-Reply-To: <51C064BD.1040104@oracle.com>
Hi!
> I thought it is not necessary because WITH_MODULES won't be set if make
> target is clean.
Ah, the config.mk is include omited on 'make clean'. However I think
that depending on this is too confusing.
> >> + if (access(module_name, F_OK) == -1) {
> >> + tst_brkm(TCONF, NULL,
> >> + "Test requires kernel module '%s'", module_name);
> >> + }
> > Here you expect that the module is in current directory, which is not
> > robust enough.
> >
> > What about creating module_exists() module_load() and module_unload()
> > library functions?
> Yeah, it is possible. Could I use tst_resource files for that? Or perhaps,
> would it be better to create tst_modules files?
Start a separate source file for that, tst_module(s) is OK.
> > The path to the module should be determined from LTPROOT env variable,
> > see lib/tst_resource.c and lib/tst_resource.h that handles similar
> > situation for files needed by the tests.
> >
> >
> >> +
> >> +static void cleanup(void)
> >> +{
> >> + if (skip_cleanup)
> >> + return;
> >> + int i;
> >> + for (i = fw_num - 1; i>= 0; --i) {
> > Is there any reason for the loop going backward?
> >
> It is the only way to successfully remove created directories.
> I need to start from the last created file or/and directory and move
> upward.
I see, some of the dirs are subdirs of previously created dirs. What
about adding a short comment explaining that?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2013-06-18 14:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-17 13:01 [LTP] [PATCH v3] fw_load: new test of device firmware loading Alexey Kodanev
2013-06-18 12:28 ` chrubis
[not found] ` <51C064BD.1040104@oracle.com>
2013-06-18 14:21 ` chrubis [this message]
[not found] ` <51C180F6.7040204@oracle.com>
2013-06-19 11:44 ` chrubis
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=20130618142118.GA15772@rei.suse.cz \
--to=chrubis@suse.cz \
--cc=alexey.kodanev@oracle.com \
--cc=ltp-list@lists.sourceforge.net \
--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