<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tests, branch releng/11.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F11.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F11.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2018-05-15T10:10:14Z</updated>
<entry>
<title>Handle the difference between HEAD and stable/11 tests build.</title>
<updated>2018-05-15T10:10:14Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2018-05-15T10:10:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fb397dd7bc9165d24cf0a5c88720374e3c2c029d'/>
<id>urn:sha1:fb397dd7bc9165d24cf0a5c88720374e3c2c029d</id>
<content type='text'>
This is a direct commit to stable/11.

PR:	228018, 228233
Tested by:	Helge Oldach &lt;freebsd@oldach.net&gt;
Sponsored by:	The FreeBSD Foundation
Approved by:	re (marius)
</content>
</entry>
<entry>
<title>MFC r332740:</title>
<updated>2018-05-02T07:57:36Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2018-05-02T07:57:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=09ed7ec7664907c41d13533d6bedbcb221947199'/>
<id>urn:sha1:09ed7ec7664907c41d13533d6bedbcb221947199</id>
<content type='text'>
Add PROC_PDEATHSIG_SET to procctl interface.

MFC r332825:
Rename PROC_PDEATHSIG_SET -&gt; PROC_PDEATHSIG_CTL.

MFC r333067:
Remove redundant pipe from pdeathsig.c test.
</content>
</entry>
<entry>
<title>MFC 332657:</title>
<updated>2018-04-27T18:07:31Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2018-04-27T18:07:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=689b7855b14b86072c95372abe16bf4c77d71a49'/>
<id>urn:sha1:689b7855b14b86072c95372abe16bf4c77d71a49</id>
<content type='text'>
Properly do a deep copy of the ioctls capability array for fget_cap().

fget_cap() tries to do a cheaper snapshot of a file descriptor without
holding the file descriptor lock.  This snapshot does not do a deep
copy of the ioctls capability array, but instead uses a different
return value to inform the caller to retry the copy with the lock
held.  However, filecaps_copy() was returning 1 to indicate that a
retry was required, and fget_cap() was checking for 0 (actually
'!filecaps_copy()').  As a result, fget_cap() did not do a deep copy
of the ioctls array and just reused the original pointer.  This cause
multiple file descriptor entries to think they owned the same pointer
and eventually resulted in duplicate frees.

The only code path that I'm aware of that triggers this is to create a
listen socket that has a restricted list of ioctls and then call
accept() which calls fget_cap() with a valid filecaps structure from
getsock_cap().

To fix, change the return value of filecaps_copy() to return true if
it succeeds in copying the caps and false if it fails because the lock
is required.  I find this more intuitive than fixing the caller in
this case.  While here, change the return type from 'int' to 'bool'.

Finally, make filecaps_copy() more robust in the failure case by not
copying any of the source filecaps structure over.  This avoids the
possibility of leaking a pointer into a structure if a similar future
caller doesn't properly handle the return value from filecaps_copy()
at the expense of one more branch.

I also added a test case that panics before this change and now passes.
</content>
</entry>
<entry>
<title>MFC r329874:</title>
<updated>2018-04-16T16:25:42Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-04-16T16:25:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b0453544ba4bc5b953e625debb9f3993e936ccac'/>
<id>urn:sha1:b0453544ba4bc5b953e625debb9f3993e936ccac</id>
<content type='text'>
Add tests for lagg(4) and other cloned network interfaces

Unfortunately, most of the tests are disabled because they fairly frequently
trigger panics.

Sponsored by:	Spectra Logic Corp
</content>
</entry>
<entry>
<title>MFC r329273, r329275, r329277, r329284, r329344</title>
<updated>2018-03-10T03:34:27Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-03-10T03:34:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7f1d03726e17b6e6164aefb4ff193ce408b73c86'/>
<id>urn:sha1:7f1d03726e17b6e6164aefb4ff193ce408b73c86</id>
<content type='text'>
r329273:
geli: append "/eli" to the underlying provider's physical path

If the underlying provider's physical path is null, then the geli device's
physical path will be, too. Otherwise, it will append "/eli".  This will make
geli work better with zfsd(8).

PR:		224962
Differential Revision:	https://reviews.freebsd.org/D13979

r329275:
gpart: append partition name to the underlying provider's physical path

If the underlying provider's physical path is null, then the gpart device's
physical path will be, too. Otherwise, it will append the partition name,
such as "/p1" or "/s1/a". This will make gpart work better with zfsd(8).

PR:		224965
Differential Revision:	https://reviews.freebsd.org/D14010

r329277:
Add mtree entry for 329275

X-MFC-With:	329275
Sponsored by:	Spectra Logic Corp

r329284:
zfsd: Allow zfsd to work on any type of GEOM provider

cddl/usr.sbin/zfsd/zfsd_event.cc
	Remove the check for da and ada devices.  This way zfsd can work on md,
	geli, glabel, gstripe, etc devices.  geli in particular is useful
	combined with ZFS.  gnop is also useful for simulating drive pulls in
	the ZFSD test suite.

	Also, eliminate the DevfsEvent class entirely.  Move its
	responsibilities into GeomEvent.  We can get everything we need to know
	just from listening to GEOM events.

lib/libdevdctl/event.cc
	Fix GeomEvent::DevName for CREATE events.  Oddly, the relevant field is
	named "cdev" for CREATE events but "devname" for disk events.

Relnotes:	Yes (probably worth mentioning the geli part)
Sponsored by:	Spectra Logic Corp

r329344:
Optimize zfsd for the happy case

If there are no damaged pools, then ignore all GEOM events.  We only use
them to fix damaged pools.  However, still pay attention to ZFS events.

X-MFC-With:	329284
Sponsored by:	Spectra Logic Corp
</content>
</entry>
<entry>
<title>MFC r328896, r329236</title>
<updated>2018-03-10T03:15:44Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-03-10T03:15:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b8c98685240609b27d699706ae9a3ca9ad84f19f'/>
<id>urn:sha1:b8c98685240609b27d699706ae9a3ca9ad84f19f</id>
<content type='text'>
r328896:
Fix and enable SysV IPC tests.

Don't declare some types that FreeBSD incorrectly declares.

Fix an incorrect call to open() (missing mode).

ANSIfy prototypes.

Enable SysV message queue, semaphore, and shared memory tests.

With exception of the workaround for union semun, these fixes have been
committed to NetBSD.

Reviewed by:	asomers
Approved by:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D13471

r329236:
Fix Coverity CIDs in the sys/kern/sysv_test tests

CID 979810: strcpy =&gt; strlcpy
CID 1193367: don't leak a file descriptor
CID 1299856: Check the return value of read(2)

Reported by:	Coverity
Coverity CID:	978910 1193367 1299856
X-MFC-With:	328896
Sponsored by:	Spectra Logic Corp
</content>
</entry>
<entry>
<title>MFC r319590:</title>
<updated>2018-03-01T06:54:03Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-01T06:54:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=df9d55312c5f460903cd05afee22c4c97783d728'/>
<id>urn:sha1:df9d55312c5f460903cd05afee22c4c97783d728</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MFC r328108:</title>
<updated>2018-02-22T02:12:47Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-02-22T02:12:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3e7e9a62d4fd2e86b34768008601eeb615cac8b0'/>
<id>urn:sha1:3e7e9a62d4fd2e86b34768008601eeb615cac8b0</id>
<content type='text'>
gnop(8): add the ability to set a nop provider's physical path

While I'm here, expand the existing tests a bit.

Differential Revision:	https://reviews.freebsd.org/D13579
</content>
</entry>
<entry>
<title>MFC 319454: Honor the requested crid when running a test.</title>
<updated>2018-02-08T00:59:56Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2018-02-08T00:59:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c8550fe4170288a1ee39f2d88bfee863505cb80f'/>
<id>urn:sha1:c8550fe4170288a1ee39f2d88bfee863505cb80f</id>
<content type='text'>
Otherwise, the kernel is free to choose an aribtrary crypto device
rather than the requested device subverting tests that force the use
of a specific device.
</content>
</entry>
<entry>
<title>MFC geli test suite changes</title>
<updated>2018-02-02T21:57:00Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-02-02T21:57:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e29a582ab9fe5e010b2f979b1149e72af44a3bd2'/>
<id>urn:sha1:e29a582ab9fe5e010b2f979b1149e72af44a3bd2</id>
<content type='text'>
MFC r306188, r306395, r327346-r327347, r327352-r327353, r327662, r327666, r327682-r327683, r327685

r306188 by br:
Use bsdlabel as we don't have hardlink disklabel -&gt; 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.
</content>
</entry>
</feed>
