| 475 | |
| 476 | |
| 477 | def stress_fixture(): |
| 478 | first = b"a" * 4097 |
| 479 | second = b"a" * 4096 + b"b" |
| 480 | zero = text(((first, 0, (0, 0)), (second, U64, (0,)))) |
| 481 | hit = text(((first, 0, (0, 1)), (second, U64, (0,)))) |
| 482 | enumeration = text(((second, U64, (0,)), (first, 0, (9, 0)))) |
| 483 | names = tuple(b"x" * 4097 + ("%03d" % i).encode("ascii") for i in range(128)) |
| 484 | expected = (M.ExpectedSuite(b"s", tuple(reversed(names)), M.SuiteOutcome.PASSED),) |
| 485 | observations = (observation(b"s", b"*", b"setup", M.ObservationRole.SETUP, zero),) + tuple( |
| 486 | observation(b"s", name, ("k%03d" % i).encode("ascii"), M.ObservationRole.PARENT, hit) |
| 487 | for i, name in enumerate(reversed(names))) |
| 488 | evidence = (claims(b"s", b"*"),) + tuple(claims(b"s", name) for name in names) |
| 489 | profiles = (b"CBM_PROFILE_MAP\t2\t" + IMAGE_HEX + b"\t2\n0\t" + first.hex().encode("ascii") + |
| 490 | b"\t0000000000000000\t2\n1\t" + second.hex().encode("ascii") + |
| 491 | b"\tffffffffffffffff\t1\n") |
| 492 | tests = b"s:*\tcomplete\t\t\n" + b"".join(b"s:" + name + b"\tcomplete\t\t0\n" for name in names) |
| 493 | f = dict(image_sha256=IMAGE, enumeration_text=enumeration, expected_suites=expected, |
| 494 | observations=observations, row_evidence=evidence, limits=ample()) |
| 495 | return f, profiles, tests |
| 496 | |
| 497 | |
| 498 | def renamed_fixture(suite=None, test=None): |