File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22//
33// For the full copyright and license information, please view the LICENSE
44// file that was distributed with this source code.
5- // spell-checker:ignore (words) asdf algo algos asha mgmt xffname hexa GFYEQ HYQK Yqxb dont
5+ // spell-checker:ignore (words) asdf algo algos asha mgmt xffname hexa GFYEQ HYQK Yqxb dont checkfile
66
77use uutests:: at_and_ucmd;
88use uutests:: new_ucmd;
@@ -3060,3 +3060,17 @@ fn test_check_file_with_io_error() {
30603060 . stderr_contains ( "Input/output error" )
30613061 . stdout_contains ( "FAILED open or read" ) ;
30623062}
3063+
3064+ #[ test]
3065+ #[ cfg( all( target_os = "linux" , not( target_env = "musl" ) ) ) ]
3066+ fn test_check_checkfile_with_io_error ( ) {
3067+ // /proc/self/mem causes EIO when read without proper seeking
3068+ new_ucmd ! ( )
3069+ . arg ( "-a" )
3070+ . arg ( "md5" )
3071+ . arg ( "--check" )
3072+ . arg ( "/proc/self/mem" )
3073+ . fails ( )
3074+ . stderr_contains ( "/proc/self/mem: read error" )
3075+ . no_stdout ( ) ;
3076+ }
You can’t perform that action at this time.
0 commit comments