This file is indexed.

/usr/lib/python3/dist-packages/plainbox/impl/exporter/test_hexr.py is in python3-plainbox 0.25-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
# This file is part of Checkbox.
#
# Copyright 2015 Canonical Ltd.
# Written by:
#   Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
#
# Checkbox is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3,
# as published by the Free Software Foundation.
#
# Checkbox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Checkbox.  If not, see <http://www.gnu.org/licenses/>.

"""Tests for the hexr exporter."""

from io import BytesIO
from unittest import TestCase
from xml.etree import ElementTree

from plainbox.impl.exporter.jinja2 import CERTIFICATION_NS
from plainbox.impl.exporter.jinja2 import Jinja2SessionStateExporter
from plainbox.impl.exporter.jinja2 import do_strip_ns
from plainbox.impl.providers.special import get_stubbox
from plainbox.impl.resource import Resource
from plainbox.impl.result import JobResultBuilder
from plainbox.impl.session import SessionManager
from plainbox.impl.unit.exporter import ExporterUnitSupport
from plainbox.impl.unit.job import JobDefinition
from plainbox.public import get_providers
from plainbox.vendor import mock


class FilterTests(TestCase):

    """Tests for additional filters."""

    def test_do_strip_ns(self):
        env = mock.Mock()
        self.assertEqual(do_strip_ns(env, "ns::id", "ns::"), "id")

    def test_do_strip_ns__defaults(self):
        env = mock.Mock()
        self.assertEqual(
            do_strip_ns(env, "2013.com.canonical.certification::id"), "id")


