Skip to content

Commit

Permalink
added remaining decorators for expected assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
schroeding committed Dec 1, 2024
1 parent c820ccf commit 67c7df8
Showing 1 changed file with 212 additions and 0 deletions.
212 changes: 212 additions & 0 deletions benchexec/test_core_assignment_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ def test_quadCPU_HT_invalid(self):
self.assertInvalid(5, 16)


@expect_assignment(1, [[x] for x in [0, 2, 4, 6]])
@expect_assignment(2, [[0, 2], [4, 6]])
@expect_assignment(3, [[0, 2, 4]])
@expect_assignment(4, [[0, 2, 4, 6]])
class TestCpuCoresPerRun_singleCPU_no_ht(TestCpuCoresPerRun):
num_of_packages = 1
num_of_cores = 8
Expand All @@ -701,6 +705,11 @@ def test_singleCPU_no_ht_invalid(self):
self.assertInvalid(8, 1)


@expect_assignment(1, [[0], [8], [2], [10], [4], [12], [6], [14]])
@expect_assignment(2, [[0, 2], [8, 10], [4, 6], [12, 14]])
@expect_assignment(3, [[0, 2, 4], [8, 10, 12]])
@expect_assignment(4, [[0, 2, 4, 6], [8, 10, 12, 14]])
@expect_assignment(8, [[0, 2, 4, 6, 8, 10, 12, 14]])
class TestCpuCoresPerRun_dualCPU_no_ht(TestCpuCoresPerRun):
num_of_packages = 2
num_of_cores = 16
Expand All @@ -726,6 +735,11 @@ def test_dualCPU_no_ht_invalid(self):
self.assertInvalid(8, 3)


@expect_assignment(1, [[x] for x in [0, 6, 12, 2, 8, 14, 4, 10, 16]])
@expect_assignment(2, [[0, 2], [6, 8], [12, 14]], 3)
@expect_assignment(3, [[0, 2, 4], [6, 8, 10], [12, 14, 16]])
@expect_assignment(4, [[0, 2, 4, 6]], 1)
@expect_assignment(8, [[0, 2, 4, 6, 8, 10, 12, 14]])
class TestCpuCoresPerRun_threeCPU_no_ht(TestCpuCoresPerRun):
num_of_packages = 3
num_of_cores = 18
Expand Down Expand Up @@ -754,6 +768,39 @@ def test_fourCoresPerRun(self):
self._test_nCoresPerRun(4, self.fourCore_assignment, 1)


@expect_assignment(
1, [[x] for x in [0, 8, 16, 24, 2, 10, 18, 26, 4, 12, 20, 28, 6, 14, 22, 30]]
)
@expect_assignment(
2,
[
[0, 2],
[8, 10],
[16, 18],
[24, 26],
[4, 6],
[12, 14],
[20, 22],
[28, 30],
],
)
@expect_assignment(3, [[0, 2, 4], [8, 10, 12], [16, 18, 20], [24, 26, 28]], 4)
@expect_assignment(
4,
[
[0, 2, 4, 6],
[8, 10, 12, 14],
[16, 18, 20, 22],
[24, 26, 28, 30],
],
)
@expect_assignment(
8,
[
[0, 2, 4, 6, 8, 10, 12, 14],
[16, 18, 20, 22, 24, 26, 28, 30],
],
)
class TestCpuCoresPerRun_quadCPU_no_ht(TestCpuCoresPerRun):
num_of_packages = 4
num_of_cores = 32
Expand Down Expand Up @@ -803,6 +850,12 @@ def test_quadCPU_no_ht_valid(self):
self.assertInvalid(6, 3)


@expect_assignment(1, [[x] for x in [0, 8, 2, 10, 4, 12, 6, 14]])
@expect_assignment(2, [[0, 2], [8, 10], [4, 6], [12, 14]])
@expect_assignment(3, [[0, 2, 4], [8, 10, 12]])
@expect_assignment(4, [[0, 2, 4, 6], [8, 10, 12, 14]])
@expect_assignment(5, [[0, 2, 4, 6, 8]])
@expect_assignment(8, [[0, 2, 4, 6, 8, 10, 12, 14]])
class Test_Topology_P1_NUMA2_L8_C16_F(TestCpuCoresPerRun):
num_of_packages = 1
num_of_NUMAs = 2
Expand Down Expand Up @@ -842,6 +895,23 @@ def test_invalid(self):
self.assertInvalid(3, 3)


