* Add unit test for psync_task_free refcount fix (#377) Adds tests/unit-tests/test_ptask_free.c to verify all code paths of the psync_task_free fix from #377: single-owner free, last-ref destroy, non-last-ref decrement, READY task signaling, and lock-before-refcnt ordering. All 5 tests pass. Also adds compiled binary to .gitignore. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add GitHub Actions CI workflow for unit tests Triggers on push/PR to automated-testing branch. Installs cmake and build-essential, builds all test targets via cmake, and runs ctest --output-on-failure. Fails workflow on any test failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Replace cmake CI with make tests/check targets Adds tests and check targets to Makefile — no cmake required. Each test binary is built with the correct flags (pthread, -lrt, --wrap linker flags for prun/ptools_errptr). CI workflow installs only build-essential, runs make tests then make check; exits non-zero on any failure. All 8 test suites pass locally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix CI: install libfuse3-dev so Makefile parses on Ubuntu detect_fuse.sh runs at Makefile parse time; without fuse headers the $(error) fires before any target runs. Adding libfuse3-dev unblocks make tests (test binaries themselves don't link fuse). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix makefile * Add automated testing infrastructure - Update CI workflow to run unit tests and build verification - Add Makefile targets for test compilation and execution - Implement unit tests for pdbg_path, prun, and read_response - Add test stubs for pCloud API mocking - Add test binaries for pfs_lock_ordering and signal_safety verification * Add missing dependencies to CI workflow Install libfuse-dev and libssl-dev required for build * Add test job to c-cpp.yml workflow Include unit test execution in C/C++ workflow * Add missing stubs to test_stubs.c Complete stub implementations for all required pCloud API functions * Fix stub signatures to match headers Correct function signatures for pCloud API stubs * Fix psql_* stub signatures Correct all psql function signatures to match headers * Fix stub implementations and Makefile Update stub functions and build configuration * Link real utility files instead of stubbing Update Makefile to use actual implementation files for utilities * Complete test framework with all 41 tests passing - Makefile: Add test rules with real dependencies - tests/stubs/test_stubs.c: Minimal stubs for external APIs - tests/stubs/test_stubs_cpp.c: Stubs for C++ test - pclsync/putil.c: Add null check in putil_strdup - pclsync/pdbg.c: Add recursion guard in pdbg_printf * Remove duplicate ci.yml workflow Consolidate CI configuration into c-cpp.yml * Remove compiled test binaries from git - Remove test_pfs_lock_ordering and test_signal_safety binaries - Add tests/test_* to .gitignore to prevent future commits --------- Co-authored-by: Levi Neely <lkn@darkstar.example.net> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| dev | ||
| doc | ||
| pclsync | ||
| tests | ||
| .clang-format | ||
| .clang-tidy | ||
| .envrc | ||
| .gitignore | ||
| CLI11.hpp | ||
| LOG-MANAGEMENT.md | ||
| Makefile | ||
| README.md | ||
| control_tools.cpp | ||
| control_tools.h | ||
| default.nix | ||
| detect_fuse.sh | ||
| flake.lock | ||
| flake.nix | ||
| main.cpp | ||
| pcloudcc.logrotate | ||
| pclsync_lib.cpp | ||
| pclsync_lib.h | ||
| rpcclient.cpp | ||
| rpcclient.h | ||
README.md
Introduction
pcloudcc is simple linux console client for pCloud cloud storage derived from the console-client developed by pCloud. This version is independently maintained by me, whose only affiliation with pCloud is as a user of their services. Due credit goes to Anton Titov, Ivan Stoev, and pCloud.
Supported Platforms & Distributions
The target operating system and platform for this program is linux/amd64, and has been reported to work on linux/aarch64. Program behavior on 32-bit architectures is considered undefined.
I aim to support as many distributions as possible. I maintain a package for AUR and Nix. I do not plan on providing or maintaining any other packages, but encourage anyone interested in doing so for their own distributions.
Compatibility Matrix
| Distribution | FUSE |
|---|---|
| Debian trixie | 2.x |
| Debian trixie | 3.x |
| Arch Linux (rolling) | 3.x latest |
| Fedora 41 | 3.x |
| Fedora (latest) | 3.x latest |
| Debian forky | 3.18+ |
| Slackware 15 | 3.10.5 |
All configurations require mbedTLS 3.x. Runtime mount testing was performed manually on FUSE 2 (libfuse 2.9.x), FUSE 3 (libfuse3 3.10.5), and FUSE 3.18+ (Debian forky container).
Notices
Security Notice
My code audits are best-effort, and I make security enhancements as I identify problems. However, I do not promise that this program is free of even older and well-known security vulnerabilities. Therefore, I recommend using this program only on a trusted single-user system. Security-related code audits and contributions are most welcome!
See Also
-
Contributing: Read this if you're interested in helping out. Short version: do your best to write good code, be courteous to maintainers, and most importantly: have fun!
-
Building: Read this if you're not sure how to build
pcloudcc. For most users,makeandmake installare enough. -
mbedtls 3.x migration notes: Read this if you use an older distribution such as
debian:bookwormand encounter build problems. -
Device Validation Guide: Read this if you're running
pcloudccand encounter device validation-related errors. -
Usage Guide: Read this if you're unsure how to start using
pcloudcc. -
Log Management Guide: Read this to configure log rotation, cache size limits, and custom log paths. To set up automatic log rotation, copy
pcloudcc.logrotateto/etc/logrotate.d/pcloudcc. -
pcloudcc-service: Container-based systemd service for running
pcloudccin userspace with podman. Includes multi-stage Dockerfile that buildspcloudccfrom source and Quadlet systemd unit for automated background syncing.