Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b7910ab
Is /mnt there?
achamayou Oct 29, 2025
134e2cb
Merge branch 'main' into pool_test
achamayou Oct 29, 2025
4e4b60c
explore
achamayou Oct 29, 2025
fb93062
.
achamayou Oct 29, 2025
0239a92
.
achamayou Oct 29, 2025
f141edb
.
achamayou Oct 29, 2025
857901d
CI checks on /mnt
achamayou Oct 29, 2025
7494e20
Repository path '/mnt/CCF' is not under '/__w/CCF/CCF'
achamayou Oct 29, 2025
c667f39
check for shenanigans
achamayou Oct 29, 2025
9039414
collapse checks
achamayou Oct 29, 2025
d11c314
More on the same pool
achamayou Oct 29, 2025
cb0f356
Merge branch 'main' into pool_test
achamayou Oct 29, 2025
d165530
j8
achamayou Oct 29, 2025
311e5c5
j12
achamayou Oct 29, 2025
1abad15
Merge branch 'main' into pool_test
achamayou Oct 30, 2025
7c58ded
Use d16 now
achamayou Oct 30, 2025
dd3a39b
fio
achamayou Oct 30, 2025
60da971
bigger
achamayou Oct 30, 2025
919ec34
more files
achamayou Oct 30, 2025
0002878
split
achamayou Oct 30, 2025
fa69a77
agent uses /mnt automatically
achamayou Oct 30, 2025
c2c1020
new pool
achamayou Oct 30, 2025
3a1444f
Update the rest
achamayou Oct 30, 2025
02ca653
Merge branch 'main' into pool_test
achamayou Oct 30, 2025
e713417
faster unit tests
achamayou Oct 30, 2025
4f23012
fan out governance
achamayou Oct 30, 2025
d24174d
pack
achamayou Oct 30, 2025
b9447fc
pack
achamayou Oct 30, 2025
4f9dda7
b is primary now
achamayou Oct 31, 2025
6305369
pack
achamayou Oct 31, 2025
d10b0ce
snp
achamayou Oct 31, 2025
41521d9
Merge branch 'main' into pool_test
achamayou Oct 31, 2025
1c8a928
not that one
achamayou Oct 31, 2025
1d9ae42
missing tesT
achamayou Oct 31, 2025
5f61782
Merge branch 'main' into pool_test
achamayou Oct 31, 2025
14d4689
Merge branch 'main' into pool_test
achamayou Oct 31, 2025
33b7dfe
snp
achamayou Oct 31, 2025
ab66125
big_genoa
achamayou Oct 31, 2025
377d3d8
doh
achamayou Oct 31, 2025
6a5856f
fine
achamayou Oct 31, 2025
4492fe3
sometimes it's letters
achamayou Oct 31, 2025
3f59563
pack
achamayou Oct 31, 2025
2950074
last
achamayou Oct 31, 2025
1ee50b0
fmt
achamayou Oct 31, 2025
7a148ff
Revert to gha-vmss-d16av5-ci now that it runs d15adsv5
achamayou Nov 3, 2025
a3314ea
Merge branch 'main' into pool_test
achamayou Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Documents the various GitHub Actions workflows, the role they fulfill and 3rd pa
Builds and runs CCF performance tests, both end to end and micro-benchmarks. Results are posted to bencher.dev, and [plotted to make regressions obvious](https://bencher.dev/console/projects/ccf/plots).
Triggered on every commit on `main`, but not on PR builds because the setup required to build from forks is complex and fragile in terms of security, and the increase in pool usage would be substantial.

Tests are run and published on two different testbeds for comparison: gha-vmss-d16av5-ci (d16av5 VMs) and gha-c-aci-ci (C-ACI with 16 cores and 32Gb RAM), and are labeled accordingly in the bencher UI.
Tests are run and published on two different testbeds for comparison: gha-vmss-d16av5-ci (d16ads_v5 VMs) and gha-c-aci-ci (C-ACI with 16 cores and 32Gb RAM), and are labeled accordingly in the bencher UI.

File: `bencher.yml`
3rd party dependencies:
Expand Down
42 changes: 6 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ concurrency:
permissions: read-all

jobs:
checks:
name: "Format and License Checks"
build_and_checks:
name: "Format, License, Static Analysis, Documentation, Unit and Partition Tests"
runs-on:
[
self-hosted,
Expand All @@ -38,7 +38,7 @@ jobs:
with:
fetch-depth: 0

- name: Run CI checks
- name: "Run CI checks"
run: |
set -ex
git config --global --add safe.directory /__w/CCF/CCF
Expand All @@ -47,33 +47,7 @@ jobs:
./scripts/ci-checks.sh
shell: bash

ci-docs-tidy-unit-partitions:
name: "Docs/clang-tidy/Unit/Partitions"
needs: checks
runs-on:
[
self-hosted,
1ES.Pool=gha-vmss-d16av5-ci,
"JobId=ci_build_tidy-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}",
]
container:
image: mcr.microsoft.com/azurelinux/base/core:3.0
options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE

steps:
- name: "Checkout dependencies"
shell: bash
run: |
set -ex
gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY
tdnf -y update
tdnf -y install ca-certificates git

- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: "Install dependencies"
- name: "Install build dependencies"
shell: bash
run: |
set -ex
Expand All @@ -82,7 +56,6 @@ jobs:
- name: "Build Debug with clang-tidy"
run: |
set -ex
git config --global --add safe.directory /__w/CCF/CCF
mkdir build
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCLANG_TIDY=ON ..
Expand Down Expand Up @@ -114,7 +87,7 @@ jobs:
run: |
set -ex
cd build
./tests.sh --output-on-failure -L unit -j$(nproc --all)
ctest --output-on-failure -L unit -j$(($(nproc --all) * 2))

# Note that those are only run on the virtual CI, as they require enough
# privileges to configure iptables. ACI-based pools run unprivileged
Expand All @@ -127,7 +100,6 @@ jobs:

build_and_test_virtual:
name: "Virtual CI"
needs: checks
runs-on:
[
self-hosted,
Expand Down Expand Up @@ -209,7 +181,6 @@ jobs:
1ES.Pool=gha-c-aci-ci,
"JobId=aci_snp_milan-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}",
]
needs: checks

steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -291,7 +262,6 @@ jobs:
1ES.Pool=gha-aci-genoa,
"JobId=aci_snp_genoa-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}",
]
needs: checks

steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -354,7 +324,7 @@ jobs:
- name: "Upload logs"
uses: actions/upload-artifact@v5
with:
name: logs-caci-snp-genoa
name: logs-aci-snp-genoa
path: |
dmesg.log
build/workspace/*/*.config.json
Expand Down
58 changes: 11 additions & 47 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ if(BUILD_TESTS)
add_e2e_test(
NAME recovery_test_api_1
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/recovery.py
ADDITIONAL_ARGS ${ADDITIONAL_RECOVERY_ARGS} --gov-api-version "2024-07-01"
ADDITIONAL_ARGS ${ADDITIONAL_RECOVERY_ARGS}
)

add_e2e_test(
Expand Down Expand Up @@ -900,12 +900,6 @@ if(BUILD_TESTS)
${CMAKE_SOURCE_DIR}/samples/templates
)

add_e2e_test(
NAME committable_suffix_test
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/committable.py
ADDITIONAL_ARGS --sig-ms-interval 100
)

add_e2e_test(
NAME commit_latency
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/commit_latency.py
Expand Down Expand Up @@ -955,7 +949,7 @@ if(BUILD_TESTS)
)

add_e2e_test(
NAME governance_test
NAME governance
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/governance.py
CONSTITUTION ${CONSTITUTION_ARGS}
ADDITIONAL_ARGS --initial-operator-count 1 --jinja-templates-path
Expand Down Expand Up @@ -1013,6 +1007,7 @@ if(BUILD_TESTS)
NAME programmability
CONSTITUTION ${RBAC_CONSTITUTION_ARGS}
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/programmability.py
ADDITIONAL_ARGS --js-app-bundle ${CMAKE_SOURCE_DIR}/samples/apps/logging/js
)

# This test uses large requests (so too slow for SAN)
Expand All @@ -1022,25 +1017,13 @@ if(BUILD_TESTS)
)
endif()

add_e2e_test(
NAME e2e_redirects
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/redirects.py
ADDITIONAL_ARGS --js-app-bundle ${CMAKE_SOURCE_DIR}/samples/apps/logging/js
)

add_e2e_test(
NAME e2e_logging_http2
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/e2e_logging.py
ADDITIONAL_ARGS --js-app-bundle ${CMAKE_SOURCE_DIR}/samples/apps/logging/js
--http2
)

add_e2e_test(
NAME membership_api_1
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/membership.py
ADDITIONAL_ARGS --gov-api-version "2024-07-01"
)

add_e2e_test(
NAME partitions
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/partitions_test.py
Expand Down Expand Up @@ -1073,15 +1056,6 @@ if(BUILD_TESTS)
NAME connections PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/connections.py
)

add_e2e_test(
NAME consistency_trace_validation
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/consistency_trace_validation.py
)

add_e2e_test(
NAME fuzz_test PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/fuzzing.py
)

if(CLIENT_PROTOCOLS_TEST)
add_e2e_test(
NAME client_protocols
Expand Down Expand Up @@ -1138,28 +1112,12 @@ if(BUILD_TESTS)
)
endif()

if(LONG_TESTS)
set(ROTATION_TEST_ARGS --rotation-retirements 10)
endif()

add_e2e_test(
NAME rotation_test
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/rotation.py
LABEL rotation
ADDITIONAL_ARGS ${ROTATION_TEST_ARGS}
)

set(RECONFIG_TEST_ARGS --ccf-version ${CCF_VERSION})
add_e2e_test(
NAME reconfiguration_test
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/reconfiguration.py
NAME election_test
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/election.py
ADDITIONAL_ARGS ${RECONFIG_TEST_ARGS}
)
set_property(TEST reconfiguration_test PROPERTY LABELS reconfiguration)

add_e2e_test(
NAME election_test PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/election.py
)

add_piccolo_test(
NAME pi_ls
Expand Down Expand Up @@ -1225,7 +1183,13 @@ if(BUILD_TESTS)
add_e2e_test(
NAME e2e_curl PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/e2e_curl.py
)

add_e2e_test(
NAME consistency_trace_validation
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/consistency_trace_validation.py
)
endif()

endif()

# Generate and install CMake export file for consumers using CMake
Expand Down
20 changes: 20 additions & 0 deletions tests/amd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
import infra.e2e_args
from infra.runner import ConcurrentRunner
import e2e_operations


if __name__ == "__main__":
cr = ConcurrentRunner()

cr.add(
"platform",
e2e_operations.run_snp_tests,
package="samples/apps/logging/logging",
nodes=infra.e2e_args.min_nodes(cr.args, f=0),
initial_user_count=1,
ledger_chunk_bytes="1B", # Chunk ledger at every signature transaction
)

cr.run()
6 changes: 0 additions & 6 deletions tests/committable.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,3 @@ def run(args):
# Resume original primary, check that they rejoin correctly, including new transactions
primary.resume()
network.wait_for_node_commit_sync(timeout=16)


if __name__ == "__main__":
args = infra.e2e_args.cli_args()
args.package = "samples/apps/logging/logging"
run(args)
14 changes: 11 additions & 3 deletions tests/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from infra.runner import ConcurrentRunner

from loguru import logger as LOG
import fuzzing


class AllConnectionsCreatedException(Exception):
Expand Down Expand Up @@ -448,14 +449,21 @@ def try_write(msg_bytes):
"robustness",
run_node_socket_robustness_tests,
package="samples/apps/logging/logging",
nodes=infra.e2e_args.nodes(cr.args, 1),
nodes=infra.e2e_args.min_nodes(cr.args, f=0),
)

cr.add(
"idletimeout",
run_idle_timeout_tests,
package="samples/apps/logging/logging",
nodes=infra.e2e_args.nodes(cr.args, 1),
nodes=infra.e2e_args.min_nodes(cr.args, f=0),
)

cr.add(
"fuzzing",
fuzzing.run,
package="samples/apps/logging/logging",
nodes=infra.e2e_args.min_nodes(cr.args, f=0),
)

# Need to modify args.max_open_sessions _before_ calling e2e_args.nodes for
Expand All @@ -468,7 +476,7 @@ def try_write(msg_bytes):
"caps",
run_connection_caps_tests,
package="samples/apps/logging/logging",
nodes=infra.e2e_args.nodes(cr.args, 1),
nodes=infra.e2e_args.min_nodes(cr.args, f=0),
initial_user_count=1,
)

Expand Down
44 changes: 42 additions & 2 deletions tests/election.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
from infra.runner import ConcurrentRunner
from loguru import logger as LOG

import committable
import reconfiguration

# This test starts from a given number of nodes (hosts), commits
# a transaction, stops the current primary, waits for an election and repeats
# this process until no progress can be made (i.e. no primary can be elected
Expand Down Expand Up @@ -241,17 +244,54 @@ def run(args):
LOG.success("Test ended successfully.")


def rotation(args):
with infra.network.network(
args.nodes, args.binary_dir, args.debug_nodes, pdb=args.pdb
) as network:
network.start_and_open(args)
rotation_retirements = 2

# Replace primary repeatedly and check the network still operates
LOG.info(f"Retiring primary {rotation_retirements} times")
for i in range(rotation_retirements):
LOG.warning(f"Retirement {i}")
reconfiguration.test_add_node(network, args)
reconfiguration.test_retire_primary(network, args)


if __name__ == "__main__":
cr = ConcurrentRunner()

args = copy.deepcopy(cr.args)

cr.add(
"cft",
"election",
run,
package="samples/apps/logging/logging",
nodes=infra.e2e_args.min_nodes(args, f=1),
election_timeout_ms=1000,
)

cr.run(1)
cr.add(
"committable",
committable.run,
package="samples/apps/logging/logging",
nodes=[],
)

cr.add(
"rotation",
rotation,
package="samples/apps/logging/logging",
nodes=infra.e2e_args.max_nodes(args, f=0),
initial_member_count=1,
)

cr.add(
"reconfiguration",
reconfiguration.run_all,
package="samples/apps/logging/logging",
nodes=infra.e2e_args.min_nodes(cr.args, f=1),
)

cr.run()
8 changes: 0 additions & 8 deletions tests/fuzzing.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,3 @@ def run(args):
network.ignore_error_pattern_on_shutdown("Unknown frontend msg type")

fuzz_node_to_node(network, args)


if __name__ == "__main__":
args = infra.e2e_args.cli_args()
args.package = "samples/apps/logging/logging"

args.nodes = infra.e2e_args.min_nodes(args, f=0)
run(args)
Loading