<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/rm, branch v8.18</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.18</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2012-04-04T10:22:24Z</updated>
<entry>
<title>tests: remove nearly all remaining backticks</title>
<updated>2012-04-04T10:22:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-04-03T19:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=33230a19ca27d99629a7c8000f56ecce22e956fa'/>
<id>urn:sha1:33230a19ca27d99629a7c8000f56ecce22e956fa</id>
<content type='text'>
* tests/rm/isatty: Remove now-unneeded "# `" line.
* tests/misc/ls-time: Likewise.
* tests/misc/date-sec: Remove stray "`" in comment.
* tests/du/long-sloop: Likewise.
* tests/mv/part-symlink: Replace multi-line `...` by $(...).
* tests/mv/sticky-to-xpart: Likewise.
* tests/rm/fail-2eperm: Likewise.
* tests/ls/nameless-uid: Likewise.
* tests/cp/perm: Likewise.
* tests/cp/preserve-gid: Likewise.
* tests/cp/same-file: Likewise.
</content>
</entry>
<entry>
<title>tests: convert nearly all `...` expressions to $(...)</title>
<updated>2012-04-04T10:20:56Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-04-03T18:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e43d30eab3215bc9ff49ec7db3d3e2baa95ba070'/>
<id>urn:sha1:e43d30eab3215bc9ff49ec7db3d3e2baa95ba070</id>
<content type='text'>
Exempt init.sh because it runs before we're assured to have a
shell that groks $(...).  Exempt *.mk because "$" would have to
be doubled, and besides, any `...` expression in a .mk file is
almost certainly evaluated before init.sh is run.  Finally, also
exempt the perl-based tests, because perl's `...` cannot be
converted to $(...).  Do that by running this command:

git grep -l '`.*`' tests \
  | grep -Ev 'init\.sh|\.mk$' | xargs grep -Lw perl \
  | xargs perl -pi -e 's/`(.*?)`/\$($1)/g'

One minor fix-up change was required after that, due to how
quoting differs:
diff --git a/tests/chmod/equals b/tests/chmod/equals
-    expected_perms=$(eval 'echo \$expected_'$dest)
+    expected_perms=$(eval 'echo $expected_'$dest)

Another was to make these required quoting adjustments:
diff --git a/tests/misc/stty b/tests/misc/stty
...
-  rev=$(eval echo "\\\$REV_$opt")
+  rev=$(eval echo "\$REV_$opt")
...
-      rev1=$(eval echo "\\\$REV_$opt1")
-      rev2=$(eval echo "\\\$REV_$opt2")
+      rev1=$(eval echo "\$REV_$opt1")
+      rev2=$(eval echo "\$REV_$opt2")

Also, transform two files that were needlessly excluded above:
(both use perl, but are mostly bourne shell)

  perl -pi -e 's/`(.*?)`/\$($1)/g' \
    tests/du/long-from-unreadable tests/init.cfg
</content>
</entry>
<entry>
<title>maint: use single copyright year range</title>
<updated>2012-01-27T10:35:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-27T10:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d7878454cd02518959b0d6036db3a5b6ff00ca57'/>
<id>urn:sha1:d7878454cd02518959b0d6036db3a5b6ff00ca57</id>
<content type='text'>
Run "make update-copyright".
</content>
</entry>
<entry>
<title>tests: remove crufty test=test_name code from old tests</title>
<updated>2012-01-23T13:42:10Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-23T13:42:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dec02bb98ec59fc1a5a0ed6ae1dda2bda69af111'/>
<id>urn:sha1:dec02bb98ec59fc1a5a0ed6ae1dda2bda69af111</id>
<content type='text'>
Before init.sh and similar, we would set test=test_name, and then
construct temporary file names using $test.  Now that each
init.sh-using test is in its own directory, that practice is unwelcome.
Remove bad examples.
* tests/rm/f-1: Per above.
* tests/rm/i-1: Likewise.
* tests/rm/interactive-always: Likewise.
* tests/rm/interactive-once: Likewise.
* tests/rm/ir-1: Likewise.
* tests/rm/r-1: Likewise.
</content>
</entry>
<entry>
<title>tests: more automated quote adjustment</title>
<updated>2012-01-09T20:50:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-07T19:55:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ae2b0d2ddca458eb282bb0458987e75e1875a659'/>
<id>urn:sha1:ae2b0d2ddca458eb282bb0458987e75e1875a659</id>
<content type='text'>
Relax initial regexp to match more instances, but add a
filter to avoid some invalid conversions.  Run this:

