Skip to content

Create per-library unit test targets#13253

Open
tclinkenbeard-oai wants to merge 4 commits into
apple:mainfrom
tclinkenbeard-oai:dev/tclinkenbeard/fdbclient-test
Open

Create per-library unit test targets#13253
tclinkenbeard-oai wants to merge 4 commits into
apple:mainfrom
tclinkenbeard-oai:dev/tclinkenbeard/fdbclient-test

Conversation

@tclinkenbeard-oai
Copy link
Copy Markdown
Collaborator

This PR builds on #13207 to create unit test targets for fdbclient and fdbserver sub-components. fdbclient_test uses the same pattern as fdbrpc_test, and a CMake add_fdbserver_unit_test function is used to add unit test targets for fdbserver sub-components. Validated by running individual unit test targets.

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: 89a137b
  • Duration 0:29:32
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: bad8c71
  • Duration 0:30:42
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

Copy link
Copy Markdown
Collaborator Author

@tclinkenbeard-oai tclinkenbeard-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by Codex.

What is it trying to do?

This PR adds standalone unit-test executables for fdbclient and for selected fdbserver library subdirectories. The targets reuse the flow/fdbrpc UnitTestRunner pattern: link the primary static library with WHOLE_ARCHIVE, filter registered TEST_CASEs by source path component, and keep the targets out of the default build with EXCLUDE_FROM_ALL.

Is it correct?

From code inspection, the approach looks consistent with the existing flow_test and fdbrpc_test targets. The new fdbclient_test removes its main file from FDBCLIENT_SRCS, links fdbclient with whole-archive, and uses the fdbclient suite filter. The add_fdbserver_unit_test helper mirrors the existing fdbserver link-test helper and passes a quoted source-subdirectory suite name into FDBServerUnitTestMain.cpp.

I did not see serialization, protocol-version, persistence-format, async lifetime, or hot-path behavior changes in this PR. Public inline review comments are empty. I did not run build or test validation. The visible FoundationDB CI checks were still pending when I reviewed this, so I would still wait for them before merging.

Are there bugs?

I did not find any correctness bugs in the changed code.

Are there omissions?

The main omission is that this does not create a target for fdbserver/workloads, even though that directory has TEST_CASEs. The PR history shows that target was added and then removed, so this looks intentional rather than accidental, and I do not think it blocks this PR. It may be worth mentioning in the PR description if workloads are excluded because they need heavier simulation/tester dependencies.

Are there better ways of doing things?

No blocking alternatives. Keeping the fdbserver helper next to add_fdbserver_link_test is a reasonable way to avoid repeating the whole-archive/link-dependency pattern across subdirectories.

Should this CL be LGTMd?

Yes, LGTM from code inspection, assuming the pending CI checks pass. The remaining risk is build/link coverage across platform-specific configurations, which CI is the right validation for here.

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: 89a137b
  • Duration 0:45:47
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 89a137b
  • Duration 0:46:34
  • Result: ❌ FAILED
  • Error: Error while executing command: ctest -j ${NPROC} --no-compress-output -T test --output-on-failure. Reason: exit status 8
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: bad8c71
  • Duration 0:45:31
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x

  • Commit ID: 89a137b
  • Duration 1:05:49
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS Ventura 13.x

  • Commit ID: bad8c71
  • Duration 1:01:52
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 89a137b
  • Duration 1:08:53
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 89a137b
  • Duration 1:10:13
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: bad8c71
  • Duration 1:10:00
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: bad8c71
  • Duration 1:12:47
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: bad8c71
  • Duration 1:17:15
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS Ventura 13.x

  • Commit ID: 89a137b
  • Duration 1:45:33
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x

  • Commit ID: bad8c71
  • Duration 1:56:42
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants