Actions
Bug #876
closedCannot specify something else than an identifier as a variant tag
Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01/20/2015
Due date:
% Done:
0%
Estimated time:
Description
Using Babeltrace 1.2.0, it looks like the parser does not allow something else than an identifier to be used as a variant tag.
Metadata that passes:
/* CTF 1.8 */ trace { major = 1; minor = 8; byte_order = le; }; event { name = "file"; fields := struct { enum : integer { size = 8; } { TEN = 10, } choice; variant <choice> { integer { size = 32; } TEN; } var; }; };
Stream:
abc
Metadata that fails, but should pass:
/* CTF 1.8 */ trace { major = 1; minor = 8; byte_order = le; }; event { name = "file"; fields := struct { enum : integer { size = 8; } { TEN = 10, } choice; variant <event.fields.choice> { integer { size = 32; } TEN; } var; }; };
Babeltrace output:
[error] at line 16: token "event": syntax error, unexpected EVENT, expecting IDENTIFIER or ID_TYPE [error] Error creating AST [warning] Unable to open trace metadata for path ".". [warning] [Context] Cannot open_trace of format ctf at path .. [warning] [Context] cannot open trace "." from . for reading. [error] Cannot open any trace for reading. [error] opening trace "." for reading. [error] none of the specified trace paths could be opened.
Other metadata that fails, but should pass:
/* CTF 1.8 */ trace { major = 1; minor = 8; byte_order = le; }; event { name = "file"; fields := struct { struct { enum : integer { size = 8; } { TEN = 10, } choice; } structure; variant <structure.choice> { integer { size = 32; } TEN; } var; }; };
Babeltrace output (error is different):
[error] at line 18: token ".": syntax error, unexpected DOT, expecting GT [error] Error creating AST [warning] Unable to open trace metadata for path ".". [warning] [Context] Cannot open_trace of format ctf at path .. [warning] [Context] cannot open trace "." from . for reading. [error] Cannot open any trace for reading. [error] opening trace "." for reading. [error] none of the specified trace paths could be opened.
Updated by Mathieu Desnoyers almost 9 years ago
Very likely an issue in bt_lookup_path_definition().
Updated by Jonathan Rajotte Julien about 4 years ago
- Status changed from New to Invalid
State of babeltrace moved a lot since.
Closing this ticket as invalid. Reopen it if it stills apply to Babeltrace 2.
Actions