Bug #453
closedri: aspect common file should be element of united aspect file
100%
Description
In my opinion, there should be at least one aspect or common file in files section. I do not see a need for other restrictions.
At the moment if there is no common file defined, the rule-instrumentor fails with a message:
Common file 'workdir/work-9637b066f9092d04b78eb737dff4eefd0ed55634/drivers/base/firmware_class.c/work/current--X--commands.xml--X--defaultshadows--X--XXXX_1/artificial_env_1/csd_deg_dscv/0/dscv_tempdir/dscv/ri/XXXX_1/kernel-rules/' doesn't exist (for 'XXXX_1' model) at /home/tester/ldv/opt/bin/../bin/rule-instrumentor.pl line 723.
Updated by Pavel Shved almost 14 years ago
- Category set to Rules and Models
- Assignee set to Evgeny Novikov
Updated by Evgeny Novikov almost 14 years ago
- Status changed from New to Open
Really, both/either common and/or usual aspect files could be skipped. The one case is shown above. Other cases will happen probably. But it isn't very important issue.
Simple workaround for today: generate empty aspect file(s).
Updated by Evgeny Novikov over 13 years ago
- Category changed from Rules and Models to 15
As Alexey said common files are completely useless ones. And we really need to eliminate this historical artifact (*.aspect.common
files stupidly come from corresponding *.c
model files once).
First of all aspectator should be improved to support both *.aspect
and *.aspect.common
files joined together. Next RI, models and model database should be fixed to take this into consideration.
Updated by Evgeny Novikov over 13 years ago
- Subject changed from ri: common file should not be mandatory element of rule definition to ri: aspect common file should be element of united aspect file
Updated by Evgeny Novikov over 12 years ago
- Priority changed from Normal to High
Updated by Evgeny Novikov over 12 years ago
Discussion on this issue is going on here.
Updated by Evgeny Novikov over 12 years ago
- to implement one more advice type, new, that will allow to create a file specified as a corresponding pointcut
- to use parameters inside aspects those values comes from outside (for instance, as environment variables since this is rather universal and simple approach).
The last will be implemented as aspect pattern $env<PARAM_NAME>. Usage of parametrized patterns is new and more complicated as before. So, this is a good time to rework current stupid aspect parameters processing at the beginning.
Updated by Evgeny Novikov over 12 years ago
What do you think better: to use an old notation to access some indexed patterns (like $arg1, $arg2, etc.) or to use a new approach with parametrization (say, $arg<1>, $arg<2>, etc.).
BTW, to avoid ambiguity I guess that pattern parameters should be caught just in case when an open "brace" ('<' as I have used) follows a given pattern name. Otherwise such the cases will be treated incorrectly:
$arg1 < 10; $arg2 > 20;
(10 and $arg2 will become parameters for $arg1). I see on my keyword and cannot find any other standard characters that aren't used already. May be just '`' is left. So, may be $evn `LDV_COMMON_MODEL`...
Updated by Evgeny Novikov over 12 years ago
'bug-453' is a name of branches in ldv-tools, aspectator and kernel-rules repositories where results of work relevant to the given issue will be pushed.
Updated by Evgeny Novikov over 12 years ago
- Status changed from Open to Resolved
- Published in build set to f9f0431
Commit f9f0431 in master branch contains fixes of this issue and all related issues. It's checked by QA now. I appreciate that small tests will pass but night tests will fail (because of I have removed the old aspect 43_1 model that is used sometimes in regression tests).
Updated by Evgeny Novikov over 12 years ago
- % Done changed from 0 to 100
Applied in changeset commit:6842afc473d8878bd1c150ddf59596b30a655791.
Updated by Evgeny Novikov over 12 years ago
The previous comment was generated automatically. I guess that such the functionality should be turned off since it isn't accurate indeed.
Updated by Evgeny Novikov over 12 years ago
- Published in build changed from f9f0431 to 64ea01c
After reverting commit 62e27ed in kernel-rules and updating this submodule in 64ea01c small tests were passed. So let's wait for night test results tomorrow.
Updated by Evgeny Novikov over 12 years ago
- Published in build changed from 64ea01c to 1f558ed
It was merged to master in commit:f9f0431 and works stable since commit:1f558ed. Please close it (I will present this functionality as well as the another one).
From now just one file should be always specified as for plain and for aspect models:
<model id="32_1"> ... <kind>plain</kind> ... <files> <common>./files/model0032.c</common> ... </files> ... </model> <model id="32_1a"> ... <kind>aspect</kind> ... <files> <aspect>./files/model0032.aspect</aspect> ... </files> ... </model>
Plain models should always determine some model functions that should be implementation of some kernel core API functions (this can be done if kernel can be configured so that it doesn't provide these implementation by itself).
Aspect models may determine some model functions and model state via a special section in aspect file:
@include "ldv.aspect" ... new: file(LDV_COMMON_MODEL) { ... #include "ldv.h" ... }
(note that this section requires ldv.aspect to be included and most likely ldv.h providing general LDV routines should be included inside it).
Updated by Evgeny Novikov about 12 years ago
Applied in changeset commit:6842afc473d8878bd1c150ddf59596b30a655791.
Updated by Evgeny Novikov about 12 years ago
Applied in changeset commit:6842afc473d8878bd1c150ddf59596b30a655791.
Updated by Evgeny Novikov about 12 years ago
- Project changed from Linux Driver Verification to C Instrumentation Framework
- Category deleted (
15)
Updated by Evgeny Novikov over 10 years ago
- Status changed from Resolved to Closed
It works for a long period of time.