@expect_assignment(1, [[x] for x in [0, 8, 2, 10, 4, 12, 6, 14]])
@expect_assignment(
2,
[
[0, 1],
[8, 9],
[2, 3],
[10, 11],
[4, 5],
[12, 13],
[6, 7],
[14, 15],
],
)
@expect_assignment(3, [[0, 1, 2], [8, 9, 10], [4, 5, 6], [12, 13, 14]])
@expect_assignment(4, [[0, 1, 2, 3], [8, 9, 10, 11], [4, 5, 6, 7], [12, 13, 14, 15]])
@expect_assignment(8, [[0, 1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14, 15]])
class Test_Topology_P1_NUMA2_L8_C16_T(TestCpuCoresPerRun):
num_of_packages = 1
num_of_NUMAs = 2
Expand Down Expand Up @@ -873,6 +943,10 @@ def test_invalid(self):
self.assertInvalid(3, 5)


@expect_assignment(1, [[x] for x in [0, 4, 8, 2, 6, 10]])
@expect_assignment(2, [[0, 2], [4, 6], [8, 10]])
@expect_assignment(3, [[0, 2, 4]], 1)
@expect_assignment(4, [[0, 2, 4, 6]])
class Test_Topology_P1_NUMA3_L6_C12_F(TestCpuCoresPerRun):
num_of_packages = 1
num_of_NUMAs = 3
Expand Down Expand Up @@ -904,6 +978,12 @@ def test_invalid(self):
self.assertInvalid(4, 2)


@expect_assignment(1, [[x] for x in [0, 4, 8, 2, 6, 10]])
@expect_assignment(2, [[0, 1], [4, 5], [8, 9], [2, 3], [6, 7], [10, 11]])
@expect_assignment(3, [[0, 1, 2], [4, 5, 6], [8, 9, 10]])
@expect_assignment(4, [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]])
@expect_assignment(5, [[0, 1, 2, 3, 4]], 1)
@expect_assignment(8, [[0, 1, 2, 3, 4, 5, 6, 7]])
class Test_Topology_P1_NUMA3_L6_C12_T(TestCpuCoresPerRun):
num_of_packages = 1
num_of_NUMAs = 3
Expand Down Expand Up @@ -939,6 +1019,11 @@ def test_invalid(self):
self.assertInvalid(5, 2)


@expect_assignment(1, [[x] for x in [0, 8, 4, 12, 2, 10, 6, 14]])
@expect_assignment(2, [[0, 2], [8, 10], [4, 6], [12, 14]])
@expect_assignment(3, [[0, 2, 4], [8, 10, 12]])
@expect_assignment(4, [[0, 2, 4, 6], [8, 10, 12, 14]])
@expect_assignment(8, [[0, 2, 4, 6, 8, 10, 12, 14]])
class Test_Topology_P2_NUMA4_L8_C16_F(TestCpuCoresPerRun):
num_of_packages = 2
num_of_NUMAs = 4
Expand All @@ -962,6 +1047,23 @@ def test_invalid(self):
self.assertInvalid(8, 2)


@expect_assignment(1, [[x] for x in [0, 8, 4, 12, 2, 10, 6, 14]])
@expect_assignment(
2,
[
[0, 1],
[8, 9],
[4, 5],
[12, 13],
[2, 3],
[10, 11],
[6, 7],
[14, 15],
],
)
@expect_assignment(3, [[0, 1, 2], [8, 9, 10], [4, 5, 6], [12, 13, 14]])
@expect_assignment(4, [[0, 1, 2, 3], [8, 9, 10, 11], [4, 5, 6, 7], [12, 13, 14, 15]])
@expect_assignment(8, [[0, 1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14, 15]])
class Test_Topology_P2_NUMA4_L8_C16_T(TestCpuCoresPerRun):
num_of_packages = 2
num_of_NUMAs = 4
Expand Down Expand Up @@ -994,6 +1096,11 @@ def test_invalid(self):
self.assertInvalid(8, 3)


