# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.1# SPDX-License-Identifier: Apache-2.02"""Some common defines used in different modules of the testing framework."""34from pathlib import Path56# URL prefix used for the API calls through a UNIX domain socket7API_USOCKET_URL_PREFIX = 'http+unix://'89# Firecracker's binary name10FC_BINARY_NAME = 'firecracker'1112# Jailer's binary name13JAILER_BINARY_NAME = 'jailer'1415# The Firecracker sources workspace dir16FC_WORKSPACE_DIR = Path(__file__).parent.parent.parent.resolve()1718# Cargo target dir for the Firecracker workspace. Set via .cargo/config19FC_WORKSPACE_TARGET_DIR = FC_WORKSPACE_DIR / "build/cargo_target"2021# Cargo build directory for seccompiler22SECCOMPILER_TARGET_DIR = FC_WORKSPACE_DIR / "build/seccompiler"2324# Folder containing JSON seccomp filters25SECCOMP_JSON_DIR = FC_WORKSPACE_DIR / "resources/seccomp"2627# Maximum accepted duration of an API call, in milliseconds28MAX_API_CALL_DURATION_MS = 3002930# Relative path to the location of the kernel file31MICROVM_KERNEL_RELPATH = 'kernel/'3233# Relative path to the location of the filesystems34MICROVM_FSFILES_RELPATH = 'fsfiles/'3536# The s3 bucket that holds global Firecracker specifications37SPEC_S3_BUCKET = 'spec.ccfc.min'3839# The default s3 bucket that holds Firecracker microvm test images40DEFAULT_TEST_IMAGES_S3_BUCKET = 'spec.ccfc.min'4142# Global directory for any of the pytest tests temporary files43ENV_TEST_IMAGES_S3_BUCKET = 'TEST_MICROVM_IMAGES_S3_BUCKET'4445# Default test session root directory path46DEFAULT_TEST_SESSION_ROOT_PATH = "/srv"4748# Absolute path to the test results folder49TEST_RESULTS_DIR = FC_WORKSPACE_DIR / "test_results"5051# Name of the file that stores firecracker's PID when launched by jailer with52# `--new-pid-ns`.53FC_PID_FILE_NAME = "firecracker.pid"545556