diff options
Diffstat (limited to 'tools/testing/selftests/tc-testing/tdc_batch.py')
-rwxr-xr-x | tools/testing/selftests/tc-testing/tdc_batch.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/testing/selftests/tc-testing/tdc_batch.py b/tools/testing/selftests/tc-testing/tdc_batch.py index 707c6bfef689..52fa539dc662 100755 --- a/tools/testing/selftests/tc-testing/tdc_batch.py +++ b/tools/testing/selftests/tc-testing/tdc_batch.py | |||
@@ -49,13 +49,13 @@ index = 0 | |||
49 | for i in range(0x100): | 49 | for i in range(0x100): |
50 | for j in range(0x100): | 50 | for j in range(0x100): |
51 | for k in range(0x100): | 51 | for k in range(0x100): |
52 | mac = ("%02x:%02x:%02x" % (i, j, k)) | 52 | mac = ("{:02x}:{:02x}:{:02x}".format(i, j, k)) |
53 | src_mac = "e4:11:00:" + mac | 53 | src_mac = "e4:11:00:" + mac |
54 | dst_mac = "e4:12:00:" + mac | 54 | dst_mac = "e4:12:00:" + mac |
55 | cmd = ("filter add dev %s %s protocol ip parent ffff: flower %s " | 55 | cmd = ("filter add dev {} {} protocol ip parent ffff: flower {} " |
56 | "src_mac %s dst_mac %s action drop %s" % | 56 | "src_mac {} dst_mac {} action drop {}".format |
57 | (device, prio, skip, src_mac, dst_mac, share_action)) | 57 | (device, prio, skip, src_mac, dst_mac, share_action)) |
58 | file.write("%s\n" % cmd) | 58 | file.write("{}\n".format(cmd)) |
59 | index += 1 | 59 | index += 1 |
60 | if index >= number: | 60 | if index >= number: |
61 | file.close() | 61 | file.close() |