From 6a2751d59d89dc9a60553196f720bdeedd75d80a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 24 Aug 2011 10:40:51 +0200 Subject: maint: rename a test Lesson: do not include details like "4 million" in a file name. * tests/rm/many-dir-entries-vs-OOM: Renamed from ... * tests/rm/4-million-entry-dir: ...this. * tests/Makefile.am (TESTS): Reflect renaming. --- tests/Makefile.am | 2 +- tests/rm/4-million-entry-dir | 38 -------------------------------------- tests/rm/many-dir-entries-vs-OOM | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 39 deletions(-) delete mode 100755 tests/rm/4-million-entry-dir create mode 100755 tests/rm/many-dir-entries-vs-OOM diff --git a/tests/Makefile.am b/tests/Makefile.am index f0200e122..c37cca61a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -135,7 +135,7 @@ TESTS = \ rm/unread3 \ rm/unreadable \ rm/v-slash \ - rm/4-million-entry-dir \ + rm/many-dir-entries-vs-OOM \ chgrp/default-no-deref \ chgrp/deref \ chgrp/no-x \ diff --git a/tests/rm/4-million-entry-dir b/tests/rm/4-million-entry-dir deleted file mode 100755 index 44855cf26..000000000 --- a/tests/rm/4-million-entry-dir +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# In coreutils-8.12, rm,du,chmod, etc. would use too much memory -# when processing a directory with many entries (as in > 100,000). - -# Copyright (C) 2011 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 . - -. "${srcdir=.}/init.sh"; path_prepend_ ../src -print_ver_ rm du - -expensive_ - -# With many files in a single directory... -mkdir d && cd d || framework_failure_ -seq 200000|xargs touch || framework_failure_ - -cd .. - -# Restricted to 40MB, rm from coreutils-8.12 each of these would fail -# with a diagnostic like "rm: fts_read failed: Cannot allocate memory". -ulimit -v 40000 -du -sh d || fail=1 -chmod -R 700 d || fail=1 -rm -rf d || fail=1 - -Exit $fail diff --git a/tests/rm/many-dir-entries-vs-OOM b/tests/rm/many-dir-entries-vs-OOM new file mode 100755 index 000000000..44855cf26 --- /dev/null +++ b/tests/rm/many-dir-entries-vs-OOM @@ -0,0 +1,38 @@ +#!/bin/sh +# In coreutils-8.12, rm,du,chmod, etc. would use too much memory +# when processing a directory with many entries (as in > 100,000). + +# Copyright (C) 2011 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 . + +. "${srcdir=.}/init.sh"; path_prepend_ ../src +print_ver_ rm du + +expensive_ + +# With many files in a single directory... +mkdir d && cd d || framework_failure_ +seq 200000|xargs touch || framework_failure_ + +cd .. + +# Restricted to 40MB, rm from coreutils-8.12 each of these would fail +# with a diagnostic like "rm: fts_read failed: Cannot allocate memory". +ulimit -v 40000 +du -sh d || fail=1 +chmod -R 700 d || fail=1 +rm -rf d || fail=1 + +Exit $fail -- cgit v1.2.3-54-g00ecf