mirror of
https://github.com/uutils/coreutils.git
synced 2026-05-06 07:26:38 -04:00
coreutils: Fix 2>/dev/full aborts & drop a sed for GnuTests (#10740)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
// spell-checker:ignore prefixcat testcat
|
||||
|
||||
use std::ffi::{OsStr, OsString};
|
||||
use std::io::{Write, stderr};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process;
|
||||
|
||||
@@ -25,13 +26,18 @@ pub fn get_all_utilities<T: Args>(
|
||||
|
||||
/// Prints a "utility not found" error and exits
|
||||
pub fn not_found(util: &OsStr) -> ! {
|
||||
eprintln!("{}: function/utility not found", util.maybe_quote());
|
||||
let _ = writeln!(
|
||||
stderr(),
|
||||
"coreutils: unknown program '{}'",
|
||||
util.maybe_quote()
|
||||
);
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
/// Prints an "unrecognized option" error and exits
|
||||
pub fn unrecognized_option(binary_name: &str, option: &OsStr) -> ! {
|
||||
eprintln!(
|
||||
let _ = writeln!(
|
||||
stderr(),
|
||||
"{binary_name}: unrecognized option '{}'",
|
||||
option.to_string_lossy()
|
||||
);
|
||||
|
||||
@@ -184,8 +184,6 @@ sed -i 's/^print_ver_.*/require_selinux_/' tests/chcon/chcon-fail.sh
|
||||
|
||||
# We use coreutils yes
|
||||
sed -i "s|--coreutils-prog=||g" tests/misc/coreutils.sh
|
||||
# Different message
|
||||
sed -i "s|coreutils: unknown program 'blah'|blah: function/utility not found|" tests/misc/coreutils.sh
|
||||
|
||||
# Use the system coreutils where the test fails due to error in a util that is not the one being tested
|
||||
sed -i "s|grep '^#define HAVE_CAP 1' \$CONFIG_HEADER > /dev/null|true|" tests/ls/capability.sh
|
||||
|
||||
Reference in New Issue
Block a user