Bug 221763 - The geom eli resize_test uses bsdlabel
Summary: The geom eli resize_test uses bsdlabel
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Some People
Assignee: Alan Somers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-24 13:29 UTC by Andrew Turner
Modified: 2018-02-14 20:14 UTC (History)
1 user (show)

See Also:
asomers: mfc-stable11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Turner freebsd_committer 2017-08-24 13:29:06 UTC
The resize_test geli test uses bsdlabel. This is broken on architectures other than i386 and amd64 as the bsdlabel symlink is not installed there.
Comment 1 Alan Somers freebsd_committer 2017-08-24 14:49:24 UTC
Which architecture and release are you using?  Do you have /sbin/disklabel?
Comment 2 Andrew Turner freebsd_committer 2017-08-24 15:33:16 UTC
In this case arm64 so we do not have disklabel.
Comment 3 Alan Somers freebsd_committer 2017-08-24 16:00:51 UTC
Do you have gpart?  Can you try modifying the test to use gpart exclusively?
Comment 4 commit-hook freebsd_committer 2017-12-29 18:44:00 UTC
A commit references this bug:

Author: asomers
Date: Fri Dec 29 18:42:56 UTC 2017
New revision: 327353
URL: https://svnweb.freebsd.org/changeset/base/327353

Log:
  geli: fix the resize test on arm64

  The resize test used bsdlabel(8), which is not available on all
  architectures.  Change it to use gpart(8) instead, which should be available
  everywhere.

  PR:		221763
  Reported by:	andrew
  MFC after:	2 weeks

Changes:
  head/tests/sys/geom/class/eli/resize_test.sh
Comment 5 commit-hook freebsd_committer 2018-02-02 21:57:35 UTC
A commit references this bug:

Author: asomers
Date: Fri Feb  2 21:57:01 UTC 2018
New revision: 328811
URL: https://svnweb.freebsd.org/changeset/base/328811

Log:
  MFC geli test suite changes

  MFC r306188, r306395, r327346-r327347, r327352-r327353, r327662, r327666, r327682-r327683, r327685

  r306188 by br:
  Use bsdlabel as we don't have hardlink disklabel -> bsdlabel
  on some platforms.

  Reviewed by:	ngie
  Sponsored by:	DARPA, AFRL
  Sponsored by:	HEIF5
  Differential Revision:	https://reviews.freebsd.org/D7968

  r306395 by br:
  Increase timeouts for geli tests. It takes 2-3x more time to proceed the
  tests on MIPS64EB in QEMU.

  Sponsored by:	DARPA, AFRL
  Sponsored by:	HEIF5

  r327346:
  Fix potential TOCTTOU bug in the geli tests

  This change mostly reverts r293436, which introduced the bug due to a belief
  that geli(8) would allocate md(4) devices by itself. However, that belief is
  incorrect. Instead of using linear probing to find available md(4) numbers,
  it's best to use the existing attach_md function.

  Reviewed by:	ngie
  Sponsored by:	Spectra Logic Corp
  Differential Revision:	https://reviews.freebsd.org/D13666

  r327347:
  geli: factor out some common code in the geli tests

  No functional change.

  Sponsored by:	Spectra Logic Corp

  r327352:
  Fix a harmless typo from r310786

  I copy/pasted a reference to an undefined shell variable.

  r327353:
  geli: fix the resize test on arm64

  The resize test used bsdlabel(8), which is not available on all
  architectures.  Change it to use gpart(8) instead, which should be available
  everywhere.

  PR:		221763
  Reported by:	andrew

  r327662:
  geli: convert most tests from TAP to ATF

  I'm leaving readonly_test and nokey_test alone for now. In a future commit
  they should be broken up into several smaller test cases and distributed
  between multiple files.

  Reviewed by:	ngie
  Differential Revision:	https://reviews.freebsd.org/D13717

  r327666:
  geli: fix parallel execution of tests

  The trick is not to destroy an md(4) device during a test.  That can create
  a "double-free" situation, because we also destroy md devices during test
  cleanup.

  r327682:
  Fix typo from r327666

  X-MFC-With:	327666

  r327683:
  geli: convert remaining TAP tests to ATF

  r327685:
  geli: optimize tests

  Reduce the geli tests' runtime by about a third:

  * In integrity_test:copy, use a file-backed md(4) device instead of a
    malloc'd one.  That way we can corrupt the underlying storage without
    needing to detach and reattach the geli device.

  * In integrity_test:{copy, hmac, data} and onetime_test:{onetime,
    onetime_a}, move reads of /dev/random out of the loop.

Changes:
_U  stable/11/
  stable/11/ObsoleteFiles.inc
  stable/11/tests/sys/geom/class/eli/Makefile
  stable/11/tests/sys/geom/class/eli/attach_d_test.sh
  stable/11/tests/sys/geom/class/eli/attach_test.sh
  stable/11/tests/sys/geom/class/eli/conf.sh
  stable/11/tests/sys/geom/class/eli/configure_b_B_test.sh
  stable/11/tests/sys/geom/class/eli/configure_test.sh
  stable/11/tests/sys/geom/class/eli/delkey_test.sh
  stable/11/tests/sys/geom/class/eli/detach_l_test.sh
  stable/11/tests/sys/geom/class/eli/detach_test.sh
  stable/11/tests/sys/geom/class/eli/init_B_test.sh
  stable/11/tests/sys/geom/class/eli/init_J_test.sh
  stable/11/tests/sys/geom/class/eli/init_a_test.sh
  stable/11/tests/sys/geom/class/eli/init_alias_test.sh
  stable/11/tests/sys/geom/class/eli/init_i_P_test.sh
  stable/11/tests/sys/geom/class/eli/init_test.sh
  stable/11/tests/sys/geom/class/eli/integrity_copy_test.sh
  stable/11/tests/sys/geom/class/eli/integrity_data_test.sh
  stable/11/tests/sys/geom/class/eli/integrity_hmac_test.sh
  stable/11/tests/sys/geom/class/eli/integrity_test.sh
  stable/11/tests/sys/geom/class/eli/kill_test.sh
  stable/11/tests/sys/geom/class/eli/nokey_test.sh
  stable/11/tests/sys/geom/class/eli/onetime_a_test.sh
  stable/11/tests/sys/geom/class/eli/onetime_d_test.sh
  stable/11/tests/sys/geom/class/eli/onetime_test.sh
  stable/11/tests/sys/geom/class/eli/readonly_test.sh
  stable/11/tests/sys/geom/class/eli/resize_test.sh
  stable/11/tests/sys/geom/class/eli/setkey_test.sh