ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0005174 | Part 01: TTCN-3 Core Language | Clarification | public | 12-05-2009 19:34 | 25-03-2010 15:59

Reporter | Wolfgang Seka |
Assigned To | Ina Schieferdecker |
Priority | high | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.2.1 (published 2010-07) | Fixed in Version | v4.2.1 (published 2010-07) |
Clause Reference(s) | TTCN-3 Core Language: cl. 16.1.4 and 21.2
Source (company - Author) | MCC160

Summary | 0005174: Test case termination in case of fatal errors: function called by templates

Description

When there is a fatal error in function which is running on a component or called by a function running on a component the component may be terminated by "self.kill".
But there are functions which may be used by templates as well.
Typical use cases are conversion functions which may be used on different components as well as within templates.
Currently acc. to the core language spec (cl. 16.1.4a)) a function cannot use "self.kill" when being used in a template and there is also no way to query whether the function is called by a template or another function.
Possible solutions are
1. introduction of a "running on a component" operation and allowing "self.kill" in case of not being in a template
2. buidin function for immediate termination of the whole test case with verdict "error"
Note: A test case writer providing a function might not be aware that this function may be used in a template (missing of "runs on" is no criteria) and a test case writer using a function in a template in general is not aware of whether the functions directly or indirectly uses e.g. "self.kill"

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | Resolution-CR5174-Part1-091209.doc (161,280) 09-12-2009 10:46 http://oldforge.etsi.org/mantis/file_download.php?file_id=2303&type=bug Resolution-CR5174-Part4-091209.doc (276,480) 09-12-2009 10:47 http://oldforge.etsi.org/mantis/file_download.php?file_id=2304&type=bug CR5174_part6.doc (131,584) 25-03-2010 07:10 http://oldforge.etsi.org/mantis/file_download.php?file_id=2355&type=bug

Issue History
Date Modified | Username | Field | Change
12-05-2009 19:34 | Wolfgang Seka | New Issue |
12-05-2009 19:34 | Wolfgang Seka | Clause Reference(s) | => TTCN-3 Core Language: cl. 16.1.4 and 21.2
12-05-2009 19:34 | Wolfgang Seka | Source (company - Author) | => MCC160
30-06-2009 09:39 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
30-06-2009 09:40 | Ina Schieferdecker | Status | new => assigned
30-06-2009 09:40 | Ina Schieferdecker | Assigned To | => Jens Grabowski
30-06-2009 10:20 | Ina Schieferdecker | Category | TTCN-3 Core Language => Clarification
30-06-2009 10:20 | Ina Schieferdecker | Target Version | => Edition 4.2.1 (not yet published)
09-12-2009 10:46 | Jens Grabowski | File Added: Resolution-CR5174-Part1-091209.doc |
09-12-2009 10:47 | Jens Grabowski | File Added: Resolution-CR5174-Part4-091209.doc |
09-12-2009 10:48 | Jens Grabowski | Note Added: 0009112 |
09-12-2009 10:49 | Jens Grabowski | Assigned To | Jens Grabowski => Gyorgy Rethy
18-03-2010 07:34 | Ina Schieferdecker | Target Version | Edition 4.2.1 (not yet published) => Edition 5.1.1 (not yet published)
22-03-2010 16:48 | Gyorgy Rethy | Resolution | open => fixed
22-03-2010 16:48 | Gyorgy Rethy | Target Version | Edition 4.3.1 (not yet published) => Edition 4.2.1 (not yet published)
22-03-2010 16:51 | Gyorgy Rethy | Note Added: 0009245 |
22-03-2010 16:51 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
22-03-2010 16:51 | Gyorgy Rethy | Status | assigned => resolved
23-03-2010 12:56 | Gyorgy Rethy | Note Added: 0009259 |
23-03-2010 12:56 | Gyorgy Rethy | Assigned To | Ina Schieferdecker => Jacob Wieland - Spirent
23-03-2010 12:56 | Gyorgy Rethy | Status | resolved => assigned
23-03-2010 12:58 | Gyorgy Rethy | Priority | normal => high
23-03-2010 12:58 | Gyorgy Rethy | Note Edited: 0009259 |
23-03-2010 15:11 | Jacob Wieland - Spirent | Note Added: 0009263 |
23-03-2010 15:13 | Jacob Wieland - Spirent | Note Edited: 0009263 |
24-03-2010 14:40 | Ina Schieferdecker | Note Added: 0009283 |
24-03-2010 16:31 | Jacob Wieland - Spirent | Note Added: 0009287 |
24-03-2010 16:46 | Gyorgy Rethy | Note Added: 0009289 |
24-03-2010 18:37 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Ina Schieferdecker
25-03-2010 07:10 | Ina Schieferdecker | File Added: CR5174_part6.doc |
25-03-2010 07:11 | Ina Schieferdecker | Note Added: 0009291 |
25-03-2010 07:12 | Ina Schieferdecker | Note Edited: 0009291 |
25-03-2010 07:13 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Jens Grabowski
25-03-2010 07:13 | Ina Schieferdecker | Fixed in Version | => Edition 4.2.1 (not yet published)
25-03-2010 13:04 | Jens Grabowski | Assigned To | Jens Grabowski => Ina Schieferdecker
25-03-2010 15:33 | Gyorgy Rethy | Note Added: 0009315 |
25-03-2010 15:33 | Gyorgy Rethy | Status | assigned => resolved
25-03-2010 15:59 | Ina Schieferdecker | Status | resolved => closed