class HexrExporterTests(TestCase):

    """Tests for Jinja2SessionStateExporter using the HEXR template."""

    maxDiff = None

    def setUp(self):
        """Common initialization."""
        exporter_unit = self._get_all_exporter_units()[
            '2013.com.canonical.plainbox::hexr']
        self.exporter = Jinja2SessionStateExporter(
            system_id='SYSTEM_ID', timestamp='TIMESTAMP',
            client_version='CLIENT_VERSION', client_name='CLIENT_NAME',
            exporter_unit=exporter_unit)
        self.manager = SessionManager.create()
        self.manager.add_local_device_context()

    def _get_all_exporter_units(self):
        exporter_map = {}
        for provider in get_providers():
            for unit in provider.unit_list:
                if unit.Meta.name == 'exporter':
                    exporter_map[unit.id] = ExporterUnitSupport(unit)
        return exporter_map

    def _populate_session(self):
        self._make_representative_jobs()
        self._make_cert_resources()
        self._make_cert_attachments()

    def _make_representative_jobs(self):
        # Add all of the jobs from representative.pxu so that we don't have to
        # create verbose fakes. Each job gets a simple passing result.
        state = self.manager.default_device_context.state
        stubbox = get_stubbox(validate=False, check=True)
        for job in stubbox.job_list:
            if not job.partial_id.startswith('representative/plugin/'):
                continue
            state.add_unit(job)
            result = self._make_result_for(job)
            state.update_job_result(job, result)
            last_job = job
            last_result = result
        # Add a comment to one job (the last one)
        state.update_job_result(
            last_job, last_result.get_builder(
                comments='COMMENTS').get_result())

    def _make_result_for(self, job):
        builder = JobResultBuilder(outcome='pass')
        if job.plugin == 'local':
            pass
        elif job.plugin == 'resource':
            pass
        else:
            builder.io_log = [
                (0, 'stdout', b'IO-LOG-STDOUT\n'),
                (1, 'stderr', b'IO-LOG-STDERR\n')
            ]
        return builder.get_result()

    def _make_cert_resources(self):
        # Create some specific resources that this exporter relies on. The
        # corresponding jobs are _not_ loaded but this is irrelevant.
        state = self.manager.default_device_context.state
        ns = CERTIFICATION_NS
        state.set_resource_list(ns + 'cpuinfo', [Resource({
            'PROP-1': 'VALUE-1',
            'PROP-2': 'VALUE-2',
            'count': '2',  # NOTE: this has to be a number :/
        })])
        state.set_resource_list(ns + 'dpkg', [Resource({
            'architecture': 'dpkg.ARCHITECTURE',
        })])
        state.set_resource_list(ns + 'lsb', [Resource({
            'codename': 'lsb.CODENAME',
            'description': 'lsb.DESCRIPTION',
            'release': 'lsb.RELEASE',
            'distributor_id': 'lsb.DISTRIBUTOR_ID',
        })])
        state.set_resource_list(ns + 'uname', [Resource({
            'release': 'uname.RELEASE',
        })])
        state.set_resource_list(ns + 'package', [Resource({
            'name': 'package.0.NAME',
            'version': 'package.0.VERSION',
        }), Resource({
            'name': 'package.1.NAME',
            'version': 'package.1.VERSION',
        })])
        state.set_resource_list(ns + 'requirements', [Resource({
            'name': 'requirement.0.NAME',
            'link': 'requirement.0.LINK',
        }), Resource({
            'name': 'requirement.1.NAME',
            'link': 'requirement.1.LINK',
        })])

    def _make_cert_empty_resources(self):
        # Create empty resources, as experienced when the tested system
        # freezes and corrupts the content of the session. (lp:1479719)
        state = self.manager.default_device_context.state
        ns = CERTIFICATION_NS
        state.set_resource_list(ns + 'cpuinfo', [])
        state.set_resource_list(ns + 'dpkg', [])
        state.set_resource_list(ns + 'lsb', [])
        state.set_resource_list(ns + 'uname', [])
        state.set_resource_list(ns + 'package', [])
        state.set_resource_list(ns + 'requirements', [])

    def _make_cert_attachments(self):
        state = self.manager.default_device_context.state
        partial_id_list = ['dmi_attachment', 'sysfs_attachment',
                           'udev_attachment']
        for partial_id in partial_id_list:
            job = JobDefinition({
                'id': CERTIFICATION_NS + partial_id,
                'plugin': 'attachment'
            })
            result = JobResultBuilder(io_log=[
                (0, 'stdout', 'STDOUT-{}\n'.format(
                    partial_id).encode('utf-8')),
                (1, 'stderr', 'STDERR-{}\n'.format(
                    partial_id).encode('utf-8'))]
            ).get_result()
            state.add_unit(job)
            state.update_job_result(job, result)

    def _inject_evil_input(self):
        evil = '"\'<&>'
        self.exporter._system_id = evil
        self.exporter._timestamp = evil
        self.exporter._client_name = evil
        self.exporter._client_version = evil
        state = self.manager.default_device_context.state
        for resource_id in state.resource_map:
            resource_list = state.resource_map[resource_id]
            for resource in resource_list:
                for key in resource:
                    if resource_id.endswith('cpuinfo') and key == 'count':
                        # don't change resources for the <hardware> section
                        continue
                    resource[key] = evil
        new_job_state_map = {}
        for index, job_id in enumerate(sorted(state.job_state_map)):
            job_state = state.job_state_map[job_id]
            if (job_state.job.partial_id.endswith('_attachment')
                    or job_state.job.partial_id == 'cpuinfo'):
                # don't change attachments for the <hardware> section
                evil_id = job_id
            else:
                evil_id = '{}-{}-{}'.format(evil, index, job_state.job.plugin)
            # NOTE: using private API
            job_state.job._data['id'] = evil_id
            job_state.result = job_state.result.get_builder(
                comments=evil,
                io_log=[(0, 'stdout', evil.encode("UTF-8"))],
            ).get_result()
            new_job_state_map[evil_id] = job_state
        # NOTE: using private API
        state._job_state_map = new_job_state_map

    def tearDown(self):
        """Common teardown."""
        self.manager.destroy()

    def test_smoke(self):
        """The XML document has the right data in the right spot."""
        self._populate_session()
        stream = BytesIO()
        self.exporter.dump_from_session_manager(self.manager, stream)
        smoke_actual = stream.getvalue().decode("utf-8")
        self.assertMultiLineEqual(_smoke_expected, smoke_actual)

    def test_without_any_data(self):
        """The XML document can be produced without any data in the session."""
        stream = BytesIO()
        self.exporter.dump_from_session_manager(self.manager, stream)
        empty_actual = stream.getvalue().decode("utf-8")
        self.assertMultiLineEqual(_empty_expected, empty_actual)

    def test_escaping(self):
        """Evil input doesn't break the correctness of the XML document."""
        self._populate_session()
        self._inject_evil_input()
        stream = BytesIO()
        self.exporter.dump_from_session_manager(self.manager, stream)
        evil_actual = stream.getvalue().decode("utf-8")
        self.assertMultiLineEqual(_evil_expected, evil_actual)

    def test_empty_resources(self):
        """Empty resources don't break the correctness of the XML document."""
        self._make_representative_jobs()
        self._make_cert_empty_resources()
        self._make_cert_attachments()
        stream = BytesIO()
        self.exporter.dump_from_session_manager(self.manager, stream)
        empty_resources_actual = stream.getvalue().decode("utf-8")
        self.assertMultiLineEqual(_empty_resources_expected, empty_resources_actual)

    def test_xml_parsability(self):
        """Each produced output can be parsed with an XML parser."""
        stream1 = BytesIO(_smoke_expected.encode("utf-8"))
        ElementTree.parse(stream1)
        stream2 = BytesIO(_empty_expected.encode("utf-8"))
        ElementTree.parse(stream2)
        stream3 = BytesIO(_evil_expected.encode("utf-8"))
        ElementTree.parse(stream3)


