Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 29fc00d

Browse files
authoredMar 23, 2025
Rollup merge of rust-lang#138631 - thaliaarchi:sgx-read-buf-test, r=workingjubilee
Update test for SGX now implementing `read_buf` In rust-lang#108326, `read_buf` was implemented for a variety of types, but SGX was saved for later. Update a test from then, now that rust-lang#137355 implemented it for SGX types. cc ``@jethrogb``
2 parents 3bbe70d + bcac931 commit 29fc00d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

‎library/std/src/net/tcp/tests.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,8 @@ fn read_buf() {
315315
let mut buf = BorrowedBuf::from(buf.as_mut_slice());
316316
t!(s.read_buf(buf.unfilled()));
317317
assert_eq!(buf.filled(), &[1, 2, 3, 4]);
318-
319-
// FIXME: sgx uses default_read_buf that initializes the buffer.
320-
if cfg!(not(target_env = "sgx")) {
321-
// TcpStream::read_buf should omit buffer initialization.
322-
assert_eq!(buf.init_len(), 4);
323-
}
318+
// TcpStream::read_buf should omit buffer initialization.
319+
assert_eq!(buf.init_len(), 4);
324320

325321
t.join().ok().expect("thread panicked");
326322
})

0 commit comments

Comments
 (0)
Failed to load comments.