-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Run doc tests with miri in ci #7060
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ cfg_net_unix! { | |
/// # Examples | ||
/// Using named sockets, associated with a filesystem path: | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -67,6 +68,7 @@ cfg_net_unix! { | |
/// | ||
/// Using unnamed sockets, created as a pair | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socketpair` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -371,6 +373,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -403,6 +406,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No SOCK_DGRAM for socketpair in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -457,6 +461,7 @@ impl UnixDatagram { | |
/// explicitly with [`Runtime::enter`](crate::runtime::Runtime::enter) function. | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -521,6 +526,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -560,6 +566,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -604,6 +611,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socketpair` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -734,6 +742,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socketpair` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -884,6 +893,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1000,6 +1010,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socketpair` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1050,6 +1061,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1100,6 +1112,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1416,6 +1429,7 @@ impl UnixDatagram { | |
/// # Examples | ||
/// For a socket bound to a local path | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1438,6 +1452,7 @@ impl UnixDatagram { | |
/// | ||
/// For an unbound socket | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1462,6 +1477,7 @@ impl UnixDatagram { | |
/// # Examples | ||
/// For a peer with a local path | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1487,6 +1503,7 @@ impl UnixDatagram { | |
/// | ||
/// For an unbound peer | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socketpair` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1508,6 +1525,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socket` in miri. | ||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
@@ -1535,6 +1553,7 @@ impl UnixDatagram { | |
/// | ||
/// # Examples | ||
/// ``` | ||
/// # if cfg!(miri) { return } // No `socketpair` in miri. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, but we do have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops should be only the fixed in #7063 |
||
/// # use std::error::Error; | ||
/// # #[tokio::main] | ||
/// # async fn main() -> Result<(), Box<dyn Error>> { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -421,6 +421,7 @@ impl Runtime { | |
/// # Examples | ||
/// | ||
/// ``` | ||
/// # if cfg!(miri) { return } // Miri reports error when main thread terminated without waiting all remaining threads. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specifically we report a leak; this can be ignored -- but maybe you want to detect memory leaks in the other tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We definitely want the leak detection for lots of other tests. |
||
/// use tokio::runtime::Runtime; | ||
/// use tokio::task; | ||
/// | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The miri job is starting to take a rather long time. Could you add a new job for this, instead of adding additional work to the existing job? This will allow for parallelism.