Actions
Bug #1002
closedlttng snapshot on an empty tracing session results in an unknown error with --mi=xml
Start date:
03/14/2016
Due date:
% Done:
100%
Estimated time:
Description
Recording a snapshot on a session which has recorded no events results in the following output in MI output mode:
$ lttng --mi=xml snapshot record | xmllint --format - Error: Unknown error code Error: Command error <?xml version="1.0" encoding="UTF-8"?> <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"> <name>snapshot</name> <output> <snapshot_action> <name>record</name> <output/> </snapshot_action> </output> <success>false</success> </command>
(Unknown Error Code + Command error)
while the human output results in the following output:
$ lttng snapshot record Warning: No data available in snapshot
Also, the commands should not result in an error (warning is fine) since the user has no control on whether or not applications (or the kernel) have produced any event between the start of the tracing session and the recording of the snapshot.
Actions