Notes

(0009112)
Jens Grabowski
09-12-2009 10:48

Resolution follows proposal 2. in the CR description. Assigned to GyÃ¶rgy for proofreading.

(0009245)
Gyorgy Rethy
22-03-2010 16:51

Proposed solution is OK with me.

(0009259)
Gyorgy Rethy
23-03-2010 12:56 (edited on: 23-03-2010 12:58)

Jacob to add TCI extensions needed to add the feature.

(0009263)
Jacob Wieland - Spirent
23-03-2010 15:11 (edited on: 23-03-2010 15:13)

In part 6 (TCI) description, we need to define two new operations:
TciCDProvided.tciStopTestCaseReq(in TString message)
in parameters: message - A string value, i.e. the message to be logged.
return value: void
description: Shall be called by the TE when the TTCN-3 statement testcase.stop() will be executed within the test case.
TciCDRequired.tciStopTestCase(in TString message)
in parameters: message - A string value, i.e. the message to be logged.
return value: void
description: This operation shall be called by the CH at the local TE of the MTC when at a remote TE a provided tciStopTestCaseReq has been called.
The TE shall set the overall verdict to error with the given message as reason and stop the running behaviour on the MTC (which shall lead to the stopping of all ptcs, as well).
Also, the table relating TTCN-3 operations with Tci-Methods needs two new entries and all the language mappings need two new entries for the mapped functions as well.

(0009283)
Ina Schieferdecker
24-03-2010 14:40

STF decided not to add additional CH operations as the testcase.stop functionality can be realized by the TE by setting error verdict, getting the MTC and stopping the MTC.
In order to make that visible in the TLI log, an additional verdict constant is introduced: FATAL representing user-generated test case errors.
In addition, the optional parameter of the testcase.stop goes to the reason parameter of the TLI setverdict operation.

(0009287)
Jacob Wieland - Spirent
24-03-2010 16:31

When the testcase.stop operation is invoked from the TE, the following actions need to be taken by the TE:
- the overall verdict should be set to user_error with the message given to the invocation of the testcase.stop() operation as parameter as the verdict reason
- a reference to the mtc should be obtained by invoking triGetMtcReq() in the CH interface
- the mtc should be stopped by invoking triStopTestComponentReq() in the CH with the obtained reference to the mtc.

(0009289)
Gyorgy Rethy
24-03-2010 16:46

The new verdict constant should not be called FATAL (thi was rather an explanation from MC160, why they want this feature) but USER_ERROR. This is more expressive as in fact with the new operation we give the possibility to he user to invoke a testcase error from the code; but have no possibility to check if the cause is really fatal error from the test case logic point of view).

(0009291)
Ina Schieferdecker
25-03-2010 07:11 (edited on: 25-03-2010 07:12)

Part 1 implemented, part 6 resolved: - USER_ERROR defined as additional verdict - testcase.stop as a sequence of TCI operations explained - use of tliTcTerminated to log testcase.stop assigned to Jens for proofreading

(0009315)
Gyorgy Rethy
25-03-2010 15:33

Looked at, OK with me.