_smoke_expected = """\
<?xml version="1.0"?>
<system version="1.0">
  <context>
    <info command="2013.com.canonical.plainbox::representative/plugin/attachment">IO-LOG-STDOUT
</info>
  </context>
  <hardware>
    <dmi>STDOUT-dmi_attachment
</dmi>
    <sysfs-attributes>STDOUT-sysfs_attachment
</sysfs-attributes>
    <udev>STDOUT-udev_attachment
</udev>
    <processors>
      <processor id="0" name="0">
        <property name="count" type="str">2</property>
        <property name="PROP-1" type="str">VALUE-1</property>
        <property name="PROP-2" type="str">VALUE-2</property>
      </processor>
      <processor id="1" name="1">
        <property name="count" type="str">2</property>
        <property name="PROP-1" type="str">VALUE-1</property>
        <property name="PROP-2" type="str">VALUE-2</property>
      </processor>
    </processors>
  </hardware>
  <questions>
    <question name="2013.com.canonical.plainbox::representative/plugin/manual">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/qml">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/shell">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/user-interact">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/user-interact-verify">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/user-verify">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>COMMENTS</comment>
    </question>
  </questions>
  <software>
    <lsbrelease>
      <property name="codename" type="str">lsb.CODENAME</property>
      <property name="description" type="str">lsb.DESCRIPTION</property>
      <property name="distributor_id" type="str">lsb.DISTRIBUTOR_ID</property>
      <property name="release" type="str">lsb.RELEASE</property>
    </lsbrelease>
    <packages>
      <package id="0" name="package.0.NAME">
        <property name="version" type="str">package.0.VERSION</property>
      </package>
      <package id="1" name="package.1.NAME">
        <property name="version" type="str">package.1.VERSION</property>
      </package>
    </packages>
    <requirements>
      <requirement id=" 0" name="requirement.0.NAME">
        <property name="link" type="str">requirement.0.LINK</property>
      </requirement>
      <requirement id=" 1" name="requirement.1.NAME">
        <property name="link" type="str">requirement.1.LINK</property>
      </requirement>
    </requirements>
  </software>
  <summary>
    <client name="CLIENT_NAME" version="CLIENT_VERSION"/>
    <date_created value="TIMESTAMP"/>
    <architecture value="dpkg.ARCHITECTURE"/>
    <distribution value="lsb.DISTRIBUTOR_ID"/>
    <distroseries value="lsb.RELEASE"/>
    <kernel-release value="uname.RELEASE"/>
    <private value="False"/>
    <contactable value="False"/>
    <live_cd value="False"/>
    <system_id value="SYSTEM_ID"/>
  </summary>
</system>"""


_empty_expected = """\
<?xml version="1.0"?>
<system version="1.0">
  <context>
  </context>
  <hardware>
    <!-- the dmi_attachment job is not available, not producing the <dmi> section -->
    <!-- the sysfs_attachment job is not available, not producing the <sysfs-attributes> tag -->
    <!-- the udev_attachment job is not available, not producing the <udev> tag -->
    <!-- cpuinfo resource is not available, not producing the <processors> section -->
  </hardware>
  <questions>
  </questions>
  <software>
    <!-- lsb resource is not available, not producing the <lsbrelease> tag -->
    <!-- package resource is not available, not producing the <packages> tag -->
    <!-- requirements resource is not available, not producing the <requirements> tag -->
  </software>
  <summary>
    <client name="CLIENT_NAME" version="CLIENT_VERSION"/>
    <date_created value="TIMESTAMP"/>
    <!-- dpkg resource is not available, not producing the <architecture> tag -->
    <!-- lsb resource is not available, not producing <distribution> and <distroseries> tags -->
    <!-- uname resource is not available, not producing the <kernel-release> tag -->
    <private value="False"/>
    <contactable value="False"/>
    <live_cd value="False"/>
    <system_id value="SYSTEM_ID"/>
  </summary>
</system>"""

