Tests that require PRNG are by default seeded from `/dev/urandom`.
However, the user should be able to override with a given seed
to reproduce a failing test.
Instead of messing with command-line arguments, a cleaner approach
is to fetch the seed from an environment variable.
For `ATX_CHECK_FS()` and `ATX_CHECK_FS_NEW()`, do not skip the test
if a backend (or its "-write" feature) is disabled, since
`exit 77` skips the entire test group, not current `AT_CHECK()`.
Instead, silently pass the current test.
- Move common `AC_DEFINE()` usage to `EX_FEAT()`.
- Remove unused argument `action-if-disabled` for `EX_FEAT()`.
- Conditionally enable features by default.
- `mozorigin_get()`, `mozplace_addref()`: pass struct as argument.
- `parse_mozurl_host()`: rename to `parse_mozurl`; add comments;
store parse results to argument of type `struct mozorigin`.
- Rename objects of type `struct mozXXX` from `XXX_cols` to `mX`.
- ...
Do not force 64-bit `time_t` on 32-bit platforms, since libfuse
does not do so. Linking shared objects with incompatible types
breaks ABI, resulting in undefined behavior.
Instead, add run-time checks to make sure that timestamps do not
overflow. If they do, set to `INT32_MAX`.
Also tidy up build scripts, tests, and the installation guide.
- If the utility library is not built, link to the existing library
when building helper programs for filesystem tests.
- Refactor PRNG seeding in tests.
When a bookmark is deleted, if there are no other bookmarks
referencing the corresponding `moz_place` entry, tag and keyword
references to that entry are considered "dangling" references,
and shall be automatically removed.
Also reverts commit b5fa6960ef,
since the NULL title check is no longer necessary.
When a bookmark associated with a keyword is deleted,
there may still be dangling references (e.g., tags) to the
corresponding `moz_places` entry.
By filtering out NULL titles, `bookmark_lookup()` and
`bookmark_list()` now only give keywords associated with
valid bookmarks.
This allows users to quickly discover which keyword is
associated with a given bookmark.
Updating keywords via xattr is not implemented,
since it can be done trivially using existing API.
There is a chance that rehash may fail,
even with a decent hash function, and no collision attack.
Allow the hashmap to be rehashed for a second time during insert,
and ignore rehash failures during delete.
- Move common defs and helper functions to check_util.h/check_utils.c.
- Add a prepare script argument for ATX_CHECK_FS* macros.
- ASSERT_EXPR_INT(): Use long int as expression result type.
- Other misc updates.
Now the built-in fsck handler and `bookmarkctl fsck` produces
output that is both parsable and human-readable.
Also document the output format in the user manual.
Unlike distros using systemd, FUSE is not enabled by default on Alpine.
To setup FUSE manually:
1. modprobe fuse
2. mount -t fusectl fusectl /sys/fs/fuse/connections
3. chmod 666 /dev/fuse
Normal users may prefer using OpenRC services to automate these steps,
which is what we do in this patch.
Also install the umount program from util-linux, since the busybox one
does not support unprivileged dismount for FUSE.
- Apply workaround for libiconv on FreeBSD.
- Disable tcc bounds checking (`tcc -b`) on Alpine, since it requires
manually linking to /usr/lib/tcc/bcheck.o (in package tcc-dev).
No need to bother with it. Such checks are better covered with ASAN
on Debian and Arch Linux builds.
In commit 348f13df02, we replaced
`length(url)` with `octet_length(url)`.
However, `octet_length` was added in SQLite 3.43, while we claim to
support SQLite 3.35 and later.
Stable GNU/Linux distros like Debian may still be using pre-3.43
releases of SQLite, so don't bump that version too soon.
Instead, use `length(CAST(url AS BLOB))`, which is a bit less
efficient than `octet_length(url)`, but O(1) nonetheless.