async fn assert_read_at_does_not_affect_seek_end_origin(root_dir: &DirectoryProxy, path: &str) {
    let file = open_file(&root_dir, path, OPEN_RIGHT_READABLE).await.unwrap();

    let (_, bytes) = file.read_at(MAX_BUF, 0).await.unwrap();
    assert_eq!(std::str::from_utf8(&bytes).unwrap(), path);

    let mut rng = rand::thread_rng();
    let seek_offset = rng.gen_range(0, path.len()) as i64 * -1;

    let (status, position) = file.seek(seek_offset, SeekOrigin::End).await.unwrap();
    assert_eq!(zx::Status::ok(status), Ok(()));
    assert_eq!(position, (path.len() as i64 + seek_offset) as u64);

    let (status, bytes) = file.read_at(MAX_BUF, 0).await.unwrap();
    assert_eq!(zx::Status::ok(status), Ok(()));

    assert_eq!(std::str::from_utf8(&bytes).unwrap(), path);
}
// The difference between this test and `assert_read_at_does_not_affect_seek`  is that the SeekOrigin
// is set to SeekOrigin::End and the offset is a negative value.
The difference between this test and `assert_read_at_does_not_affect_seek`  is that the SeekOrigin
is set to SeekOrigin::End and the offset is a negative value.
The difference between this test and ` assert_read_at_does_not_affect_seek ` is that the SeekOrigin is set to SeekOrigin :: End and the offset is a negative value .
async fn assert_read_at_does_not_affect_seek_end_origin(root_dir: &DirectoryProxy, path: &str) {
    let file = open_file(&root_dir, path, OPEN_RIGHT_READABLE).await.unwrap();
    let (_, bytes) = file.read_at(MAX_BUF, 0).await.unwrap();
    assert_eq!(std::str::from_utf8(&bytes).unwrap(), path);
    let mut rng = rand::thread_rng();
    let seek_offset = rng.gen_range(0, path.len()) as i64 * -1;
    let (status, position) = file.seek(seek_offset, SeekOrigin::End).await.unwrap();
    assert_eq!(zx::Status::ok(status), Ok(()));
    assert_eq!(position, (path.len() as i64 + seek_offset) as u64);
    let (status, bytes) = file.read_at(MAX_BUF, 0).await.unwrap();
    assert_eq!(zx::Status::ok(status), Ok(()));
    assert_eq!(std::str::from_utf8(&bytes).unwrap(), path);
}
async fn assert_read_at_does_not_affect_seek_end_origin ( root_dir : & DirectoryProxy , path : & str ) { let file = open_file ( & root_dir , path , OPEN_RIGHT_READABLE ) . await . unwrap ( ) ; let ( _ , bytes ) = file . read_at ( MAX_BUF , 0 ) . await . unwrap ( ) ; assert_eq ! ( std str from_utf8 ( bytes ) unwrap ( ) path ) ; let mut rng = rand :: thread_rng ( ) ; let seek_offset = rng . gen_range ( 0 , path . len ( ) ) as i64 * - 1 ; let ( status , position ) = file . seek ( seek_offset , SeekOrigin :: End ) . await . unwrap ( ) ; assert_eq ! ( zx Status ok ( status ) Ok ( ( ) ) ) ; assert_eq ! ( position ( path len ( ) as i64 seek_offset ) as u64 ) ; let ( status , bytes ) = file . read_at ( MAX_BUF , 0 ) . await . unwrap ( ) ; assert_eq ! ( zx Status ok ( status ) Ok ( ( ) ) ) ; assert_eq ! ( std str from_utf8 ( bytes ) unwrap ( ) path ) ; }
The difference between this test and `assert_read_at_does_not_affect_seek`  is that the SeekOrigin
is set to SeekOrigin::End and the offset is a negative value.
The difference between this test and ` assert_read_at_does_not_affect_seek ` is that the SeekOrigin is set to SeekOrigin :: End and the offset is a negative value .
root_dir
&DirectoryProxy
path
&str
root_dir
&DirectoryProxy
path
&str