File tree Expand file tree Collapse file tree 5 files changed +16
-16
lines changed
src/ci/docker/host-x86_64/pr-check-2 Expand file tree Collapse file tree 5 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,11 @@ jobs:
146
146
- name : ensure the channel matches the target branch
147
147
run : src/ci/scripts/verify-channel.sh
148
148
149
+ - name : print kernel/libc versions
150
+ if : runner.os == 'Linux'
151
+ run : |
152
+ uname -a
153
+
149
154
- name : collect CPU statistics
150
155
run : src/ci/scripts/collect-cpu-stats.sh
151
156
Original file line number Diff line number Diff line change @@ -500,8 +500,10 @@ fn file_test_append_write_at() {
500
500
let msg = b"it's not working!" ;
501
501
check ! ( fs:: write( & filename, & msg) ) ;
502
502
// write_at should work even in in append mode
503
- let f = check ! ( fs:: File :: options( ) . append( true ) . open( & filename) ) ;
503
+ let mut f = check ! ( fs:: File :: options( ) . append( true ) . open( & filename) ) ;
504
+ assert_eq ! ( check!( f. stream_position( ) ) , 0 ) ;
504
505
assert_eq ! ( check!( f. write_at( b" " , 5 ) ) , 3 ) ;
506
+ assert_eq ! ( check!( f. stream_position( ) ) , 0 ) ;
505
507
506
508
let content = check ! ( fs:: read( & filename) ) ;
507
509
assert_eq ! ( & content, b"it's working!" ) ;
Original file line number Diff line number Diff line change 1
1
use super :: * ;
2
+ use crate :: io:: Seek ;
2
3
3
4
#[ test]
4
5
fn read_vectored_at ( ) {
@@ -40,21 +41,23 @@ fn write_vectored_at() {
40
41
}
41
42
let expected = {
42
43
// Open in append mode to test that positioned writes bypass O_APPEND.
43
- let file = fs:: File :: options ( ) . append ( true ) . open ( & filename) . unwrap ( ) ;
44
+ let mut file = fs:: File :: options ( ) . append ( true ) . open ( & filename) . unwrap ( ) ;
44
45
let buf0 = b" " ;
45
46
let buf1 = b"great " ;
46
47
47
48
let iovec = [ io:: IoSlice :: new ( buf0) , io:: IoSlice :: new ( buf1) ] ;
48
49
50
+ assert_eq ! ( file. stream_position( ) . unwrap( ) , 0 ) ;
49
51
let n = file. write_vectored_at ( & iovec, 11 ) . unwrap ( ) ;
52
+ assert_eq ! ( file. stream_position( ) . unwrap( ) , 0 ) ;
50
53
51
54
assert ! ( n == 4 || n == 11 ) ;
52
55
53
56
if n == 4 { b"pwritev is working!" } else { b"pwritev is great !" }
54
57
} ;
55
58
56
59
let content = fs:: read ( & filename) . unwrap ( ) ;
57
- assert_eq ! ( & content, expected) ;
60
+ assert_eq ! ( ByteStr :: new ( & content) , ByteStr :: new ( expected) ) ;
58
61
}
59
62
60
63
#[ test]
Original file line number Diff line number Diff line change @@ -680,6 +680,7 @@ impl FileDesc {
680
680
if let Some ( err) = e. raw_os_error ( )
681
681
&& ( err == libc:: EOPNOTSUPP || err == libc:: ENOSYS ) =>
682
682
{
683
+ eprintln ! ( "pwritev2 NOAPPEND error: {err}" ) ;
683
684
NOAPPEND_SUPPORTED . store ( false , core:: sync:: atomic:: Ordering :: Relaxed ) ;
684
685
return None ;
685
686
}
Original file line number Diff line number Diff line change @@ -27,16 +27,5 @@ COPY scripts/sccache.sh /scripts/
27
27
RUN sh /scripts/sccache.sh
28
28
29
29
ENV SCRIPT \
30
- python3 ../x.py check && \
31
- python3 ../x.py clippy ci && \
32
- python3 ../x.py test --stage 1 core alloc std test proc_macro && \
33
- python3 ../x.py doc --stage 0 bootstrap && \
34
- # Build both public and internal documentation.
35
- RUSTDOCFLAGS=\" --document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 compiler && \
36
- RUSTDOCFLAGS=\" --document-private-items --document-hidden-items\" python3 ../x.py doc --stage 1 library && \
37
- mkdir -p /checkout/obj/staging/doc && \
38
- cp -r build/x86_64-unknown-linux-gnu/doc /checkout/obj/staging && \
39
- RUSTDOCFLAGS=\" --document-private-items --document-hidden-items\" python3 ../x.py doc --stage 1 library/test && \
40
- # The BOOTSTRAP_TRACING flag is added to verify whether the
41
- # bootstrap process compiles successfully with this flag enabled.
42
- BOOTSTRAP_TRACING=1 python3 ../x.py --help
30
+ ldd --version && \
31
+ python3 ../x.py test --stage 1 std -- "write"
You can’t perform that action at this time.
0 commit comments