Testing a cheap MicroSD card quality

šŸ’¾ Intro I just found a very cheap SD card on an online store and since I know that there are some fake around, I wanted to quickly test if its size and speed respect the specs. Edit: after first publish, a kind reader noticed me that The F3 tools are a perfect fit for the same task and thatā€™s right; if you want to follow a manual path and learn something in the journey, continue readingā€¦ ...

September 3, 2024 Ā· Andrea Manzini

Playing with Linux kernel capabilities

šŸ” Intro As an experienced sysadmin, you might be familiar with the traditional ā€œall-or-nothingā€ approach: if a shell or process is running with UID==0, it can do almost everything on a system; while a plain user process is restricted by some means: tipically it canā€™t open RAW sockets, canā€™t bind ā€œprivilegedā€ ports under 1024, canā€™t change a file ownership and so on. Linux capabilities is a feature, gradually introduced starting from kernel 2.2, that permits a more fine-grained control over privileged operations, breaking the traditional binary root/non-root distinction. Just as by using sudo we can run specific commands as another user (even root), without permanently becoming that user, by using capabilities, we can grant a program only certain privileges without having to run it as root. ...

August 2, 2024 Ā· Andrea Manzini

Measure your program's power consumption

šŸŒ”ļø Intro For those running a datacenter, or just a simple homelab server, the arrival of summer heat means an increase in air conditioning use. On this post I asked myself how a Linux engineer can measure how much energy is the system consuming so we can start to reason about workload optimization for better power consumption patterns. šŸ”‹ Idle power drain As a starting point, letā€™s measure how much power my PC is consuming when idle, doing absolutely nothing; or better: nothing useful for computation or service but just running usual, default operating system tasks. ...

June 30, 2024 Ā· Andrea Manzini

Headless Testing of PySide/PyQt GUI Applications with pytest-qt

šŸ¤“ Intro Manual testing of GUI applications can become tedious and error-prone as features and complexity increase. Headless testing offers a solution by automating UI interactions without the need for a physical display. This approach allows for faster test execution, improved repeatability, and seamless integration with continuous integration and continuous delivery (CI/CD) pipelines. In this post, weā€™ll explore how to leverage pytest-qt, a powerful framework for headless testing of PySide/PyQt applications. ...

May 22, 2024 Ā· Andrea Manzini