* tests/cp/preserve-gid.sh: If configured with --enable-single-binary
copy the coreutils single binary, instead of the cp one-line launcher.
Discussed at https://bugzilla.redhat.com/
1800597
Fixes https://bugs.gnu.org/39485
# is not readable by our nameless IDs.
test -d /tmp && TMPDIR=/tmp
tmp_path=$(mktemp -d) || fail_ "failed to create temporary directory"
-cp "$abs_path_dir_/cp" "$tmp_path"
+if test -x "$abs_path_dir_/coreutils" &&
+ { test -l "$abs_path_dir_/cp" ||
+ test $(wc -l < "$abs_path_dir_/cp") = 1; } then
+ # if configured with --enable-single-binary we need to use the single binary
+ cp "$abs_path_dir_/coreutils" "$tmp_path/cp" || framework_failure_
+else
+ cp "$abs_path_dir_/cp" "$tmp_path"
+fi
chmod -R a+rx "$tmp_path"
t1() {