amd-debug-tools 0.2.1__py3-none-any.whl → 0.2.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of amd-debug-tools might be problematic. Click here for more details.
- amd_debug/common.py +24 -0
- amd_debug/failures.py +14 -2
- amd_debug/installer.py +34 -2
- amd_debug/kernel.py +8 -0
- amd_debug/prerequisites.py +95 -45
- amd_debug/s2idle.py +45 -30
- amd_debug/sleep_report.py +128 -85
- amd_debug/templates/html +4 -2
- amd_debug/templates/md +0 -7
- amd_debug/validator.py +20 -15
- {amd_debug_tools-0.2.1.dist-info → amd_debug_tools-0.2.3.dist-info}/METADATA +4 -3
- {amd_debug_tools-0.2.1.dist-info → amd_debug_tools-0.2.3.dist-info}/RECORD +22 -22
- {amd_debug_tools-0.2.1.dist-info → amd_debug_tools-0.2.3.dist-info}/WHEEL +1 -1
- test_common.py +112 -0
- test_installer.py +8 -6
- test_prerequisites.py +204 -45
- test_s2idle.py +93 -28
- test_sleep_report.py +29 -0
- test_validator.py +119 -12
- {amd_debug_tools-0.2.1.dist-info → amd_debug_tools-0.2.3.dist-info}/entry_points.txt +0 -0
- {amd_debug_tools-0.2.1.dist-info → amd_debug_tools-0.2.3.dist-info}/licenses/LICENSE +0 -0
- {amd_debug_tools-0.2.1.dist-info → amd_debug_tools-0.2.3.dist-info}/top_level.txt +0 -0
amd_debug/sleep_report.py
CHANGED
|
@@ -5,6 +5,7 @@ import os
|
|
|
5
5
|
import re
|
|
6
6
|
import math
|
|
7
7
|
from datetime import datetime, timedelta
|
|
8
|
+
import numpy as np
|
|
8
9
|
from tabulate import tabulate
|
|
9
10
|
from jinja2 import Environment, FileSystemLoader
|
|
10
11
|
import pandas as pd
|
|
@@ -73,6 +74,8 @@ def format_percent(val):
|
|
|
73
74
|
|
|
74
75
|
def format_timedelta(val):
|
|
75
76
|
"""Format seconds as a nicer format"""
|
|
77
|
+
if math.isnan(val):
|
|
78
|
+
val = 0
|
|
76
79
|
return str(timedelta(seconds=val))
|
|
77
80
|
|
|
78
81
|
|
|
@@ -97,8 +100,23 @@ class SleepReport(AmdTool):
|
|
|
97
100
|
self.debug = report_debug
|
|
98
101
|
self.format = fmt
|
|
99
102
|
self.failures = []
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
if since and until:
|
|
104
|
+
self.df = self.db.report_summary_dataframe(self.since, self.until)
|
|
105
|
+
self.pre_process_dataframe()
|
|
106
|
+
else:
|
|
107
|
+
self.df = pd.DataFrame(
|
|
108
|
+
columns=[
|
|
109
|
+
"t0",
|
|
110
|
+
"t1",
|
|
111
|
+
"requested",
|
|
112
|
+
"hw",
|
|
113
|
+
"b0",
|
|
114
|
+
"b1",
|
|
115
|
+
"full",
|
|
116
|
+
"wake_irq",
|
|
117
|
+
"gpio",
|
|
118
|
+
]
|
|
119
|
+
)
|
|
102
120
|
self.battery_svg = None
|
|
103
121
|
self.hwsleep_svg = None
|
|
104
122
|
|
|
@@ -136,6 +154,7 @@ class SleepReport(AmdTool):
|
|
|
136
154
|
self.df["Duration"] = self.df["t1"].apply(format_as_seconds) - self.df[
|
|
137
155
|
"t0"
|
|
138
156
|
].apply(format_as_seconds)
|
|
157
|
+
self.df["Duration"] = self.df["Duration"].replace(0, np.nan)
|
|
139
158
|
self.df["Hardware Sleep"] = (self.df["hw"] / self.df["Duration"]).apply(
|
|
140
159
|
parse_hw_sleep
|
|
141
160
|
)
|
|
@@ -187,7 +206,8 @@ class SleepReport(AmdTool):
|
|
|
187
206
|
format_watts
|
|
188
207
|
)
|
|
189
208
|
|
|
190
|
-
def
|
|
209
|
+
def convert_table_dataframe(self, content):
|
|
210
|
+
"""Convert a table like dataframe to an HTML table"""
|
|
191
211
|
header = False
|
|
192
212
|
rows = []
|
|
193
213
|
for line in content.split("\n"):
|
|
@@ -196,17 +216,25 @@ class SleepReport(AmdTool):
|
|
|
196
216
|
if header:
|
|
197
217
|
continue
|
|
198
218
|
header = True
|
|
219
|
+
line = line.strip("│")
|
|
220
|
+
line = line.replace("├─", "└─")
|
|
199
221
|
if "|" in line:
|
|
200
222
|
# first column missing '|'
|
|
201
223
|
rows.append(line.replace("\t", "|"))
|
|
202
224
|
columns = [row.split("|") for row in rows]
|
|
203
225
|
df = pd.DataFrame(columns[1:], columns=columns[0])
|
|
204
|
-
return df.to_html(index=False,
|
|
226
|
+
return df.to_html(index=False, justify="center", col_space=30)
|
|
205
227
|
|
|
206
228
|
def get_prereq_data(self):
|
|
207
229
|
"""Get the prereq data"""
|
|
208
230
|
prereq = []
|
|
209
231
|
prereq_debug = []
|
|
232
|
+
tables = [
|
|
233
|
+
"int|active",
|
|
234
|
+
"ACPI name",
|
|
235
|
+
"PCI Slot",
|
|
236
|
+
"DMI|value",
|
|
237
|
+
]
|
|
210
238
|
ts = self.db.get_last_prereq_ts()
|
|
211
239
|
if not ts:
|
|
212
240
|
return [], "", []
|
|
@@ -216,23 +244,24 @@ class SleepReport(AmdTool):
|
|
|
216
244
|
if self.debug:
|
|
217
245
|
for row in self.db.report_debug(t0):
|
|
218
246
|
content = row[0]
|
|
219
|
-
if self.format == "html" and
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
)
|
|
247
|
+
if self.format == "html" and [
|
|
248
|
+
table for table in tables if table in content
|
|
249
|
+
]:
|
|
250
|
+
content = self.convert_table_dataframe(content)
|
|
251
|
+
prereq_debug.append({"data": f"{content.strip()}"})
|
|
224
252
|
return prereq, t0, prereq_debug
|
|
225
253
|
|
|
226
254
|
def get_cycle_data(self):
|
|
227
255
|
"""Get the cycle data"""
|
|
228
256
|
cycles = []
|
|
229
257
|
debug = []
|
|
258
|
+
tables = ["Wakeup Source"]
|
|
230
259
|
num = 0
|
|
231
260
|
for cycle in self.df["Start Time"]:
|
|
232
261
|
if self.format == "html":
|
|
233
262
|
data = ""
|
|
234
263
|
for line in self.db.report_cycle_data(cycle).split("\n"):
|
|
235
|
-
data += "<p>{line}</p>"
|
|
264
|
+
data += f"<p>{line}</p>"
|
|
236
265
|
cycles.append({"cycle_num": num, "data": data})
|
|
237
266
|
else:
|
|
238
267
|
cycles.append([num, self.db.report_cycle_data(cycle)])
|
|
@@ -240,7 +269,12 @@ class SleepReport(AmdTool):
|
|
|
240
269
|
messages = []
|
|
241
270
|
priorities = []
|
|
242
271
|
for row in self.db.report_debug(cycle):
|
|
243
|
-
|
|
272
|
+
content = row[0]
|
|
273
|
+
if self.format == "html" and [
|
|
274
|
+
table for table in tables if table in content
|
|
275
|
+
]:
|
|
276
|
+
content = self.convert_table_dataframe(content)
|
|
277
|
+
messages.append(content)
|
|
244
278
|
priorities.append(get_log_priority(row[1]))
|
|
245
279
|
debug.append(
|
|
246
280
|
{"cycle_num": num, "messages": messages, "priorities": priorities}
|
|
@@ -265,58 +299,69 @@ class SleepReport(AmdTool):
|
|
|
265
299
|
prereq, prereq_date, prereq_debug = self.get_prereq_data()
|
|
266
300
|
|
|
267
301
|
# Load the cycle and/or debug data
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
self.failures,
|
|
278
|
-
headers=["Cycle", "Problem", "Explanation"],
|
|
279
|
-
tablefmt="pipe",
|
|
302
|
+
if not self.df.empty:
|
|
303
|
+
cycles, debug = self.get_cycle_data()
|
|
304
|
+
|
|
305
|
+
self.post_process_dataframe()
|
|
306
|
+
failures = None
|
|
307
|
+
if self.format == "md":
|
|
308
|
+
summary = self.df.to_markdown(floatfmt=".02f")
|
|
309
|
+
cycle_data = tabulate(
|
|
310
|
+
cycles, headers=["Cycle", "data"], tablefmt="pipe"
|
|
280
311
|
)
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
headers=
|
|
290
|
-
|
|
312
|
+
if self.failures:
|
|
313
|
+
failures = tabulate(
|
|
314
|
+
self.failures,
|
|
315
|
+
headers=["Cycle", "Problem", "Explanation"],
|
|
316
|
+
tablefmt="pipe",
|
|
317
|
+
)
|
|
318
|
+
elif self.format == "txt":
|
|
319
|
+
summary = tabulate(
|
|
320
|
+
self.df, headers=self.df.columns, tablefmt="fancy_grid"
|
|
321
|
+
)
|
|
322
|
+
cycle_data = tabulate(
|
|
323
|
+
cycles, headers=["Cycle", "data"], tablefmt="fancy_grid"
|
|
291
324
|
)
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
"\n"
|
|
298
|
-
):
|
|
299
|
-
if "<tr>" in line:
|
|
300
|
-
line = line.replace(
|
|
301
|
-
"<tr>",
|
|
302
|
-
'<tr class="row-low" onclick="pick_summary_cycle(%d)">' % row,
|
|
325
|
+
if self.failures:
|
|
326
|
+
failures = tabulate(
|
|
327
|
+
self.failures,
|
|
328
|
+
headers=["Cycle", "Problem", "Explanation"],
|
|
329
|
+
tablefmt="fancy_grid",
|
|
303
330
|
)
|
|
304
|
-
|
|
305
|
-
summary
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
331
|
+
elif self.format == "html":
|
|
332
|
+
summary = ""
|
|
333
|
+
row = 0
|
|
334
|
+
# we will use javascript to highlight the high values
|
|
335
|
+
for line in self.df.to_html(
|
|
336
|
+
table_id="summary", render_links=True
|
|
337
|
+
).split("\n"):
|
|
338
|
+
if "<tr>" in line:
|
|
339
|
+
line = line.replace(
|
|
340
|
+
"<tr>",
|
|
341
|
+
f'<tr class="row-low" onclick="pick_summary_cycle({row})">',
|
|
342
|
+
)
|
|
343
|
+
row = row + 1
|
|
344
|
+
summary += line
|
|
345
|
+
cycle_data = cycles
|
|
346
|
+
failures = self.failures
|
|
347
|
+
# only show one cycle in stdout output even if we found more
|
|
316
348
|
else:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
349
|
+
df = self.df.tail(1)
|
|
350
|
+
summary = tabulate(
|
|
351
|
+
df, headers=self.df.columns, tablefmt="fancy_grid", showindex=False
|
|
352
|
+
)
|
|
353
|
+
if cycles[-1][0] == df.index.start:
|
|
354
|
+
cycle_data = cycles[-1][-1]
|
|
355
|
+
else:
|
|
356
|
+
cycle_data = None
|
|
357
|
+
if self.failures and self.failures[-1][0] == df.index.start:
|
|
358
|
+
failures = self.failures[-1][-1]
|
|
359
|
+
else:
|
|
360
|
+
cycles = []
|
|
361
|
+
debug = []
|
|
362
|
+
cycle_data = []
|
|
363
|
+
summary = "No sleep cycles found in the database."
|
|
364
|
+
failures = None
|
|
320
365
|
|
|
321
366
|
# let it burn
|
|
322
367
|
context = {
|
|
@@ -333,7 +378,7 @@ class SleepReport(AmdTool):
|
|
|
333
378
|
"failures": failures,
|
|
334
379
|
}
|
|
335
380
|
if self.fname:
|
|
336
|
-
with open(self.fname, "w") as f:
|
|
381
|
+
with open(self.fname, "w", encoding="utf-8") as f:
|
|
337
382
|
f.write(template.render(context))
|
|
338
383
|
if "SUDO_UID" in os.environ:
|
|
339
384
|
os.chown(
|
|
@@ -345,30 +390,30 @@ class SleepReport(AmdTool):
|
|
|
345
390
|
|
|
346
391
|
def build_battery_chart(self):
|
|
347
392
|
"""Build a battery chart using matplotlib and seaborn"""
|
|
348
|
-
import matplotlib.pyplot as plt
|
|
349
|
-
import seaborn as sns
|
|
350
|
-
import io
|
|
393
|
+
import matplotlib.pyplot as plt # pylint: disable=import-outside-toplevel
|
|
394
|
+
import seaborn as sns # pylint: disable=import-outside-toplevel
|
|
395
|
+
import io # pylint: disable=import-outside-toplevel
|
|
351
396
|
|
|
352
397
|
if "Battery Ave Rate" not in self.df.columns:
|
|
353
398
|
return
|
|
354
399
|
|
|
355
400
|
plt.set_loglevel("warning")
|
|
356
|
-
|
|
357
|
-
|
|
401
|
+
_fig, ax1 = plt.subplots()
|
|
402
|
+
ax1.plot(
|
|
358
403
|
self.df["Battery Ave Rate"], color="green", label="Charge/Discharge Rate"
|
|
359
404
|
)
|
|
360
405
|
|
|
361
406
|
ax2 = ax1.twinx()
|
|
362
|
-
|
|
407
|
+
sns.barplot(
|
|
363
408
|
x=self.df.index,
|
|
364
409
|
y=self.df["Battery Delta"],
|
|
365
410
|
color="grey",
|
|
366
411
|
label="Battery Change",
|
|
367
412
|
alpha=0.3,
|
|
368
413
|
)
|
|
369
|
-
|
|
370
|
-
if
|
|
371
|
-
ax1.set_xticks(range(0, len(self.df.index),
|
|
414
|
+
max_range = int(len(self.df.index) / 10)
|
|
415
|
+
if max_range:
|
|
416
|
+
ax1.set_xticks(range(0, len(self.df.index), max_range))
|
|
372
417
|
ax1.set_xlabel("Cycle")
|
|
373
418
|
ax1.set_ylabel("Rate (Watts)")
|
|
374
419
|
ax2.set_ylabel("Battery Change (%)")
|
|
@@ -385,20 +430,20 @@ class SleepReport(AmdTool):
|
|
|
385
430
|
|
|
386
431
|
def build_hw_sleep_chart(self):
|
|
387
432
|
"""Build the hardware sleep chart using matplotlib and seaborn"""
|
|
388
|
-
import matplotlib.pyplot as plt
|
|
389
|
-
import seaborn as sns
|
|
390
|
-
import io
|
|
433
|
+
import matplotlib.pyplot as plt # pylint: disable=import-outside-toplevel
|
|
434
|
+
import seaborn as sns # pylint: disable=import-outside-toplevel
|
|
435
|
+
import io # pylint: disable=import-outside-toplevel
|
|
391
436
|
|
|
392
437
|
plt.set_loglevel("warning")
|
|
393
|
-
|
|
394
|
-
|
|
438
|
+
_fig, ax1 = plt.subplots()
|
|
439
|
+
ax1.plot(
|
|
395
440
|
self.df["Hardware Sleep"],
|
|
396
441
|
color="red",
|
|
397
442
|
label="Hardware Sleep",
|
|
398
443
|
)
|
|
399
444
|
|
|
400
445
|
ax2 = ax1.twinx()
|
|
401
|
-
|
|
446
|
+
sns.barplot(
|
|
402
447
|
x=self.df.index,
|
|
403
448
|
y=self.df["Duration"] / 60,
|
|
404
449
|
color="grey",
|
|
@@ -406,9 +451,9 @@ class SleepReport(AmdTool):
|
|
|
406
451
|
alpha=0.3,
|
|
407
452
|
)
|
|
408
453
|
|
|
409
|
-
|
|
410
|
-
if
|
|
411
|
-
ax1.set_xticks(range(0, len(self.df.index),
|
|
454
|
+
max_range = int(len(self.df.index) / 10)
|
|
455
|
+
if max_range:
|
|
456
|
+
ax1.set_xticks(range(0, len(self.df.index), max_range))
|
|
412
457
|
ax1.set_xlabel("Cycle")
|
|
413
458
|
ax1.set_ylabel("Percent")
|
|
414
459
|
ax2.set_yscale("log")
|
|
@@ -427,15 +472,13 @@ class SleepReport(AmdTool):
|
|
|
427
472
|
def run(self, inc_prereq=True):
|
|
428
473
|
"""Run the report"""
|
|
429
474
|
|
|
430
|
-
if self.df.empty:
|
|
431
|
-
raise ValueError(f"No data found between {self.since} and {self.until}")
|
|
432
|
-
|
|
433
475
|
characters = print_temporary_message("Building report, please wait...")
|
|
434
476
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
self.
|
|
438
|
-
|
|
477
|
+
if not self.df.empty:
|
|
478
|
+
# Build charts in the page for html format
|
|
479
|
+
if len(self.df.index) > 1 and self.format == "html":
|
|
480
|
+
self.build_battery_chart()
|
|
481
|
+
self.build_hw_sleep_chart()
|
|
439
482
|
|
|
440
483
|
# Render the template using jinja
|
|
441
484
|
msg = self.build_template(inc_prereq)
|
amd_debug/templates/html
CHANGED
|
@@ -42,12 +42,14 @@
|
|
|
42
42
|
table,
|
|
43
43
|
th,
|
|
44
44
|
td {
|
|
45
|
-
border-width:
|
|
45
|
+
border-width: 1;
|
|
46
|
+
border-collapse: collapse;
|
|
46
47
|
table-layout: fixed;
|
|
47
48
|
font-family: sans-serif;
|
|
48
49
|
letter-spacing: 0.02em;
|
|
49
50
|
color: #000000;
|
|
50
|
-
|
|
51
|
+
text-align: left;
|
|
52
|
+
padding: 3px;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
.○ {
|
amd_debug/templates/md
CHANGED
amd_debug/validator.py
CHANGED
|
@@ -290,13 +290,12 @@ class SleepValidator(AmdTool):
|
|
|
290
290
|
sys_name = pnp.sys_name
|
|
291
291
|
|
|
292
292
|
name = name.replace('"', "")
|
|
293
|
-
devices.append(f"{name}
|
|
293
|
+
devices.append(f"{name}|{sys_name}|{wake_en}")
|
|
294
294
|
devices.sort()
|
|
295
|
-
|
|
295
|
+
debug_str = "Wakeup Source|Linux Device|Status\n"
|
|
296
296
|
for dev in devices:
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
self.db.record_debug(f"{prefix}{dev}")
|
|
297
|
+
debug_str += f"{dev}\n"
|
|
298
|
+
self.db.record_debug(debug_str)
|
|
300
299
|
|
|
301
300
|
def capture_lid(self) -> None:
|
|
302
301
|
"""Capture lid state"""
|
|
@@ -469,12 +468,10 @@ class SleepValidator(AmdTool):
|
|
|
469
468
|
)
|
|
470
469
|
return False
|
|
471
470
|
except FileNotFoundError:
|
|
472
|
-
self.db.
|
|
473
|
-
return False
|
|
471
|
+
self.db.record_debug(f"HW sleep statistics file {p} is missing")
|
|
474
472
|
if not self.hw_sleep_duration:
|
|
475
473
|
self.db.record_cycle_data("Did not reach hardware sleep state", "❌")
|
|
476
|
-
|
|
477
|
-
return self.hw_sleep_duration is not None
|
|
474
|
+
return self.hw_sleep_duration
|
|
478
475
|
|
|
479
476
|
def capture_command_line(self):
|
|
480
477
|
"""Capture the kernel command line to debug"""
|
|
@@ -674,7 +671,7 @@ class SleepValidator(AmdTool):
|
|
|
674
671
|
def prep(self):
|
|
675
672
|
"""Prepare the system for suspend testing"""
|
|
676
673
|
self.last_suspend = datetime.now()
|
|
677
|
-
self.kernel_log.seek_tail()
|
|
674
|
+
self.kernel_log.seek_tail(self.last_suspend)
|
|
678
675
|
self.db.start_cycle(self.last_suspend)
|
|
679
676
|
self.kernel_duration = 0
|
|
680
677
|
self.hw_sleep_duration = 0
|
|
@@ -749,16 +746,18 @@ class SleepValidator(AmdTool):
|
|
|
749
746
|
return False
|
|
750
747
|
else:
|
|
751
748
|
old = get_wakeup_count()
|
|
749
|
+
p = os.path.join("/", "sys", "power", "state")
|
|
750
|
+
fd = os.open(p, os.O_WRONLY | os.O_SYNC)
|
|
752
751
|
try:
|
|
753
|
-
|
|
754
|
-
with open(p, "w", encoding="utf-8") as w:
|
|
755
|
-
w.write("mem")
|
|
752
|
+
os.write(fd, b"mem")
|
|
756
753
|
except OSError as e:
|
|
757
754
|
new = get_wakeup_count()
|
|
758
755
|
self.db.record_cycle_data(
|
|
759
756
|
f"Failed to set suspend state ({old} -> {new}): {e}", "❌"
|
|
760
757
|
)
|
|
761
758
|
return False
|
|
759
|
+
finally:
|
|
760
|
+
os.close(fd)
|
|
762
761
|
return True
|
|
763
762
|
|
|
764
763
|
def unlock_session(self):
|
|
@@ -782,6 +781,7 @@ class SleepValidator(AmdTool):
|
|
|
782
781
|
|
|
783
782
|
def run(self, duration, count, wait, rand, logind):
|
|
784
783
|
"""Run the suspend test"""
|
|
784
|
+
min_duration = 4
|
|
785
785
|
if not count:
|
|
786
786
|
return True
|
|
787
787
|
|
|
@@ -789,8 +789,13 @@ class SleepValidator(AmdTool):
|
|
|
789
789
|
self.logind = True
|
|
790
790
|
|
|
791
791
|
if rand:
|
|
792
|
+
if duration <= min_duration:
|
|
793
|
+
print_color(f"Invalid max duration {duration}", "❌")
|
|
794
|
+
self.db.sync()
|
|
795
|
+
self.report_cycle()
|
|
796
|
+
return False
|
|
792
797
|
print_color(
|
|
793
|
-
f"Running {count} cycle random test with max duration of {duration}s and a max wait of {wait}s",
|
|
798
|
+
f"Running {count} cycle random test with min duration of {min_duration}s, max duration of {duration}s and a max wait of {wait}s",
|
|
794
799
|
"🗣️",
|
|
795
800
|
)
|
|
796
801
|
elif count > 1:
|
|
@@ -801,7 +806,7 @@ class SleepValidator(AmdTool):
|
|
|
801
806
|
)
|
|
802
807
|
for i in range(1, count + 1):
|
|
803
808
|
if rand:
|
|
804
|
-
self.requested_duration = random.randint(
|
|
809
|
+
self.requested_duration = random.randint(min_duration, duration)
|
|
805
810
|
requested_wait = random.randint(1, wait)
|
|
806
811
|
else:
|
|
807
812
|
self.requested_duration = duration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: amd-debug-tools
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: debug tools for AMD systems
|
|
5
5
|
Author-email: Mario Limonciello <superm1@kernel.org>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -125,8 +125,9 @@ The following optional arguments are supported for this command:
|
|
|
125
125
|
--format FORMAT Format of the report to produce (html, txt or md)
|
|
126
126
|
--report-file File to write the report to
|
|
127
127
|
--tool-debug Enable tool debug logging
|
|
128
|
-
--report-debug
|
|
129
|
-
|
|
128
|
+
--report-debug
|
|
129
|
+
--no-report-debug
|
|
130
|
+
Include debug messages in report (WARNING: can significantly increase report size)
|
|
130
131
|
If the tool is launched with an environment that can call `xdg-open`, the report
|
|
131
132
|
will be opened in a browser.
|
|
132
133
|
|
|
@@ -2,44 +2,44 @@ launcher.py,sha256=_Gs0W8tUB2wkTy5Nz4qEzG0VqQcnO7xuIQj0GwV_KbY,968
|
|
|
2
2
|
test_acpi.py,sha256=wtS43Rz95h7YEEJBeFa6Mswaeo4syBZrw4hY8i0YbJY,3117
|
|
3
3
|
test_batteries.py,sha256=nN5pfP5El7Whypq3HHEpW8bufdf5EWSTVGbayfNQYP4,3360
|
|
4
4
|
test_bios.py,sha256=GBAXE_rXd2G-JE0XJ8AvYcF9Me6LTyQQQ8h0Ib3cpxQ,8981
|
|
5
|
-
test_common.py,sha256=
|
|
5
|
+
test_common.py,sha256=fb16Oilh5ga6VgF-UgBj6azoYzZnPrS7KpECQ3nCwlg,16335
|
|
6
6
|
test_database.py,sha256=q5ZjI5u20f7ki6iCY5o1iPi0YOvPz1_W0LTDraU8mN4,10040
|
|
7
7
|
test_display.py,sha256=hHggv-zBthF1BlwWWSjzAm7BBw1DWcElwil5xAuz87g,5822
|
|
8
8
|
test_failures.py,sha256=H1UxXeVjhJs9-j9yas4vwAha676GX1Es7Kz8RN2B590,6845
|
|
9
|
-
test_installer.py,sha256=
|
|
9
|
+
test_installer.py,sha256=oDMCvaKqqAWjTggltacnasQ-s1gyUvXPDcNrCUGnux4,10216
|
|
10
10
|
test_kernel.py,sha256=RW-eLbae02Bhwfu1cegqA1pTj6AS5IqD5lLe-6T0Rjo,7871
|
|
11
11
|
test_launcher.py,sha256=govYHL0Cpj9d5msteV5SfR7Covft31rJuzRkDeytHcY,1461
|
|
12
|
-
test_prerequisites.py,sha256=
|
|
12
|
+
test_prerequisites.py,sha256=VXN822W-7ZZHXZkJYH5MeKsDVBC-ttUZggYlcoPjVyM,83335
|
|
13
13
|
test_pstate.py,sha256=a9oAJ9-LANX32XNQhplz6Y75VNYc__QqoSBKIrwvANg,6058
|
|
14
|
-
test_s2idle.py,sha256=
|
|
15
|
-
test_sleep_report.py,sha256=
|
|
16
|
-
test_validator.py,sha256
|
|
14
|
+
test_s2idle.py,sha256=6NaqGp9VOLr_Tr3KczSvfSo3M882aYEbSvRV9xvUMcA,33534
|
|
15
|
+
test_sleep_report.py,sha256=ANuxYi_C1oSKAi4xUU2wBu4SwJtcZA7VPpazBe3_WUQ,6922
|
|
16
|
+
test_validator.py,sha256=-MfrWfhwef_aRqOSD_dJGhH0shsghhtOBgzeijzyLW4,33975
|
|
17
17
|
test_wake.py,sha256=6zi5GVFHQKU1sTWw3O5-aGriB9uu5713QLn4l2wjhpM,7152
|
|
18
18
|
amd_debug/__init__.py,sha256=aOtpIEKGLUStrh0e4qgilHW7HgF4Od-r9pOoZ87NwAM,1105
|
|
19
19
|
amd_debug/acpi.py,sha256=fkD3Sov8cRT5ryPlakRlT7Z9jiCLT9x_MPWxt3xU_tc,3161
|
|
20
20
|
amd_debug/battery.py,sha256=WN-6ys9PHCZIwg7PdwyBOa62GjBp8WKG0v1YZt5_W5s,3122
|
|
21
21
|
amd_debug/bios.py,sha256=wmPKDsTZeQqsHjWpv-YHdgRNlCtFdzHQ6jJf0H3hjN8,3971
|
|
22
|
-
amd_debug/common.py,sha256=
|
|
22
|
+
amd_debug/common.py,sha256=H9tIRlRFOMwe0d3f2-vXQeK2rJl5Z1WJzkpQM9ivpOc,10347
|
|
23
23
|
amd_debug/database.py,sha256=GkRg3cmaNceyQ2_hy0MBAlMbnTDPHo2co2o4ObWpnQg,10621
|
|
24
24
|
amd_debug/display.py,sha256=5L9x9tI_UoulHpIvuxuVASRtdXta7UCW_JjTb5StEB0,953
|
|
25
|
-
amd_debug/failures.py,sha256=
|
|
26
|
-
amd_debug/installer.py,sha256=
|
|
27
|
-
amd_debug/kernel.py,sha256=
|
|
28
|
-
amd_debug/prerequisites.py,sha256=
|
|
25
|
+
amd_debug/failures.py,sha256=z4O4Q-akv3xYGssSZFCqE0cDE4P9F_aw1hxil3McoD4,22910
|
|
26
|
+
amd_debug/installer.py,sha256=r6r_nVWv8qYdrqAvnAzQhRiS5unBDOkXsqUfHvFK8uM,14249
|
|
27
|
+
amd_debug/kernel.py,sha256=UAlxlXNuZxtHVtrfCmTp12YombVaUs4mizOxwuXTX2M,12038
|
|
28
|
+
amd_debug/prerequisites.py,sha256=r4_IFTL-1YcPptlt6Nump7iscRx1bBCGF33hqNQB0X0,49867
|
|
29
29
|
amd_debug/pstate.py,sha256=akGdJkIxBp0bx3AeGv6ictNxwv8m0j9vQ2IZB0Jx3dM,9518
|
|
30
30
|
amd_debug/s2idle-hook,sha256=LLiaqPtGd0qetu9n6EYxKHZaIdHpVQDONdOuSc0pfFg,1695
|
|
31
|
-
amd_debug/s2idle.py,sha256=
|
|
32
|
-
amd_debug/sleep_report.py,sha256=
|
|
33
|
-
amd_debug/validator.py,sha256=
|
|
31
|
+
amd_debug/s2idle.py,sha256=Ei5ONnJyHz9aQbstRZYnofhJ_sJOAOZQxLgIuWfvcng,13218
|
|
32
|
+
amd_debug/sleep_report.py,sha256=hhqu711AKtjeYF2xmGcejyCyyPtmq4-gC_hROUCrC0g,17317
|
|
33
|
+
amd_debug/validator.py,sha256=nZ5UpvvsABw4yTea_pZ8DHaLbSoM5VHz3uvlrdWAb34,33444
|
|
34
34
|
amd_debug/wake.py,sha256=xT8WrFrN6voCmXWo5dsn4mQ7iR2QJxHrrYBd3EREG-Q,3936
|
|
35
35
|
amd_debug/bash/amd-s2idle,sha256=g_cle1ElCJpwE4wcLezL6y-BdasDKTnNMhrtzKLE9ks,1142
|
|
36
|
-
amd_debug/templates/html,sha256=
|
|
37
|
-
amd_debug/templates/md,sha256=
|
|
36
|
+
amd_debug/templates/html,sha256=JfGhpmHIB2C2GItdGI1kuC8uayqEVgrpQvAWAj35eZ4,14580
|
|
37
|
+
amd_debug/templates/md,sha256=r8X2aehnH2gzj0WHYTZ5K9wAqC5y39i_3nkDORSC0uM,787
|
|
38
38
|
amd_debug/templates/stdout,sha256=hyoOJ96K2dJfnWRWhyCuariLKbEHXvs9mstV_g5aMdI,469
|
|
39
39
|
amd_debug/templates/txt,sha256=nNdsvbPFOhGdL7VA-_4k5aN3nB-6ouGQt6AsWst7T3w,649
|
|
40
|
-
amd_debug_tools-0.2.
|
|
41
|
-
amd_debug_tools-0.2.
|
|
42
|
-
amd_debug_tools-0.2.
|
|
43
|
-
amd_debug_tools-0.2.
|
|
44
|
-
amd_debug_tools-0.2.
|
|
45
|
-
amd_debug_tools-0.2.
|
|
40
|
+
amd_debug_tools-0.2.3.dist-info/licenses/LICENSE,sha256=RBlZI6r3MRGzymI2VDX2iW__D2APDbMhu_Xg5t6BWeo,1066
|
|
41
|
+
amd_debug_tools-0.2.3.dist-info/METADATA,sha256=-DdxkPvWEXMifkgAjfyNIpleo_rHFPIH8nS6v3AWJTk,6877
|
|
42
|
+
amd_debug_tools-0.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
43
|
+
amd_debug_tools-0.2.3.dist-info/entry_points.txt,sha256=HC11T2up0pPfroAn6Pg5M2jOZXhkWIipToJ1YPTKqu8,116
|
|
44
|
+
amd_debug_tools-0.2.3.dist-info/top_level.txt,sha256=XYjxExbUTEtiIlag_5iQvZSVOC1EIxhKM4NLklReQ0k,234
|
|
45
|
+
amd_debug_tools-0.2.3.dist-info/RECORD,,
|