Project

General

Profile

Actions

Bug #453

closed

ri: aspect common file should be element of united aspect file

Added by Alexey Khoroshilov about 14 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
High
Category:
-
Start date:
09/23/2010
Due date:
% Done:

100%

Estimated time:
Detected in build:
b65aa9b5
Platform:
Published in build:
1f558ed

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.


Related issues 5 (0 open5 closed)

Has duplicate C Instrumentation Framework - Feature #2159: A step to a general purpose C AOP implementationClosedEvgeny Novikov01/05/2012

Actions
Blocked by Linux Driver Verification - Bug #3198: RCV wrapper exceeds maximum filename length while preprocessingClosedEvgeny Novikov07/12/2012

Actions
Blocked by Linux Kernel Safety RuleDB - Feature #3204: Do not use BLAST specific in models and special LDV subroutinesClosedEvgeny Novikov07/13/2012

Actions
Blocked by Linux Driver Verification - Bug #3195: Rule instrumentor copies kernel-rules for each driver verifiedClosedEvgeny Novikov07/12/2012

Actions
Blocked by Linux Driver Verification - Feature #3203: Remove useless filter scripts from modelsClosedEvgeny Novikov07/13/2012

Actions
Actions #1

Updated by Pavel Shved about 14 years ago

  • Category set to Rules and Models
  • Assignee set to Evgeny Novikov
Actions #2

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).

Actions #3

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.

Actions #4

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
Actions #5

Updated by Evgeny Novikov over 12 years ago

  • Priority changed from Normal to High
Actions #6

Updated by Evgeny Novikov over 12 years ago

Discussion on this issue is going on here.

Actions #7

Updated by Evgeny Novikov over 12 years ago

After discussion we decided:
  • 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.

Actions #8

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`...

Actions #9

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.

Actions #10

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).

Actions #11

Updated by Evgeny Novikov over 12 years ago

  • % Done changed from 0 to 100

Applied in changeset commit:6842afc473d8878bd1c150ddf59596b30a655791.

Actions #12

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.

Actions #13

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.

Actions #14

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).

Actions #15

Updated by Evgeny Novikov about 12 years ago

Applied in changeset commit:6842afc473d8878bd1c150ddf59596b30a655791.

Actions #16

Updated by Evgeny Novikov about 12 years ago

Applied in changeset commit:6842afc473d8878bd1c150ddf59596b30a655791.

Actions #17

Updated by Evgeny Novikov about 12 years ago

  • Project changed from Linux Driver Verification to C Instrumentation Framework
  • Category deleted (15)
Actions #18

Updated by Evgeny Novikov almost 11 years ago

  • Status changed from Resolved to Closed

It works for a long period of time.

Actions

Also available in: Atom PDF