git grep -l "\`[^']*'" tests | xargs perl -pi -e '$q=q"'\''";' \
  -e '$q="$q\\$q$q"; /(= ?\`|\`expr|\`echo|\Q$q\E)/ and next;' \
  -e ' s/\`([^'\''"]*?'\'')/'\''$1/g'
The last disjunct in the above (...) filter is to exempt
any line that contains this string: '\''
With quoting like that, converting a ` to ' is likely to cause trouble,
so we'll handle those manually.  Here are three examples where
the exemption is required:

  *': `link-to-dir/'\'': hard link not allowed for directory'*) ;;
  printf 'creating file `%s'\''\n' $f
  'mv: inter-device move failed: `%s'\'' to `%s'\'';'\
</content>
</entry>
<entry>
<title>tests: change `...' to '...' on lines not matching /[=\$]/</title>
<updated>2012-01-09T20:50:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-07T16:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dd0e4c5621ca2fa9255aef4eee0e7cf41cd335d2'/>
<id>urn:sha1:dd0e4c5621ca2fa9255aef4eee0e7cf41cd335d2</id>
<content type='text'>
Exempt lines with '$' or '=', since those are prone to improper
conversion.  Run this:
  git grep -l "\`[^']*'" tests \
   |xargs perl -pi -e '/[=\$]/ and next;s/\`([^'\''"]*?'\'')/'\''$1/g'
</content>
</entry>
<entry>
<title>tests: adjust \`...' quoting to '...' to adapt to latest gnulib</title>
<updated>2012-01-09T20:50:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-07T16:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=50610144b02763f5dd5f6198ceceb88c27c393aa'/>
<id>urn:sha1:50610144b02763f5dd5f6198ceceb88c27c393aa</id>
<content type='text'>
Run this:
  git grep -l "\\\\\`[^']*'" tests \
    |xargs perl -pi -e 's/\\\`(.*?'\'')/'\''$1/g
</content>
</entry>
<entry>
<title>tests: also print chmod's --version</title>
<updated>2012-01-01T17:40:54Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-01T17:40:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=794e52b7bd84a860d5606b70265cefdde839b7c3'/>
<id>urn:sha1:794e52b7bd84a860d5606b70265cefdde839b7c3</id>
<content type='text'>
* tests/rm/many-dir-entries-vs-OOM: This test also exercises chmod.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2012-01-01T09:04:06Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-01T08:47:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5111aa42968262bd4d44eeca277b194020bb5007'/>
<id>urn:sha1:5111aa42968262bd4d44eeca277b194020bb5007</id>
<content type='text'>
Run "make update-copyright".
</content>
</entry>
<entry>
<title>tests: adjust PATH to generally include /sbin and /usr/sbin</title>
<updated>2011-12-01T08:07:13Z</updated>
<author>
<name>Bernhard Voelker</name>
<email>mail@bernhard-voelker.de</email>
</author>
<published>2011-12-01T00:04:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8df7652cfaf3286477c8c451e6a3b2ed977886bb'/>
<id>urn:sha1:8df7652cfaf3286477c8c451e6a3b2ed977886bb</id>
<content type='text'>
Commit 5eeaca94 added /sbin to the PATH for tests using mkfs. For other
tests, e.g. tests/cp-fiemap-perf using filefrag, we need /usr/sbin also.
Add both directories generally for the tests, "since many of us always
augment our PATH with all of the sbin paths all of the time anyway" (Bob
in http://lists.gnu.org/archive/html/coreutils/2011-11/msg00107.html).
The previous commit is hereby obsolete.
* tests/init.cfg (sanitize_path_): Add /sbin and /usr/sbin to PATH
unless already included. Needed for tests using admin tools like mkfs
and filefrag on systems where the user's environment does not have
these directories in the PATH.
* tests/init.cfg (require_mkfs_PATH_): Remove obsolete function.
* tests/cp/cp-a-selinux: Remove require_mkfs_PATH_ call.
* tests/cp/cp-mv-enotsup-xattr: Likewise.
* tests/cp/sparse-fiemap: Likewise.
* tests/mkdir/writable-under-readonly: Likewise.
* tests/rm/read-only: Likewise.
</content>
</entry>
</feed>
