Skip to content

Commit 47ecee0

Browse files
committed
chore: reformat files with new devctr dependencies
With the latest devctr dependency updates, running `tools/devtool fmt` results in some files being reformatted. These are resulting from new versions of `black` and `mdformat`. Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
1 parent 5368517 commit 47ecee0

27 files changed

Lines changed: 32 additions & 24 deletions

SPECIFICATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ on the following:
6363
getting consistent measurements for some performance metrics.
6464

6565
[^2]: No logs are currently produced in the span of time between the `jailer`
66-
process start-up and the logging system initialization in the `firecracker`
67-
process.
66+
process start-up and the logging system initialization in the
67+
`firecracker` process.
6868

6969
[1]: https://aws.amazon.com/ec2/instance-types/m5/
7070
[2]: https://aws.amazon.com/ec2/instance-types/m6/

tests/framework/ab_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
of both invocations is the same, the test passes (with us being alerted to this situtation via a special pipeline that
2222
does not block PRs). If not, it fails, preventing PRs from introducing new vulnerable dependencies.
2323
"""
24+
2425
from pathlib import Path
2526
from tempfile import TemporaryDirectory
2627
from typing import Callable, Optional, TypeVar

tests/framework/guest_stats.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
"""Classes for querying guest stats inside microVMs.
5-
"""
4+
"""Classes for querying guest stats inside microVMs."""
65

76

87
class ByteUnit:

tests/framework/microvm_helpers.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,22 +254,18 @@ def tmux_gdb(self):
254254
with tempfile.NamedTemporaryFile(
255255
mode="w", suffix=".gdb", delete=False, prefix="fc_gdb_"
256256
) as f:
257-
f.write(
258-
f"""
257+
f.write(f"""
259258
target remote {chroot_gdb_socket}
260259
directory resources/linux
261260
hbreak start_kernel
262261
continue
263-
"""
264-
)
262+
""")
265263
gdb_script = f.name
266264

267-
self.tmux_neww(
268-
f"""
265+
self.tmux_neww(f"""
269266
until [ -S {chroot_gdb_socket} ]; do
270267
echo 'waiting for {chroot_gdb_socket}';
271268
sleep 1;
272269
done;
273270
gdb {self.vm.kernel_file} -x {gdb_script}
274-
"""
275-
)
271+
""")

tests/framework/properties.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77
Metadata we want to attach to tests for further analysis and troubleshooting
88
"""
9+
910
import os
1011
import platform
1112
import re

tests/framework/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
"""Generic utility functions that are used in the framework."""
4+
45
import errno
56
import json
67
import logging
@@ -558,9 +559,7 @@ def guest_run_fio_iteration(ssh_connection, iteration):
558559
fio = """fio --filename=/dev/vda --direct=1 --rw=randread --bs=4k \
559560
--ioengine=libaio --iodepth=16 --runtime=10 --numjobs=4 --time_based \
560561
--group_reporting --name=iops-test-job --eta-newline=1 --readonly \
561-
--output /tmp/fio{} > /dev/null &""".format(
562-
iteration
563-
)
562+
--output /tmp/fio{} > /dev/null &""".format(iteration)
564563
exit_code, _, stderr = ssh_connection.run(fio)
565564
assert exit_code == 0, stderr
566565

tests/framework/utils_ftrace.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
"""Utilities for interacting with the kernel's ftrace subsystem"""
4+
45
import contextlib
56

67
from framework.utils import check_output

tests/framework/utils_imdsv2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
`ec2:MetadataHttpPutResponseHopLimit`
1212
"""
1313

14-
1514
import time
1615

1716
import requests

tests/framework/with_filelock.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
TBD disambiguate with the module name in that case.
1111
"""
1212

13-
1413
import functools
1514
import tempfile
1615
from pathlib import Path

tests/host_tools/cpu_load.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
"""Utilities for measuring cpu utilisation for a process."""
4+
45
import time
56
from threading import Thread
67

0 commit comments

Comments
 (0)