Bug 219757 - bin/dd/dd2_tests:seek_overflow is broken
Summary: bin/dd/dd2_tests:seek_overflow is broken
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Alan Somers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-03 17:54 UTC by Enji Cooper
Modified: 2017-07-18 17:37 UTC (History)
0 users

See Also:
ngie: mfc-stable11+
ngie: mfc-stable10+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2017-06-03 17:54:19 UTC
$ kyua debug -k /usr/tests/bin/dd/Kyuafile dd2_test:seek_overflow
Executing command [ dd if=f.in of=f.out bs=4096 seek=2251799813685247 ]
Fail: incorrect exit status: 1, expected: 0
stdout:

stderr:
dd: truncating f.out: File too large

Files left in work directory after failure: f.in, f.out
dd2_test:seek_overflow  ->  failed: atf-check failed; see the output of the test for details
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-06-03 18:00:15 UTC
A commit references this bug:

Author: ngie
Date: Sat Jun  3 17:59:10 UTC 2017
New revision: 319544
URL: https://svnweb.freebsd.org/changeset/base/319544

Log:
  Mark :seek_overflow as an expected failure

  MFC after:	18 days
  MFC with:	r319339
  PR:		219757
  Sponsored by:	Dell EMC Isilon

Changes:
  head/bin/dd/tests/dd2_test.sh
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2017-06-03 18:00:22 UTC
I just tried this on UFS... that's the issue (it passes on ZFS).
Comment 3 Enji Cooper freebsd_committer freebsd_triage 2017-06-03 18:02:25 UTC
(In reply to Ngie Cooper from comment #2)

Err... maybe it isn't UFS per se, but a side effect of how UFS handles the issue.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-06-03 18:29:48 UTC
A commit references this bug:

Author: asomers
Date: Sat Jun  3 18:29:18 UTC 2017
New revision: 319551
URL: https://svnweb.freebsd.org/changeset/base/319551

Log:
  Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS

  Split the postive and negative parts into separate test cases.  The positive
  test case can only run on ZFS, because only ZFS supports files that large.

  PR:		219757
  Reported by:	ngie
  MFC after:	18 days
  X-MFC-with:	319339

Changes:
  head/bin/dd/tests/dd2_test.sh
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-07-18 17:36:30 UTC
A commit references this bug:

Author: ngie
Date: Tue Jul 18 17:35:29 UTC 2017
New revision: 321139
URL: https://svnweb.freebsd.org/changeset/base/321139

Log:
  MFC r302500,r319339,r319543,r319544,r319551,r321138:

  r302500 (by cem):

  dd(1): Enable access to SIZE_T_MAX character devices

  On machines where SIZE_T_MAX exceeds OFF_MAX (signed 64-bit), permit seeking
  character devices to negative off_t values.  This enables dd(1) to interact
  with kernel KVA in /dev/kmem on amd64, for example.

  r319339 (by asomers):

  Fix integer overflow detection in dd

  dd(1) tried to detect whether the seek offset would overflow, but it failed
  to account for the case where the provided argument was negative and the
  file was a regular file (negative seeks are allowed for character devices).
  I fixed it, and added a regression test.

  CID:		1368659

  r319543:

  Stylistic tweaks

  Move opening braces of functions from the last column to column 0.

  MFC with:	r319339

  r319544:

  Mark :seek_overflow as an expected failure

  MFC with:	r319339
  PR:		219757

  r319551 (by asomers):

  Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS

  Split the postive and negative parts into separate test cases.  The positive
  test case can only run on ZFS, because only ZFS supports files that large.

  PR:		219757

  r321138:

  Remove unnecessary make logic added in r319339

  This makes the change cleaner and easier to backport to ^/stable/10.

Changes:
_U  stable/11/
  stable/11/bin/dd/args.c
  stable/11/bin/dd/position.c
  stable/11/bin/dd/tests/Makefile
  stable/11/bin/dd/tests/dd2_test.sh
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-07-18 17:36:32 UTC
A commit references this bug:

Author: ngie
Date: Tue Jul 18 17:35:29 UTC 2017
New revision: 321139
URL: https://svnweb.freebsd.org/changeset/base/321139

Log:
  MFC r302500,r319339,r319543,r319544,r319551,r321138:

  r302500 (by cem):

  dd(1): Enable access to SIZE_T_MAX character devices

  On machines where SIZE_T_MAX exceeds OFF_MAX (signed 64-bit), permit seeking
  character devices to negative off_t values.  This enables dd(1) to interact
  with kernel KVA in /dev/kmem on amd64, for example.

  r319339 (by asomers):

  Fix integer overflow detection in dd

  dd(1) tried to detect whether the seek offset would overflow, but it failed
  to account for the case where the provided argument was negative and the
  file was a regular file (negative seeks are allowed for character devices).
  I fixed it, and added a regression test.

  CID:		1368659

  r319543:

  Stylistic tweaks

  Move opening braces of functions from the last column to column 0.

  MFC with:	r319339

  r319544:

  Mark :seek_overflow as an expected failure

  MFC with:	r319339
  PR:		219757

  r319551 (by asomers):

  Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS

  Split the postive and negative parts into separate test cases.  The positive
  test case can only run on ZFS, because only ZFS supports files that large.

  PR:		219757

  r321138:

  Remove unnecessary make logic added in r319339

  This makes the change cleaner and easier to backport to ^/stable/10.

Changes:
_U  stable/11/
  stable/11/bin/dd/args.c
  stable/11/bin/dd/position.c
  stable/11/bin/dd/tests/Makefile
  stable/11/bin/dd/tests/dd2_test.sh
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-07-18 17:37:35 UTC
A commit references this bug:

Author: ngie
Date: Tue Jul 18 17:36:25 UTC 2017
New revision: 321140
URL: https://svnweb.freebsd.org/changeset/base/321140

Log:
  MFC r302500,r319339,r319543,r319544,r319551,r321138:

  r302500 (by cem):

  dd(1): Enable access to SIZE_T_MAX character devices

  On machines where SIZE_T_MAX exceeds OFF_MAX (signed 64-bit), permit seeking
  character devices to negative off_t values.  This enables dd(1) to interact
  with kernel KVA in /dev/kmem on amd64, for example.

  r319339 (by asomers):

  Fix integer overflow detection in dd

  dd(1) tried to detect whether the seek offset would overflow, but it failed
  to account for the case where the provided argument was negative and the
  file was a regular file (negative seeks are allowed for character devices).
  I fixed it, and added a regression test.

  CID:		1368659

  r319543:

  Stylistic tweaks

  Move opening braces of functions from the last column to column 0.

  MFC with:	r319339

  r319544:

  Mark :seek_overflow as an expected failure

  MFC with:	r319339
  PR:		219757

  r319551 (by asomers):

  Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS

  Split the postive and negative parts into separate test cases.  The positive
  test case can only run on ZFS, because only ZFS supports files that large.

  PR:		219757

  r321138:

  Remove unnecessary make logic added in r319339

  This makes the change cleaner and easier to backport to ^/stable/10.

Changes:
_U  stable/10/
  stable/10/bin/dd/args.c
  stable/10/bin/dd/position.c
  stable/10/bin/dd/tests/Makefile
  stable/10/bin/dd/tests/dd2_test.sh
Comment 8 commit-hook freebsd_committer freebsd_triage 2017-07-18 17:37:36 UTC
A commit references this bug:

Author: ngie
Date: Tue Jul 18 17:36:26 UTC 2017
New revision: 321140
URL: https://svnweb.freebsd.org/changeset/base/321140

Log:
  MFC r302500,r319339,r319543,r319544,r319551,r321138:

  r302500 (by cem):

  dd(1): Enable access to SIZE_T_MAX character devices

  On machines where SIZE_T_MAX exceeds OFF_MAX (signed 64-bit), permit seeking
  character devices to negative off_t values.  This enables dd(1) to interact
  with kernel KVA in /dev/kmem on amd64, for example.

  r319339 (by asomers):

  Fix integer overflow detection in dd

  dd(1) tried to detect whether the seek offset would overflow, but it failed
  to account for the case where the provided argument was negative and the
  file was a regular file (negative seeks are allowed for character devices).
  I fixed it, and added a regression test.

  CID:		1368659

  r319543:

  Stylistic tweaks

  Move opening braces of functions from the last column to column 0.

  MFC with:	r319339

  r319544:

  Mark :seek_overflow as an expected failure

  MFC with:	r319339
  PR:		219757

  r319551 (by asomers):

  Fix bin/dd/dd2_tests:seek_overflow on UFS and TMPFS

  Split the postive and negative parts into separate test cases.  The positive
  test case can only run on ZFS, because only ZFS supports files that large.

  PR:		219757

  r321138:

  Remove unnecessary make logic added in r319339

  This makes the change cleaner and easier to backport to ^/stable/10.

Changes:
_U  stable/10/
  stable/10/bin/dd/args.c
  stable/10/bin/dd/position.c
  stable/10/bin/dd/tests/Makefile
  stable/10/bin/dd/tests/dd2_test.sh