File tree 19 files changed +11
-44
lines changed
tests/integration_tests/build
19 files changed +11
-44
lines changed Original file line number Diff line number Diff line change 2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
4
#![ deny( missing_docs) ]
5
- #![ warn( clippy:: ptr_as_ptr) ]
6
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
7
5
8
6
//! Implements the interface for intercepting API requests, forwarding them to the VMM
9
7
//! and responding to the user.
Original file line number Diff line number Diff line change 2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
4
#![ deny( missing_docs) ]
5
- #![ warn( clippy:: ptr_as_ptr) ]
6
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
7
5
8
6
//! Implements platform specific functionality.
9
7
//! Supported platforms: x86_64 and aarch64.
Original file line number Diff line number Diff line change 6
6
// found in the THIRD-PARTY file.
7
7
8
8
#![ deny( missing_docs) ]
9
- #![ warn( clippy:: ptr_as_ptr) ]
10
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
11
9
12
10
//! Utility for configuring the CPUID (CPU identification) for the guest microVM.
13
11
Original file line number Diff line number Diff line change 5
5
// Use of this source code is governed by a BSD-style license that can be
6
6
// found in the THIRD-PARTY file.
7
7
8
- #![ warn( clippy:: ptr_as_ptr) ]
9
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
10
-
11
8
//! Emulates virtual and hardware devices.
12
9
use std:: io;
13
10
Original file line number Diff line number Diff line change 2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
4
#![ deny( missing_docs) ]
5
- #![ warn( clippy:: ptr_as_ptr) ]
6
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
7
5
8
6
//! Provides helper logic for parsing and writing protocol data units, and minimalist
9
7
//! implementations of a TCP listener, a TCP connection, and an HTTP/1.1 server.
Original file line number Diff line number Diff line change 1
1
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
- #![ warn( clippy:: ptr_as_ptr) ]
5
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
6
-
7
4
mod api_server_adapter;
8
5
mod metrics;
9
6
Original file line number Diff line number Diff line change 2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
4
#![ deny( missing_docs) ]
5
- #![ warn( clippy:: ptr_as_ptr) ]
6
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
7
5
8
6
//! High-level interface over Linux io_uring.
9
7
//!
Original file line number Diff line number Diff line change 1
1
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
- #![ warn( clippy:: ptr_as_ptr) ]
5
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
6
-
7
4
mod cgroup;
8
5
mod chroot;
9
6
mod env;
Original file line number Diff line number Diff line change 2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
4
#![ deny( missing_docs) ]
5
- #![ warn( clippy:: ptr_as_ptr) ]
6
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
7
5
8
6
//! Crate that implements Firecracker specific functionality as far as logging and metrics
9
7
//! collecting.
Original file line number Diff line number Diff line change 1
1
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
- #![ warn( clippy:: ptr_as_ptr) ]
5
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
6
-
7
4
pub mod data_store;
8
5
pub mod ns;
9
6
pub mod persist;
Original file line number Diff line number Diff line change 2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
4
#![ deny( missing_docs) ]
5
- #![ warn( clippy:: ptr_as_ptr) ]
6
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
7
5
8
6
//! # Rate Limiter
9
7
//!
Original file line number Diff line number Diff line change 1
1
// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
- #![ warn( clippy:: ptr_as_ptr) ]
5
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
6
-
7
4
use std:: fs:: { File , OpenOptions } ;
8
5
use std:: io:: { Seek , SeekFrom } ;
9
6
use std:: os:: unix:: io:: AsRawFd ;
Original file line number Diff line number Diff line change 1
1
// Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
+
3
4
#![ deny( missing_docs) ]
4
- #![ warn( clippy:: ptr_as_ptr) ]
5
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
6
5
7
6
//! The library crate that defines common helper functions that are generally used in
8
7
//! conjunction with seccompiler-bin.
Original file line number Diff line number Diff line change 1
1
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
#![ deny( missing_docs) ]
4
- #![ warn( clippy:: ptr_as_ptr) ]
5
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
6
4
7
5
//! Provides version tolerant serialization and deserialization facilities and
8
6
//! implements a persistent storage format for Firecracker state snapshots.
Original file line number Diff line number Diff line change 1
1
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
4
- #![ warn( clippy:: ptr_as_ptr) ]
5
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
6
-
7
4
// We use `utils` as a wrapper over `vmm_sys_util` to control the latter
8
5
// dependency easier (i.e. update only in one place `vmm_sys_util` version).
9
6
// More specifically, we are re-exporting modules from `vmm_sys_util` as part
Original file line number Diff line number Diff line change 4
4
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
5
5
// Use of this source code is governed by a BSD-style license that can be
6
6
// found in the THIRD-PARTY file.
7
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
8
7
9
8
use std:: io:: Error as IoError ;
10
9
use std:: os:: unix:: io:: AsRawFd ;
@@ -103,7 +102,7 @@ fn build_guarded_region(
103
102
// SAFETY: Safe because the parameters are valid.
104
103
unsafe {
105
104
MmapRegionBuilder :: new_with_bitmap ( size, bitmap)
106
- . with_raw_mmap_pointer ( region_addr as * mut u8 )
105
+ . with_raw_mmap_pointer ( region_addr. cast :: < u8 > ( ) )
107
106
. with_mmap_prot ( prot)
108
107
. with_mmap_flags ( flags)
109
108
. build ( )
Original file line number Diff line number Diff line change 5
5
// Use of this source code is governed by a BSD-style license that can be
6
6
// found in the THIRD-PARTY file.
7
7
8
+ #![ deny( missing_docs) ]
9
+
8
10
//! Virtual Machine Monitor that leverages the Linux Kernel-based Virtual Machine (KVM),
9
11
//! and other virtualization features to run a single lightweight micro-virtual
10
12
//! machine (microVM).
11
- #![ deny( missing_docs) ]
12
- #![ warn( clippy:: undocumented_unsafe_blocks) ]
13
13
14
14
/// Handles setup and initialization a `Vmm` object.
15
15
pub mod builder;
Original file line number Diff line number Diff line change @@ -668,7 +668,7 @@ fn guest_memory_from_uffd(
668
668
let host_base_addr = mem_region. as_ptr ( ) ;
669
669
let size = mem_region. size ( ) ;
670
670
671
- uffd. register ( host_base_addr as _ , size as _ )
671
+ uffd. register ( host_base_addr. cast ( ) , size as _ )
672
672
. map_err ( GuestMemoryFromUffdError :: Register ) ?;
673
673
backend_mappings. push ( GuestRegionUffdMapping {
674
674
base_host_virt_addr : host_base_addr as u64 ,
Original file line number Diff line number Diff line change 13
13
"{}-unknown-linux-gnu" .format (MACHINE ),
14
14
"{}-unknown-linux-musl" .format (MACHINE ),
15
15
]
16
+ CLIPPY_CFG = ["ptr_as_ptr" , "undocumented_unsafe_blocks" ]
16
17
17
18
18
19
@pytest .mark .parametrize ("target" , TARGETS )
@@ -22,6 +23,8 @@ def test_rust_clippy(target):
22
23
23
24
@type: build
24
25
"""
25
- utils .run_cmd (
26
- "cargo clippy --target {} --all --profile test" " -- -D warnings" .format (target )
27
- )
26
+ cmd = "cargo clippy --target {} --all --profile test" " --" .format (target )
27
+ for clippy_rule in CLIPPY_CFG :
28
+ cmd += " -D clippy::{}" .format (clippy_rule )
29
+ cmd += " -D warnings"
30
+ utils .run_cmd (cmd )
You can’t perform that action at this time.
0 commit comments