@expect_assignment(1, [[x] for x in [0, 8, 4, 12, 2, 10, 6, 14]])
@expect_assignment(2, [[0, 2], [8, 10], [4, 6], [12, 14]])
@expect_assignment(3, [[0, 2, 4], [8, 10, 12]])
@expect_assignment(4, [[0, 2, 4, 6], [8, 10, 12, 14]])
@expect_assignment(8, [[0, 2, 4, 6, 8, 10, 12, 14]])
class Test_Topology_P1_G2_NUMA4_L8_C16_F(TestCpuCoresPerRun):
num_of_packages = 1
num_of_groups = 2
Expand All @@ -1018,6 +1125,23 @@ def test_invalid(self):
self.assertInvalid(8, 2)


@expect_assignment(1, [[x] for x in [0, 8, 4, 12, 2, 10, 6, 14]])
@expect_assignment(
2,
[
[0, 1],
[8, 9],
[4, 5],
[12, 13],
[2, 3],
[10, 11],
[6, 7],
[14, 15],
],
)
@expect_assignment(3, [[0, 1, 2], [8, 9, 10], [4, 5, 6], [12, 13, 14]])
@expect_assignment(4, [[0, 1, 2, 3], [8, 9, 10, 11], [4, 5, 6, 7], [12, 13, 14, 15]])
@expect_assignment(8, [[0, 1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14, 15]])
class Test_Topology_P1_G2_NUMA4_L8_C16_T(TestCpuCoresPerRun):
num_of_packages = 1
num_of_groups = 2
Expand Down Expand Up @@ -1051,6 +1175,10 @@ def test_invalid(self):
self.assertInvalid(8, 3)


@expect_assignment(1, [[x] for x in [0, 6, 3, 9]])
@expect_assignment(2, [[0, 3], [6, 9]])
@expect_assignment(3, [[0, 3, 6]])
@expect_assignment(4, [[0, 3, 6, 9]])
class Test_Topology_P1_NUMA2_L4_C12_F3(TestCpuCoresPerRun):
num_of_packages = 1
num_of_NUMAs = 2
Expand All @@ -1073,6 +1201,11 @@ def test_invalid(self):
self.assertInvalid(8, 3)


@expect_assignment(1, [[x] for x in [0, 6, 3, 9]])
@expect_assignment(2, [[0, 1], [6, 7], [3, 4], [9, 10]])
@expect_assignment(3, [[0, 1, 2], [6, 7, 8], [3, 4, 5], [9, 10, 11]])
@expect_assignment(4, [[0, 1, 2, 3], [6, 7, 8, 9]])
@expect_assignment(8, [[0, 1, 2, 3, 4, 5, 6, 7]])
class Test_Topology_P1_NUMA2_L4_C12_T3(TestCpuCoresPerRun):
num_of_packages = 1
num_of_NUMAs = 2
Expand All @@ -1096,6 +1229,85 @@ def test_invalid(self):
self.assertInvalid(8, 2)