_escaped_evil_text = '&#34;&#39;&lt;&amp;&gt;'
_evil_expected = """\
<?xml version="1.0"?>
<system version="1.0">
  <context>
    <info command="2013.com.canonical.plainbox::&#34;&#39;&lt;&amp;&gt;-3-attachment">&#34;&#39;&lt;&amp;&gt;</info>
  </context>
  <hardware>
    <dmi>&#34;&#39;&lt;&amp;&gt;</dmi>
    <sysfs-attributes>&#34;&#39;&lt;&amp;&gt;</sysfs-attributes>
    <udev>&#34;&#39;&lt;&amp;&gt;</udev>
    <processors>
      <processor id="0" name="0">
        <property name="count" type="str">2</property>
        <property name="PROP-1" type="str">{evil}</property>
        <property name="PROP-2" type="str">{evil}</property>
      </processor>
      <processor id="1" name="1">
        <property name="count" type="str">2</property>
        <property name="PROP-1" type="str">{evil}</property>
        <property name="PROP-2" type="str">{evil}</property>
      </processor>
    </processors>
  </hardware>
  <questions>
    <question name="2013.com.canonical.plainbox::&#34;&#39;&lt;&amp;&gt;-10-user-interact-verify">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>&#34;&#39;&lt;&amp;&gt;</comment>
    </question>
    <question name="2013.com.canonical.plainbox::&#34;&#39;&lt;&amp;&gt;-11-user-verify">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>&#34;&#39;&lt;&amp;&gt;</comment>
    </question>
    <question name="2013.com.canonical.plainbox::&#34;&#39;&lt;&amp;&gt;-5-manual">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>&#34;&#39;&lt;&amp;&gt;</comment>
    </question>
    <question name="2013.com.canonical.plainbox::&#34;&#39;&lt;&amp;&gt;-6-qml">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>&#34;&#39;&lt;&amp;&gt;</comment>
    </question>
    <question name="2013.com.canonical.plainbox::&#34;&#39;&lt;&amp;&gt;-8-shell">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>&#34;&#39;&lt;&amp;&gt;</comment>
    </question>
    <question name="2013.com.canonical.plainbox::&#34;&#39;&lt;&amp;&gt;-9-user-interact">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>&#34;&#39;&lt;&amp;&gt;</comment>
    </question>
  </questions>
  <software>
    <lsbrelease>
      <property name="codename" type="str">{evil}</property>
      <property name="description" type="str">{evil}</property>
      <property name="distributor_id" type="str">{evil}</property>
      <property name="release" type="str">{evil}</property>
    </lsbrelease>
    <packages>
      <package id="0" name="{evil}">
        <property name="version" type="str">{evil}</property>
      </package>
      <package id="1" name="{evil}">
        <property name="version" type="str">{evil}</property>
      </package>
    </packages>
    <requirements>
      <requirement id=" 0" name="{evil}">
        <property name="link" type="str">{evil}</property>
      </requirement>
      <requirement id=" 1" name="{evil}">
        <property name="link" type="str">{evil}</property>
      </requirement>
    </requirements>
  </software>
  <summary>
    <client name="{evil}" version="{evil}"/>
    <date_created value="{evil}"/>
    <architecture value="{evil}"/>
    <distribution value="{evil}"/>
    <distroseries value="{evil}"/>
    <kernel-release value="{evil}"/>
    <private value="False"/>
    <contactable value="False"/>
    <live_cd value="False"/>
    <system_id value="{evil}"/>
  </summary>
</system>""".format(evil=_escaped_evil_text)

_empty_resources_expected = """\
<?xml version="1.0"?>
<system version="1.0">
  <context>
    <info command="2013.com.canonical.plainbox::representative/plugin/attachment">IO-LOG-STDOUT
</info>
  </context>
  <hardware>
    <dmi>STDOUT-dmi_attachment
</dmi>
    <sysfs-attributes>STDOUT-sysfs_attachment
</sysfs-attributes>
    <udev>STDOUT-udev_attachment
</udev>
    <!-- cpuinfo resource is not available, not producing the <processors> section -->
  </hardware>
  <questions>
    <question name="2013.com.canonical.plainbox::representative/plugin/manual">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/qml">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/shell">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/user-interact">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/user-interact-verify">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>IO-LOG-STDOUT
IO-LOG-STDERR
</comment>
    </question>
    <question name="2013.com.canonical.plainbox::representative/plugin/user-verify">
      <answer type="multiple_choice">pass</answer>
      <answer_choices>
        <value type="str">none</value>
        <value type="str">pass</value>
        <value type="str">fail</value>
        <value type="str">skip</value>
      </answer_choices>
      <comment>COMMENTS</comment>
    </question>
  </questions>
  <software>
    <!-- lsb resource is not available, not producing the <lsbrelease> tag -->
    <packages>
    </packages>
    <requirements>
    </requirements>
  </software>
  <summary>
    <client name="CLIENT_NAME" version="CLIENT_VERSION"/>
    <date_created value="TIMESTAMP"/>
    <!-- dpkg resource is not available, not producing the <architecture> tag -->
    <!-- lsb resource is not available, not producing <distribution> and <distroseries> tags -->
    <!-- uname resource is not available, not producing the <kernel-release> tag -->
    <private value="False"/>
    <contactable value="False"/>
    <live_cd value="False"/>
    <system_id value="SYSTEM_ID"/>
  </summary>
</system>"""