mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76ea9b1ada | ||
|
|
aa1ec87f52 | ||
|
|
e44943a25e | ||
|
|
46444af9e4 | ||
|
|
b8104e47ca | ||
|
|
574b7c7dbe | ||
|
|
eb3f5b3b3d | ||
|
|
0c98bfa359 | ||
|
|
1e987a9966 | ||
|
|
f1a03de07f | ||
|
|
fdc2da7165 | ||
|
|
46afefaaa8 | ||
|
|
a07dfa9064 |
@@ -1 +1 @@
|
||||
8.17
|
||||
8.18
|
||||
|
||||
27
NEWS
27
NEWS
@@ -1,5 +1,32 @@
|
||||
GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
* Noteworthy changes in release 8.19 (2012-08-20) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
df now fails when the list of mounted file systems (/etc/mtab) cannot
|
||||
be read, yet the file system type information is needed to process
|
||||
certain options like -a, -l, -t and -x.
|
||||
[This bug was present in "the beginning".]
|
||||
|
||||
sort -u could fail to output one or more result lines.
|
||||
For example, this command would fail to print "1":
|
||||
(yes 7 | head -11; echo 1) | sort --p=1 -S32b -u
|
||||
[bug introduced in coreutils-8.6]
|
||||
|
||||
sort -u could read freed memory.
|
||||
For example, this evokes a read from freed memory:
|
||||
perl -le 'print "a\n"."0"x900'|valgrind sort --p=1 -S32b -u>/dev/null
|
||||
[bug introduced in coreutils-8.6]
|
||||
|
||||
** New features
|
||||
|
||||
rm now accepts the --dir (-d) option which makes it remove empty directories.
|
||||
Since removing empty directories is relatively safe, this option can be
|
||||
used as a part of the alias rm='rm --dir'. This improves compatibility
|
||||
with Mac OS X and BSD systems which also honor the -d option.
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.18 (2012-08-12) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
@@ -508,6 +508,7 @@ Primoz PETERLIN primozz.peterlin@gmail.com
|
||||
Rainer Orth ro@TechFak.Uni-Bielefeld.DE
|
||||
Ralf W. Stephan stephan@tmt.de
|
||||
Ralph Loader loader@maths.ox.ac.uk
|
||||
Rasmus Borup Hansen rbh@intomics.com
|
||||
Raul Miller moth@magenta.com
|
||||
Raúl Núñez de Arenas Coronado raul@pleyades.net
|
||||
Richard A Downing richard.downing@bcs.org.uk
|
||||
|
||||
2
cfg.mk
2
cfg.mk
@@ -45,7 +45,7 @@ export VERBOSE = yes
|
||||
# 4914152 9e
|
||||
export XZ_OPT = -8e
|
||||
|
||||
old_NEWS_hash = 38cad4d11c6ce866fc52213e3a4dc437
|
||||
old_NEWS_hash = b081ffe4128201150126951b1d8263e1
|
||||
|
||||
# Add an exemption for sc_makefile_at_at_check.
|
||||
_makefile_at_at_check_exceptions = ' && !/^cu_install_program =/'
|
||||
|
||||
@@ -8807,6 +8807,13 @@ The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -d
|
||||
@itemx --dir
|
||||
@opindex -d
|
||||
@opindex --dir
|
||||
@cindex directories, removing
|
||||
Remove the listed directories if they are empty.
|
||||
|
||||
@item -f
|
||||
@itemx --force
|
||||
@opindex -f
|
||||
@@ -10754,6 +10761,11 @@ inspect the exit status of a command like @samp{df -t ext3 -t reiserfs
|
||||
@var{dir}} to test whether @var{dir} is on a file system of type
|
||||
@samp{ext3} or @samp{reiserfs}.
|
||||
|
||||
Since the list of file systems (@var{mtab}) is needed to determine the
|
||||
file system type, failure includes the cases when that list cannot
|
||||
be read and one or more of the options @option{-a}, @option{-l}, @option{-t}
|
||||
or @option{-x} is used together with a file name argument.
|
||||
|
||||
|
||||
@node du invocation
|
||||
@section @command{du}: Estimate file space usage
|
||||
|
||||
2
gnulib
2
gnulib
Submodule gnulib updated: 39cedf6f42...bc33a8a0c7
17
src/df.c
17
src/df.c
@@ -1100,10 +1100,19 @@ main (int argc, char **argv)
|
||||
if (mount_list == NULL)
|
||||
{
|
||||
/* Couldn't read the table of mounted file systems.
|
||||
Fail if df was invoked with no file name arguments;
|
||||
Otherwise, merely give a warning and proceed. */
|
||||
int status = (optind < argc ? 0 : EXIT_FAILURE);
|
||||
const char *warning = (optind < argc ? _("Warning: ") : "");
|
||||
Fail if df was invoked with no file name arguments,
|
||||
or when either of -a, -l, -t or -x is used with file name
|
||||
arguments. Otherwise, merely give a warning and proceed. */
|
||||
int status = 0;
|
||||
if ( ! (optind < argc)
|
||||
|| (show_all_fs
|
||||
|| show_local_fs
|
||||
|| fs_select_list != NULL
|
||||
|| fs_exclude_list != NULL))
|
||||
{
|
||||
status = EXIT_FAILURE;
|
||||
}
|
||||
const char *warning = (status == 0 ? _("Warning: ") : "");
|
||||
error (status, errno, "%s%s", warning,
|
||||
_("cannot read table of mounted file systems"));
|
||||
}
|
||||
|
||||
1
src/mv.c
1
src/mv.c
@@ -73,6 +73,7 @@ static void
|
||||
rm_option_init (struct rm_options *x)
|
||||
{
|
||||
x->ignore_missing_files = false;
|
||||
x->remove_empty_directories = true;
|
||||
x->recursive = true;
|
||||
x->one_file_system = false;
|
||||
|
||||
|
||||
10
src/remove.c
10
src/remove.c
@@ -414,11 +414,15 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
|
||||
switch (ent->fts_info)
|
||||
{
|
||||
case FTS_D: /* preorder directory */
|
||||
if (! x->recursive)
|
||||
if (! x->recursive
|
||||
&& !(x->remove_empty_directories
|
||||
&& is_empty_dir (fts->fts_cwd_fd, ent->fts_accpath)))
|
||||
{
|
||||
/* This is the first (pre-order) encounter with a directory.
|
||||
/* This is the first (pre-order) encounter with a directory
|
||||
that we cannot delete.
|
||||
Not recursive, so arrange to skip contents. */
|
||||
error (0, EISDIR, _("cannot remove %s"), quote (ent->fts_path));
|
||||
int err = x->remove_empty_directories ? ENOTEMPTY : EISDIR;
|
||||
error (0, err, _("cannot remove %s"), quote (ent->fts_path));
|
||||
mark_ancestor_dirs (ent);
|
||||
fts_skip_tree (fts, ent);
|
||||
return RM_ERROR;
|
||||
|
||||
@@ -49,6 +49,9 @@ struct rm_options
|
||||
/* If true, recursively remove directories. */
|
||||
bool recursive;
|
||||
|
||||
/* If true, remove empty directories. */
|
||||
bool remove_empty_directories;
|
||||
|
||||
/* Pointer to the device and inode numbers of '/', when --recursive
|
||||
and preserving '/'. Otherwise NULL. */
|
||||
struct dev_ino *root_dev_ino;
|
||||
|
||||
9
src/rm.c
9
src/rm.c
@@ -77,6 +77,7 @@ static struct option const long_opts[] =
|
||||
{"-presume-input-tty", no_argument, NULL, PRESUME_INPUT_TTY_OPTION},
|
||||
|
||||
{"recursive", no_argument, NULL, 'r'},
|
||||
{"dir", no_argument, NULL, 'd'},
|
||||
{"verbose", no_argument, NULL, 'v'},
|
||||
{GETOPT_HELP_OPTION_DECL},
|
||||
{GETOPT_VERSION_OPTION_DECL},
|
||||
@@ -154,6 +155,7 @@ Remove (unlink) the FILE(s).\n\
|
||||
--no-preserve-root do not treat '/' specially\n\
|
||||
--preserve-root do not remove '/' (default)\n\
|
||||
-r, -R, --recursive remove directories and their contents recursively\n\
|
||||
-d, --dir remove empty directories\n\
|
||||
-v, --verbose explain what is being done\n\
|
||||
"), stdout);
|
||||
fputs (HELP_OPTION_DESCRIPTION, stdout);
|
||||
@@ -189,6 +191,7 @@ rm_option_init (struct rm_options *x)
|
||||
x->ignore_missing_files = false;
|
||||
x->interactive = RMI_SOMETIMES;
|
||||
x->one_file_system = false;
|
||||
x->remove_empty_directories = false;
|
||||
x->recursive = false;
|
||||
x->root_dev_ino = NULL;
|
||||
x->stdin_tty = isatty (STDIN_FILENO);
|
||||
@@ -220,10 +223,14 @@ main (int argc, char **argv)
|
||||
/* Try to disable the ability to unlink a directory. */
|
||||
priv_set_remove_linkdir ();
|
||||
|
||||
while ((c = getopt_long (argc, argv, "firvIR", long_opts, NULL)) != -1)
|
||||
while ((c = getopt_long (argc, argv, "dfirvIR", long_opts, NULL)) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'd':
|
||||
x.remove_empty_directories = true;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
x.interactive = RMI_NEVER;
|
||||
x.ignore_missing_files = true;
|
||||
|
||||
12
src/sort.c
12
src/sort.c
@@ -262,6 +262,9 @@ struct merge_node_queue
|
||||
when popping. */
|
||||
};
|
||||
|
||||
/* Used to implement --unique (-u). */
|
||||
static struct line saved_line;
|
||||
|
||||
/* FIXME: None of these tables work with multibyte character sets.
|
||||
Also, there are many other bugs when handling multibyte characters.
|
||||
One way to fix this is to rewrite 'sort' to use wide characters
|
||||
@@ -1813,7 +1816,7 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file)
|
||||
|
||||
{
|
||||
/* The current input line is too long to fit in the buffer.
|
||||
Double the buffer size and try again, keeping it properly
|
||||
Increase the buffer size and try again, keeping it properly
|
||||
aligned. */
|
||||
size_t line_alloc = buf->alloc / sizeof (struct line);
|
||||
buf->buf = x2nrealloc (buf->buf, &line_alloc, sizeof (struct line));
|
||||
@@ -3348,13 +3351,11 @@ queue_pop (struct merge_node_queue *queue)
|
||||
static void
|
||||
write_unique (struct line const *line, FILE *tfp, char const *temp_output)
|
||||
{
|
||||
static struct line saved;
|
||||
|
||||
if (unique)
|
||||
{
|
||||
if (saved.text && ! compare (line, &saved))
|
||||
if (saved_line.text && ! compare (line, &saved_line))
|
||||
return;
|
||||
saved = *line;
|
||||
saved_line = *line;
|
||||
}
|
||||
|
||||
write_line (line, tfp, temp_output);
|
||||
@@ -3892,6 +3893,7 @@ sort (char *const *files, size_t nfiles, char const *output_file,
|
||||
break;
|
||||
}
|
||||
|
||||
saved_line.text = NULL;
|
||||
line = buffer_linelim (&buf);
|
||||
if (buf.eof && !nfiles && !ntemps && !buf.left)
|
||||
{
|
||||
|
||||
@@ -130,14 +130,14 @@ sub _compare_files ($$$$$)
|
||||
{
|
||||
my ($program_name, $test_name, $in_or_out, $actual, $expected) = @_;
|
||||
|
||||
my $differ = compare ($expected, $actual);
|
||||
my $differ = compare ($actual, $expected);
|
||||
if ($differ)
|
||||
{
|
||||
my $info = (defined $in_or_out ? "std$in_or_out " : '');
|
||||
warn "$program_name: test $test_name: ${info}mismatch, comparing "
|
||||
. "$actual (actual) and $expected (expected)\n";
|
||||
. "$expected (expected) and $actual (actual)\n";
|
||||
# Ignore any failure, discard stderr.
|
||||
system "diff -c $actual $expected 2>/dev/null";
|
||||
system "diff -c $expected $actual 2>/dev/null";
|
||||
}
|
||||
|
||||
return $differ;
|
||||
|
||||
@@ -98,6 +98,8 @@ TESTS = \
|
||||
chgrp/basic \
|
||||
rm/dangling-symlink \
|
||||
misc/ls-time \
|
||||
rm/d-1 \
|
||||
rm/d-2 \
|
||||
rm/deep-1 \
|
||||
rm/deep-2 \
|
||||
rm/dir-no-w \
|
||||
@@ -258,6 +260,7 @@ TESTS = \
|
||||
misc/sort-unique-segv \
|
||||
misc/sort-version \
|
||||
misc/sort-NaN-infloop \
|
||||
misc/sort-u-FMR \
|
||||
split/filter \
|
||||
split/suffix-auto-length \
|
||||
split/suffix-length \
|
||||
@@ -376,6 +379,7 @@ TESTS = \
|
||||
df/df-P \
|
||||
df/unreadable \
|
||||
df/total-unprocessed \
|
||||
df/no-mtab-status \
|
||||
dd/direct \
|
||||
dd/misc \
|
||||
dd/nocache \
|
||||
|
||||
80
tests/df/no-mtab-status
Executable file
80
tests/df/no-mtab-status
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/bin/sh
|
||||
# Test df's behaviour when the mount list cannot be read.
|
||||
# This test is skipped on systems that lack LD_PRELOAD support; that's fine.
|
||||
|
||||
# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ df
|
||||
|
||||
df || skip_ "df fails"
|
||||
|
||||
# Simulate "mtab" failure.
|
||||
cat > k.c <<'EOF' || framework_failure_
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <mntent.h>
|
||||
|
||||
struct mntent *getmntent (FILE *fp)
|
||||
{
|
||||
/* Prove that LD_PRELOAD works. */
|
||||
static int done = 0;
|
||||
if (!done)
|
||||
{
|
||||
fclose (fopen ("x", "w"));
|
||||
++done;
|
||||
}
|
||||
/* Now simulate the failure. */
|
||||
errno = ENOENT;
|
||||
return NULL;
|
||||
}
|
||||
EOF
|
||||
|
||||
# Then compile/link it:
|
||||
$CC -shared -fPIC -ldl -O2 k.c -o k.so \
|
||||
|| skip_ "getmntent hack does not work on this platform"
|
||||
|
||||
# Test if LD_PRELOAD works:
|
||||
LD_PRELOAD=./k.so df
|
||||
test -f x || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
|
||||
|
||||
# These tests are supposed to succeed:
|
||||
LD_PRELOAD=./k.so df '.' || fail=1
|
||||
LD_PRELOAD=./k.so df -i '.' || fail=1
|
||||
LD_PRELOAD=./k.so df -T '.' || fail=1
|
||||
LD_PRELOAD=./k.so df -Ti '.' || fail=1
|
||||
LD_PRELOAD=./k.so df --total '.' || fail=1
|
||||
|
||||
# These tests are supposed to fail:
|
||||
LD_PRELOAD=./k.so df && fail=1
|
||||
LD_PRELOAD=./k.so df -i && fail=1
|
||||
LD_PRELOAD=./k.so df -T && fail=1
|
||||
LD_PRELOAD=./k.so df -Ti && fail=1
|
||||
LD_PRELOAD=./k.so df --total && fail=1
|
||||
|
||||
LD_PRELOAD=./k.so df -a && fail=1
|
||||
LD_PRELOAD=./k.so df -a '.' && fail=1
|
||||
|
||||
LD_PRELOAD=./k.so df -l && fail=1
|
||||
LD_PRELOAD=./k.so df -l '.' && fail=1
|
||||
|
||||
LD_PRELOAD=./k.so df -t hello && fail=1
|
||||
LD_PRELOAD=./k.so df -t hello '.' && fail=1
|
||||
|
||||
LD_PRELOAD=./k.so df -x hello && fail=1
|
||||
LD_PRELOAD=./k.so df -x hello '.' && fail=1
|
||||
|
||||
Exit $fail
|
||||
@@ -160,6 +160,12 @@ require_strace_()
|
||||
fi
|
||||
}
|
||||
|
||||
# Skip the current test if valgrind doesn't work.
|
||||
require_valgrind_()
|
||||
{
|
||||
valgrind --help >/dev/null || skip_ "requires valgrind"
|
||||
}
|
||||
|
||||
require_setfacl_()
|
||||
{
|
||||
setfacl -m user::rwx . \
|
||||
|
||||
@@ -227,6 +227,21 @@ my @Tests =
|
||||
["15d", '-i -u', {IN=>"\1a\na\n"}, {OUT=>"\1a\n"}],
|
||||
["15e", '-i -u', {IN=>"a\n\1\1\1\1\1a\1\1\1\1\n"}, {OUT=>"a\n"}],
|
||||
|
||||
# This would fail (printing only the 7) for 8.6..8.18.
|
||||
# Use --parallel=1 for reproducibility, and a small buffer size
|
||||
# to let us trigger the problem with a smaller input.
|
||||
["unique-1", '--p=1 -S32b -u', {IN=>"7\n"x11 . "1\n"}, {OUT=>"1\n7\n"}],
|
||||
# Demonstrate that 8.19's key-spec-adjusting code is required.
|
||||
# These are more finicky in that they are arch-dependent.
|
||||
["unique-key-i686", '-u -k2,2 --p=1 -S32b',
|
||||
{IN=>"a 7\n"x10 . "b 1\n"}, {OUT=>"b 1\na 7\n"}],
|
||||
["unique-key-x86_64", '-u -k2,2 --p=1 -S32b',
|
||||
{IN=>"a 7\n"x11 . "b 1\n"}, {OUT=>"b 1\na 7\n"}],
|
||||
# Before 8.19, this would trigger a free-memory read.
|
||||
["unique-free-mem-read", '-u --p=1 -S32b',
|
||||
{IN=>"a\n"."b"x900 ."\n"},
|
||||
{OUT=>"a\n"."b"x900 ."\n"}],
|
||||
|
||||
# From Erick Branderhorst -- fixed around 1.19e
|
||||
["16a", '-f',
|
||||
{IN=>"éminence\nüberhaupt\n's-Gravenhage\naëroclub\nAag\naagtappels\n"},
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
print_ver_ sort
|
||||
|
||||
very_expensive_
|
||||
require_valgrind_
|
||||
|
||||
valgrind --help >/dev/null || skip_ "requires valgrind"
|
||||
grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null ||
|
||||
skip_ 'requires pthreads'
|
||||
|
||||
|
||||
29
tests/misc/sort-u-FMR
Executable file
29
tests/misc/sort-u-FMR
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
# Before 8.19, this would trigger a free-memory read.
|
||||
|
||||
# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ sort
|
||||
require_valgrind_
|
||||
|
||||
{ echo 0; printf '%0900d\n' 1; } > in || framework_failure_
|
||||
|
||||
valgrind --error-exitcode=1 sort --p=1 -S32b -u in > out || fail=1
|
||||
|
||||
compare in out || fail=1
|
||||
|
||||
Exit $fail
|
||||
38
tests/rm/d-1
Executable file
38
tests/rm/d-1
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Test "rm --dir --verbose".
|
||||
|
||||
# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ rm
|
||||
|
||||
mkdir a || framework_failure_
|
||||
> b || framework_failure_
|
||||
|
||||
rm --verbose --dir a b > out || fail=1
|
||||
|
||||
cat <<\EOF > exp || framework_failure_
|
||||
removed directory: 'a'
|
||||
removed 'b'
|
||||
EOF
|
||||
|
||||
test -e a && fail=1
|
||||
test -e b && fail=1
|
||||
|
||||
# Compare expected and actual output.
|
||||
compare exp out || fail=1
|
||||
|
||||
Exit $fail
|
||||
33
tests/rm/d-2
Executable file
33
tests/rm/d-2
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
# Ensure that 'rm -d dir' (i.e., without --recursive) gives a reasonable
|
||||
# diagnostic when failing.
|
||||
|
||||
# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ rm
|
||||
|
||||
mkdir d || framework_failure_
|
||||
> d/a || framework_failure_
|
||||
|
||||
rm -d d 2> out && fail=1
|
||||
printf "%s\n" \
|
||||
"rm: cannot remove 'd': Directory not empty" \
|
||||
> exp || framework_failure_
|
||||
|
||||
compare exp out || fail=1
|
||||
|
||||
Exit $fail
|
||||
@@ -29,7 +29,7 @@ for total_n_lines in 5 3000 20000; do
|
||||
# and would provide little added benefit.
|
||||
case $i:$total_n_lines in 2:5);; *) continue;; esac
|
||||
|
||||
split -l$i --filter='xz > $FILE.xz' in out- || fail=1
|
||||
split -l$i --filter='xz -1 > $FILE.xz' in out- || fail=1
|
||||
xz -dc out-* > out || fail=1
|
||||
compare in out || fail=1
|
||||
rm -f out*
|
||||
|
||||
Reference in New Issue
Block a user