140b3639 ngie Feb. 20, 2019, 7:49 a.m.
The key difference is that some of the programs were previously being compiled
and installed as tests, which is incorrect. Treat them like helpers instead.
cgit ViewVC
dae8f246 ngie Feb. 20, 2019, 7:29 a.m.
My previous work to integrate these tests was incomplete/incorrect, because I
misunderstood how the cmake macros worked.

This addresses items with the gtest tests, which in turn fixes test compilation
and adds more tests which I had previously missed.

Due to an unknown issue with gtest_stress_test, I had to add pthread to LIBADD,
even though I shouldn't have added it to that (it was failing to link -lpthread
to libprivategtest.a). Add a XXX comment to note that something's awry there
and deserves additional investigation.
cgit ViewVC
7ea28b21 ngie Feb. 20, 2019, 7:21 a.m.
In order to compile these tests with different CXXFLAGS, I needed to copy them
to different filenames to trick the compiler. Unfortunately, this triggers a
failure with one of the tests as it hardcodes the path to the test, instead of
relying on the compiler to fill in the path via `__FILE__`.

Using `__FILE__` is standard and works. Rely on it instead of a hardcoded path.
cgit ViewVC
90ce6e8c ganbold Feb. 20, 2019, 7:10 a.m.
reaches warning and shutdown thresholds.
cgit ViewVC
f53e2662 ngie Feb. 20, 2019, 6:54 a.m.
5d40b795 ngie Feb. 20, 2019, 6:52 a.m.
It needs to be prefixed under /usr/include/private; not /usr/include
cgit ViewVC
adedf5ee bapt Feb. 20, 2019, 6:40 a.m.
calendar(1) can have input in various encoding, specifying
LANG=<locale_name> to enable calendar(1) to determine which one to use.

The problem is the content of the calendar itself is exposed as is making it
unreadable in many cases. For example french calendar which is encoded
ISO8859-1 is rendered badly in a fr_FR.UTF-8 environment.

Using iconv allows to solve this issue.
This will also allow to keep only 1 encoding in base for those files without
breaking user existing setup

Reported by:	many
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D19221
cgit ViewVC
fedec5d9 ngie Feb. 20, 2019, 6:03 a.m.
While here, reindent `SUBDIR.${MK_TESTS}`
cgit ViewVC
1ed7b003 ngie Feb. 20, 2019, 5:56 a.m.
748f247a bcran Feb. 20, 2019, 5:19 a.m.
Reviewed by:	imp
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D19242
cgit ViewVC
04773d6d ngie Feb. 20, 2019, 3:07 a.m.
98934c68 ian Feb. 20, 2019, 3 a.m.
When I added support for the standard loader(8) disk0s2a: type formats,
the parsing of legacy format was broken because it also contains a colon,
but it comes before the slice and partition. That would cause disk_parsedev()
to return success with the slice and partition set to wildcard values.

This change examines the string first, and if it contains spaces, dots, or
a colon at any position other than the end, it must be a legacy-format
string and we don't even try to use disk_parsedev() on it.

Reported by:	Manuel Stuhn
cgit ViewVC
02295caf cem Feb. 20, 2019, 2:49 a.m.
Take a pass through fixing some of the most egregious whitespace issues in
fs/fuse.  Also fix some style(9) warts while here.  Not 100% cleaned up, but
somewhat less painful to look at and edit.

No functional change.
cgit ViewVC
bd4cb2a4 cem Feb. 20, 2019, 2:48 a.m.
(Except reclaim revoked; I don't know what that goal of that one is.)
cgit ViewVC
bb1be77a behlendorf1 Feb. 20, 2019, 2:41 a.m.
Trying to mount a dataset from a readonly pool could inadvertently start
the user accounting upgrade task, leading to the following failure:

VERIFY3(tx->tx_threads == 2) failed (0 == 2)
PANIC at txg.c:680:txg_wait_synced()
Showing stack for process 2541
CPU: 2 PID: 2541 Comm: z_upgrade Tainted: P           O  3.16.0-4-amd64 #1 Debian 3.16.51-3
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Call Trace:
 [<0>] ? dump_stack+0x5d/0x78
 [<0>] ? spl_panic+0xc9/0x110 [spl]
 [<0>] ? dnode_next_offset+0x1d4/0x2c0 [zfs]
 [<0>] ? dmu_object_next+0x77/0x130 [zfs]
 [<0>] ? dnode_rele_and_unlock+0x4d/0x120 [zfs]
 [<0>] ? txg_wait_synced+0x91/0x220 [zfs]
 [<0>] ? dmu_objset_id_quota_upgrade_cb+0x10f/0x140 [zfs]
 [<0>] ? dmu_objset_upgrade_task_cb+0xe3/0x170 [zfs]
 [<0>] ? taskq_thread+0x2cc/0x5d0 [spl]
 [<0>] ? wake_up_state+0x10/0x10
 [<0>] ? taskq_thread_should_stop.part.3+0x70/0x70 [spl]
 [<0>] ? kthread+0xbd/0xe0
 [<0>] ? kthread_create_on_node+0x180/0x180
 [<0>] ? ret_from_fork+0x58/0x90
 [<0>] ? kthread_create_on_node+0x180/0x180

This patch updates both functions responsible for checking if we can
perform user accounting to verify the pool is not readonly.

Reviewed-by: Alek Pinchuk <apinchuk@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #8424