Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #5549

Closed
wants to merge 1 commit into from
Closed

test #5549

Show file tree
Hide file tree
Changes from all commits
Commits
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 .buildkite/code.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ steps:
command:
- trap 'buildkite-agent artifact upload "coverage-merged-e2e-*.txt;/tmp/e2e/**/*.log;/tmp/e2e/**/genesis.json;/tmp/e2e/**/runtime_genesis.json"' EXIT
- .buildkite/scripts/download_e2e_test_artifacts.sh
- .buildkite/scripts/test_e2e.sh --timeout 20m
- .buildkite/scripts/test_e2e.sh --timeout 20m --scenario e2e/runtime/keymanager-rotation-failure -n 100
env:
OASIS_E2E_COVERAGE: enable
# Since the trust-root scenarios are tested in SGX mode (for which they are actually relevant)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (sc *kmRotationFailureImpl) Run(ctx context.Context, _ *env.Env) error {

for i := 0; i < 2; i++ {
// Verify that master secret generation works with all key managers.
for j := 0; j < 2; j++ {
for j := 0; j < 1; j++ {
if err := sc.verifyMasterSecret(ctx, generation, 3); err != nil {
return err
}
Expand Down Expand Up @@ -117,7 +117,7 @@ func (sc *kmRotationFailureImpl) Run(ctx context.Context, _ *env.Env) error {

// Verify that master secret generation works with one key manager
// after registrations expire.
for j := 0; j < 2; j++ {
for j := 0; j < 1; j++ {
if err := sc.verifyMasterSecret(ctx, generation, 1); err != nil {
return err
}
Expand Down
17 changes: 16 additions & 1 deletion runtime/src/enclave_rpc/demux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ use std::{
time::SystemTime,
};

use slog::info;
use thiserror::Error;

use super::{
session::{Builder, Session, SessionInfo},
types::{Frame, Message, SessionID},
};
use crate::{common::time::insecure_posix_system_time, identity::Identity};
use crate::{
common::{logger::get_logger, time::insecure_posix_system_time},
identity::Identity,
};

/// Maximum concurrent EnclaveRPC sessions.
const MAX_CONCURRENT_SESSIONS: usize = 100;
Expand Down Expand Up @@ -162,6 +166,12 @@ impl Demux {
) -> Result<Arc<tokio::sync::Mutex<MultiplexedSession>>, Error> {
let mut sessions = self.sessions.lock().unwrap();

let logger = get_logger("xxxx");
info!(logger, "num sessions";
"id" => ?id,
"n" => ?sessions.len(),
);

if let Some(session) = sessions.get(&id) {
Ok(session.clone())
} else {
Expand All @@ -184,6 +194,11 @@ impl Demux {

sessions.insert(id, session.clone());

info!(logger, "adding new session";
"id" => ?id,
"n" => sessions.len(),
);

Ok(session)
} else {
Err(Error::MaxConcurrentSessions)
Expand Down
Loading