# fmt: off
@expect_assignment(
1,
[[x] for x in [
0, 128, 32, 160, 64, 192, 96, 224,
16, 144, 48, 176, 80, 208, 112, 240,
2, 130, 34, 162, 66, 194, 98, 226,
18, 146, 50, 178, 82, 210, 114, 242,
4, 132, 36, 164, 68, 196, 100, 228,
20, 148, 52, 180, 84, 212, 116, 244,
6, 134, 38, 166, 70, 198, 102, 230,
22, 150, 54, 182, 86, 214, 118, 246,
8, 136, 40, 168, 72, 200, 104, 232,
24, 152, 56, 184, 88, 216, 120, 248,
10, 138, 42, 170, 74, 202, 106, 234,
26, 154, 58, 186, 90, 218, 122, 250,
12, 140, 44, 172, 76, 204, 108, 236,
28, 156, 60, 188, 92, 220, 124, 252,
14, 142, 46, 174, 78, 206, 110, 238,
30, 158, 62, 190, 94, 222, 126, 254
]]
)
@expect_assignment(
2,
[
[0, 1], [128, 129], [32, 33], [160, 161], [64, 65], [192, 193], [96, 97], [224, 225],
[16, 17], [144, 145], [48, 49], [176, 177], [80, 81], [208, 209], [112, 113], [240, 241],
[2, 3], [130, 131], [34, 35], [162, 163], [66, 67], [194, 195], [98, 99], [226, 227],
[18, 19], [146, 147], [50, 51], [178, 179], [82, 83], [210, 211], [114, 115], [242, 243],
[4, 5], [132, 133], [36, 37], [164, 165], [68, 69], [196, 197], [100, 101], [228, 229],
[20, 21], [148, 149], [52, 53], [180, 181], [84, 85], [212, 213], [116, 117], [244, 245],
[6, 7], [134, 135], [38, 39], [166, 167], [70, 71], [198, 199], [102, 103], [230, 231],
[22, 23], [150, 151], [54, 55], [182, 183], [86, 87], [214, 215], [118, 119], [246, 247],
[8, 9], [136, 137], [40, 41], [168, 169], [72, 73], [200, 201], [104, 105], [232, 233],
[24, 25], [152, 153], [56, 57], [184, 185], [88, 89], [216, 217], [120, 121], [248, 249],
[10, 11], [138, 139], [42, 43], [170, 171], [74, 75], [202, 203], [106, 107], [234, 235],
[26, 27], [154, 155], [58, 59], [186, 187], [90, 91], [218, 219], [122, 123], [250, 251],
[12, 13], [140, 141], [44, 45], [172, 173], [76, 77], [204, 205], [108, 109], [236, 237],
[28, 29], [156, 157], [60, 61], [188, 189], [92, 93], [220, 221], [124, 125], [252, 253],
[14, 15], [142, 143], [46, 47], [174, 175], [78, 79], [206, 207], [110, 111], [238, 239],
[30, 31], [158, 159], [62, 63], [190, 191], [94, 95], [222, 223], [126, 127], [254, 255]
]
)
@expect_assignment(
3,
[
[0, 1, 2], [128, 129, 130], [32, 33, 34], [160, 161, 162], [64, 65, 66], [192, 193, 194], [96, 97, 98], [224, 225, 226],
[16, 17, 18], [144, 145, 146], [48, 49, 50], [176, 177, 178], [80, 81, 82], [208, 209, 210], [112, 113, 114], [240, 241, 242],
[4, 5, 6], [132, 133, 134], [36, 37, 38], [164, 165, 166], [68, 69, 70], [196, 197, 198], [100, 101, 102], [228, 229, 230],
[20, 21, 22], [148, 149, 150], [52, 53, 54], [180, 181, 182], [84, 85, 86], [212, 213, 214], [116, 117, 118], [244, 245, 246],
[8, 9, 10], [136, 137, 138], [40, 41, 42], [168, 169, 170], [72, 73, 74], [200, 201, 202], [104, 105, 106], [232, 233, 234],
[24, 25, 26], [152, 153, 154], [56, 57, 58], [184, 185, 186], [88, 89, 90], [216, 217, 218], [120, 121, 122], [248, 249, 250],
[12, 13, 14], [140, 141, 142], [44, 45, 46], [172, 173, 174], [76, 77, 78], [204, 205, 206], [108, 109, 110], [236, 237, 238],
[28, 29, 30], [156, 157, 158], [60, 61, 62], [188, 189, 190], [92, 93, 94], [220, 221, 222], [124, 125, 126], [252, 253, 254],
]
)
@expect_assignment(
4,
[
[0, 1, 2, 3], [128, 129, 130, 131], [32, 33, 34, 35], [160, 161, 162, 163], [64, 65, 66, 67], [192, 193, 194, 195], [96, 97, 98, 99], [224, 225, 226, 227],
[16, 17, 18, 19], [144, 145, 146, 147], [48, 49, 50, 51], [176, 177, 178, 179], [80, 81, 82, 83], [208, 209, 210, 211], [112, 113, 114, 115], [240, 241, 242, 243],
[4, 5, 6, 7], [132, 133, 134, 135], [36, 37, 38, 39], [164, 165, 166, 167], [68, 69, 70, 71], [196, 197, 198, 199], [100, 101, 102, 103], [228, 229, 230, 231],
[20, 21, 22, 23], [148, 149, 150, 151], [52, 53, 54, 55], [180, 181, 182, 183], [84, 85, 86, 87], [212, 213, 214, 215], [116, 117, 118, 119], [244, 245, 246, 247],
[8, 9, 10, 11], [136, 137, 138, 139], [40, 41, 42, 43], [168, 169, 170, 171], [72, 73, 74, 75], [200, 201, 202, 203], [104, 105, 106, 107], [232, 233, 234, 235],
[24, 25, 26, 27], [152, 153, 154, 155], [56, 57, 58, 59], [184, 185, 186, 187], [88, 89, 90, 91], [216, 217, 218, 219], [120, 121, 122, 123], [248, 249, 250, 251],
[12, 13, 14, 15], [140, 141, 142, 143], [44, 45, 46, 47], [172, 173, 174, 175], [76, 77, 78, 79], [204, 205, 206, 207], [108, 109, 110, 111], [236, 237, 238, 239],
[28, 29, 30, 31], [156, 157, 158, 159], [60, 61, 62, 63], [188, 189, 190, 191], [92, 93, 94, 95], [220, 221, 222, 223], [124, 125, 126, 127], [252, 253, 254, 255],
]
)
@expect_assignment(
8,
[
[0, 1, 2, 3, 4, 5, 6, 7], [128, 129, 130, 131, 132, 133, 134, 135], [32, 33, 34, 35, 36, 37, 38, 39], [160, 161, 162, 163, 164, 165, 166, 167], [64, 65, 66, 67, 68, 69, 70, 71], [192, 193, 194, 195, 196, 197, 198, 199], [96, 97, 98, 99, 100, 101, 102, 103], [224, 225, 226, 227, 228, 229, 230, 231],
[16, 17, 18, 19, 20, 21, 22, 23], [144, 145, 146, 147, 148, 149, 150, 151], [48, 49, 50, 51, 52, 53, 54, 55], [176, 177, 178, 179, 180, 181, 182, 183], [80, 81, 82, 83, 84, 85, 86, 87], [208, 209, 210, 211, 212, 213, 214, 215], [112, 113, 114, 115, 116, 117, 118, 119], [240, 241, 242, 243, 244, 245, 246, 247],
[8, 9, 10, 11, 12, 13, 14, 15], [136, 137, 138, 139, 140, 141, 142, 143], [40, 41, 42, 43, 44, 45, 46, 47], [168, 169, 170, 171, 172, 173, 174, 175], [72, 73, 74, 75, 76, 77, 78, 79], [200, 201, 202, 203, 204, 205, 206, 207], [104, 105, 106, 107, 108, 109, 110, 111], [232, 233, 234, 235, 236, 237, 238, 239],
[24, 25, 26, 27, 28, 29, 30, 31], [152, 153, 154, 155, 156, 157, 158, 159], [56, 57, 58, 59, 60, 61, 62, 63], [184, 185, 186, 187, 188, 189, 190, 191], [88, 89, 90, 91, 92, 93, 94, 95], [216, 217, 218, 219, 220, 221, 222, 223], [120, 121, 122, 123, 124, 125, 126, 127], [248, 249, 250, 251, 252, 253, 254, 255],
]
)
# fmt: on
class Test_Topology_P2_G2_NUMA8_L16_C256_T(TestCpuCoresPerRun):
num_of_packages = 2
num_of_groups = 2
Expand Down

0 comments on commit 67c7df8

Please sign in to comment.