Commit graph

35 commits

Author SHA1 Message Date
CismonX
99ac2b79f8
test: misc fix and refactor 2025-06-16 18:32:36 +08:00
CismonX
6fc165ff65
all: properly handle time_t on 32-bit platforms
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.
2025-06-14 11:43:03 +08:00
CismonX
303c934894
test: misc refactor
- If the utility library is not built, link to the existing library
  when building helper programs for filesystem tests.
- Refactor PRNG seeding in tests.
2025-06-11 20:45:16 +08:00
CismonX
c23623b5a3
test: add tests for file atime/mtime 2025-06-08 12:34:10 +08:00
CismonX
29338ca02b
backend_firefox: purge dangling refs on delete
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.
2025-06-06 22:46:44 +08:00
CismonX
c1cf9db2a1
test: add tests for tags and keywords 2025-06-02 09:20:19 +08:00
CismonX
d5eae85774
test: refactor filesystem tests 2025-06-01 21:35:07 +08:00
CismonX
ab88e0e839
test: add tests for directory entries 2025-05-28 18:51:02 +08:00
CismonX
9c0d5fb337
test: improve filesystem tests
- Add a final check to see whether the fs daemon is still there.
- Other misc updates.
2025-04-07 19:32:44 +08:00
CismonX
52b7f87536
test: add tests for regular file read/write 2025-04-02 18:09:09 +08:00
CismonX
1e047a9331
test: misc refactor
- 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.
2025-04-01 22:01:44 +08:00
CismonX
1bbe928e50
test: add basic tests for filesystem 2025-03-29 15:20:04 +08:00
CismonX
44100f8852
test: add test harness for filesystem 2025-03-28 16:39:29 +08:00
CismonX
9da346753d
test: misc refactor
- Repeat simple tests that may fail upon multiple invocations.
- ...
2025-03-28 14:29:18 +08:00
CismonX
bced141b98
test: misc fix and refactor
- Do not exit with status 99.  It is considered a "hard failure"
  in Autotest, and cleanup script won't be executed.
- Fix ATX_FEAT_PREREQ().
- Remove unneeded helper macros.
- Add more log output.
2025-03-24 19:30:32 +08:00
CismonX
03b638408d
test: more comments and log output 2025-03-22 11:38:59 +08:00
CismonX
18bfbc73da
test: fix helper program
In commit 68aafe3d8d, we forgot to update the code in
the helper test program, which also uses these macros.
2025-03-16 11:53:54 +08:00
CismonX
f6e3b743d1
build: rename autoconf helper macros
These macros are supposed to be reusable for other projects.
Also, a shorter name improves the readability of the config script.
2025-03-14 07:44:51 +08:00
CismonX
0b317c2727
test: misc refactor 2025-03-09 11:35:17 +08:00
CismonX
ca43bc6939
test: add tests for hashmap 2025-03-08 13:52:57 +08:00
CismonX
aed846b286
test: extract common prng helpers for future use 2025-03-08 13:50:47 +08:00
CismonX
9fab17734c
chore: misc cleanup 2025-03-07 14:35:45 +08:00
CismonX
1836692719
test: disable LSAN for sandbox tests
since they do not play well with seccomp and landlock
2025-03-05 13:36:38 +08:00
CismonX
29be925c92
test: ATX_FEAT_NAME -> ATX_FEAT_VAR
Since we're only using the feature variables in shell expansion,
using this form should make the testsuite code look cleaner.
2025-03-05 07:34:40 +08:00
CismonX
95121cb78f
test: add helper macro ATX_RUN
This is meant to be a workaround for a limitation of Autotest,
where `set -e` has no effect in AT_CHECK().

Also we don't want to use `trap ... ERR`, since it is not portable.
2025-03-05 07:01:34 +08:00
CismonX
9050d01fe4
test: add tests for sandbox 2025-03-04 12:05:17 +08:00
CismonX
31192fc715
test: refactor watcher tests 2025-03-03 13:55:08 +08:00
CismonX
f6ff129f23
test: check-bookmarkfs-util -> check-util-lib 2025-03-03 09:21:26 +08:00
CismonX
97ddb47cc8
test: refactor tests
- Output more error message.
- Improve conditional tests for watcher.
2025-03-02 12:45:11 +08:00
CismonX
b1100445b7
watcher: misc fix
- The initial `impl_rearm()` should always be performed by the
  worker thread, so that we won't get spurious zero returns from
  `watcher_poll()`.
- Sandboxing should not be implicitly disabled if not implemented.
- Shift internal watcher flags, to save space for public ones
  if we wish to add any in the future.
2025-03-02 06:54:06 +08:00
CismonX
f3f522ae63
test: fix
- Address sanitizer may call sigaltstack().
  Add it to the syscall whitelist (debug only).
- Fix args count checking for `check-bookmarkfs-util watcher`.
2025-03-01 12:14:53 +08:00
CismonX
3a0f435572
test: add tests for the file watcher 2025-03-01 11:23:42 +08:00
CismonX
5affe9ee02
test: misc updates
- Export feature variables for conditional testing.
- Add helper macros.
- Move helper shell functions from atlocal.in to testsuite.at.
  The atlocal file should only contain feature variables.
- Update existing tests.
2025-02-20 11:11:10 +08:00
CismonX
08f0655721
test: init tests; add tests for util lib
- Init Autotest.
  Not using DejaGNU since there won't be many interactive testing.
- Add basic test cases for the utility library (hash and prng).
2025-02-08 01:48:07 +08:00
CismonX
cdf0ddfc53
init: prepare for Savannah 2024-12-31 18:09:03 +08:00