<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/dd/bytes, 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>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>
</feed>
