Fix typo: `Assitant` -> `Assistant`
[ctf-testsuite.git] / utils / python / ctftestsuite / stress.py
index d355fa38a7cc4340ed934091d27d4e44a4a52123..4bf08260fb4808d051ce07f355c7ac72411d50ad 100644 (file)
@@ -4,7 +4,26 @@ import sys
 import os
 
 
-class MetadataTest:
+class MetadataTestAssistant:
+    BASIC_PROLOGUE = \
+'''/* CTF 1.8 */
+
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 8; signed = false; base = hex; } := uint32_t;
+
+trace {
+    major = 0;
+    minor = 0;
+    uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+    byte_order = le;
+    packet.header := struct {
+        uint32_t magic;
+        uint8_t uuid[16];
+    };
+};
+
+'''
+
     def __init__(self):
         self._actions = {
             'prepare': self._prepare,
@@ -29,7 +48,7 @@ class MetadataTest:
 
         # validate size
         if args.size < 1:
-            MetadataTest._perror('wrong size: {}'.format(args.size))
+            MetadataTestAssistant._perror('wrong size: {}'.format(args.size))
 
         return args
 
@@ -60,7 +79,8 @@ class MetadataTest:
 
     def _do_action(self):
         if self._action not in self._actions:
-            MetadataTest._perror('invalid action: "{}"'.format(self._action))
+            msg = 'invalid action: "{}"'.format(self._action)
+            MetadataTestAssistant._perror(msg)
 
         self._actions[self._action]()
 
This page took 0.023566 seconds and 4 git commands to generate.