Skip to content

cdh: serialize sealed-secret signing tests - #1795

Merged
Xynnn007 merged 1 commit into
confidential-containers:mainfrom
Xynnn007:cdh/serialize-sealed-secret-tests
Oct 8, 2026
Merged

Xynnn007 merged 1 commit into
confidential-containers:mainfrom
Xynnn007:cdh/serialize-sealed-secret-tests

Conversation

@Xynnn007

@Xynnn007 Xynnn007 commented Oct 8, 2026

Copy link
Copy Markdown
Member

The arm64 confidential-data-hub test job intermittently fails in secret::tests::serialize_deserialize::case_2:

deserialization failed:
JsonError(Error("EOF while parsing a value", line: 1, column: 0))

The sealed-secret tests run concurrently while sharing the same signing credential file at /run/confidential-containers/cdh/sealed-secret/test-key. Each test rewrites this file with std::fs::write, which first truncates it. A concurrent reader can therefore observe an empty file before the JSON content has been written.

Serialize serialize_deserialize, check_tampering, and check_wrong_key, which are the tests that access this shared credential. This prevents concurrent writes and reads without changing production behavior.

The arm64 confidential-data-hub test job intermittently fails in
secret::tests::serialize_deserialize::case_2:

  deserialization failed:
  JsonError(Error("EOF while parsing a value", line: 1, column: 0))

The sealed-secret tests run concurrently while sharing the same signing
credential file at
/run/confidential-containers/cdh/sealed-secret/test-key. Each test
rewrites this file with std::fs::write, which first truncates it. A
concurrent reader can therefore observe an empty file before the JSON
content has been written.

Serialize serialize_deserialize, check_tampering, and check_wrong_key,
which are the tests that access this shared credential. This prevents
concurrent writes and reads without changing production behavior.

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>

@stevenhorsman stevenhorsman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks!

@Xynnn007
Xynnn007 merged commit fb113d5 into confidential-containers:main Oct 8, 2026
32 checks passed
@Xynnn007
Xynnn007 deleted the cdh/serialize-sealed-secret-tests branch October 9, 2026 03:18
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