<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/dd, 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:20:56Z</updated>
<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>tests: skip part of dd/sparse on some file systems</title>
<updated>2012-03-23T11:47:52Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-03-23T09:53:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4b101ccd176eb3951bfbab717a0a3b5e2c4d19ef'/>
<id>urn:sha1:4b101ccd176eb3951bfbab717a0a3b5e2c4d19ef</id>
<content type='text'>
* tests/dd/sparse: The last two parts of this test would fail due to
the underlying file system at least on Solaris 10 with NFS.  That file
system would report that a 3MiB file was occupying &lt;= 1KiB of space
for nearly 50 seconds after creation.
Improved-by: Bernhard Voelker
</content>
</entry>
<entry>
<title>tests: avoid spurious dd/sparse failure</title>
<updated>2012-03-20T10:30:39Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-03-17T16:04:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d42f3a4d41034d099bf29ade22221b401528c060'/>
<id>urn:sha1:d42f3a4d41034d099bf29ade22221b401528c060</id>
<content type='text'>
* tests/dd/sparse: Allow for greater variation in sparse-block counts.
Reported by Nelson H. F. Beebe and Bruno Haible.
</content>
</entry>
<entry>
<title>tests: work around a block alignment issue in dd/sparse</title>
<updated>2012-03-02T10:57:56Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-03-02T10:53:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8195165839877eece7984dd08613323e96424cea'/>
<id>urn:sha1:8195165839877eece7984dd08613323e96424cea</id>
<content type='text'>
Prompted by the continuous integration build failure at:
http://hydra.nixos.org/build/2188210 (which uses XFS).

* tests/dd/sparse (alloc_equal): Add a block allocation
comparison function that accounts for variations due
to alignment.
</content>
</entry>
<entry>
<title>dd: add support for the conv=sparse option</title>
<updated>2012-02-29T00:17:56Z</updated>
<author>
<name>Roman Rybalko</name>
<email>devel@romanr.info</email>
</author>
<published>2012-02-27T13:53:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4e776faa8482ae630d2ea9bc767298e664f07ba9'/>
<id>urn:sha1:4e776faa8482ae630d2ea9bc767298e664f07ba9</id>
<content type='text'>
Notes:
  Small seeks are not coalesced to larger ones,
  like is done in cache_round() for example.

  conv= is used rather then oflag= for FreeBSD compatibility.

* src/dd.c (final_op_was_seek): A new global boolean to flag
whether the final "write" was converted to a seek.
(usage): Describe the new conf=sparse option.
(iwrite): Convert a write of a NUL block to a seek if requested.
(do_copy): Initialize the output buffer to have a sentinel,
to allow for efficient testing for NUL output blocks.
If the last block in the file was converted to a seek,
then convert back to a write so the size is updated.
* NEWS: Mention the new feature.
* tests/dd/sparse: A new test for the feature.
* tests/Makefile.am: Reference the new test.
</content>
</entry>
<entry>
<title>dd: fix issues in the count_bytes and seek_bytes flags change</title>
<updated>2012-02-13T21:58:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-02-13T21:47:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4bb5dbcfef55c4f66755dd3c48b906e4e9030b96'/>
<id>urn:sha1:4bb5dbcfef55c4f66755dd3c48b906e4e9030b96</id>
<content type='text'>
These edge cases were missed in the previous commit 140eca15c.

* src/dd.c (main): Include the bytes slop when truncating
without further I/O.  Don't invalidate the whole file cache
in the case where 0 &lt; count &lt; ibs.
* tests/dd/bytes: Change to using the independent truncate
command to generate the file for comparison.  Remove a redundant
test case and replace with one testing the truncation only logic.
</content>
</entry>
<entry>
<title>dd: add count_bytes, skip_bytes and seek_bytes flags</title>
<updated>2012-02-12T17:34:28Z</updated>
<author>
<name>Jérémy Compostella</name>
<email>jeremy.compostella@gmail.com</email>
</author>
<published>2012-02-04T14:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=140eca15c4a3d3213629a048cc307fde0d094738'/>
<id>urn:sha1:140eca15c4a3d3213629a048cc307fde0d094738</id>
<content type='text'>
dd now accepts the count_bytes and skip_bytes input flag and the
seek_bytes output flag, to more easily allow processing portions of a
file.

* src/dd.c (scanargs): Compute skip_records and skip_bytes when
'skip_bytes' iflag is used. Compute max_records and max_bytes when
'count_bytes' iflag is used. Compute seek_records and seek_bytes
when 'seek_bytes' oflag is used.
(skip_via_lseek): Use new 'bytes' parameter and handle potential
'records' equals to zero. Update the bytes parameter when called with
'fdesc' equal to STDOUT_FILENO. Update the header comments.
(dd_copy): Skip accordingly to skip_records AND skip_bytes. Count
accordingly to max_records AND max_bytes. Seek on output accordingly
to seek_records AND seek_bytes.
* NEWS (New features): Mention it.
* doc/coreutils.texi (dd invocation): Detail new flags and behaviors.
* tests/dd/bytes: New file. Tests for these new flags.
* tests/Makefile.am (TESTS): Add it.
</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>maint: quote 'like this' or "like this", not `like this'</title>
<updated>2012-01-22T23:26:38Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2012-01-22T23:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=80bc8651fd6b0a41be00ab4ee82e920287b15cbc'/>
<id>urn:sha1:80bc8651fd6b0a41be00ab4ee82e920287b15cbc</id>
<content type='text'>
* doc/coreutils.texi (Formatting the file names):
coreutils now quotes 'like this'.
* man/help2man:
* src/timeout.c (usage): Quote 'like this' in diagnostics.
* HACKING, Makefile.am, NEWS, README, README-hacking, TODO, cfg.mk:
* doc/Makefile.am, doc/coreutils.texi, m4/jm-macros.m4:
* man/Makefile.am, man/help2man, src/Makefile.am, src/copy.h:
* src/extract-magic, src/ls.c, src/pinky.c, src/pr.c, src/sort.c:
* src/split.c, src/timeout.c, src/who.c, tests/dd/skip-seek-past-file:
* tests/pr/pr-tests: Quote 'like this' in commentary.
* cfg.mk (old_NEWS_hash): Update due to changed old NEWS.
</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>
</feed>
