mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
* Check files and dirs are cleaned This is a new check to make sure all the files/dirs created are deleted after the test is reset. In a following PR the code could be moved to a test tool. * Fix shellcheck * Added /etc abd making checks for all the classic systems now * Not adding /etc because until it is analyzed the result File not deleted /etc/systemd/system/var-lib-snapd-snap-core-11378.mount File not deleted /etc/systemd/system/multi-user.target.wants/var-lib-snapd-snap-core-11378.mount File not deleted /etc/environment File not deleted /etc/systemd/system/multi-user.target.wants/var-lib-snapd-snap-core-11378.mount Dir not deleted /etc/systemd/system/snapd.service.d * Fix error on arch linux * Comments for exclude * Remove /root/snap dir This is created on tests and then it is not deleted * Clean some tests which failed * Check if inotifywait is running * Add more cleanup * Update how files and dirs are backed up to avoid creating new files * Allways create the .fake file * Reset test user bash_history * Clean /root/.local /root/.cache I see these dirs remaining: Dir not deleted /root/.cache/snapcraft Dir not deleted /root/.cache/snapcraft/download Dir not deleted /root/.cache/snapcraft/stage-packages Dir not deleted /root/.local Dir not deleted /root/.local/share Dir not deleted /root/.local/share/snapcraft Dir not deleted /root/.local/share/snapcraft/projects Dir not deleted /root/.local/share/snapcraft/projects/snapd * Moved to fs-state and exclude monitor * Fix shell check error * Fixes for the tests/lib/tools/suite/fs-state test * New option to backup a file and dir with a new empty file/dir * Fix shift command * Fix how /snap dir is cleaned * Try again checking /etc This will need to skip some changes related to the initial core 11378 * Count the number of times a file/dir is createad and deleted This is to make more precise the check * Count deleted files and dirs * fix shell check * Fix start-monitor command * Skip backup files * Exclude all the directories and files in /var/lib/snapd * Include in teh exclude section the paths which are included in the state All the paths which are in sync because they are included in the snpad state which is automatically restored should be not tracked * Updating directories included and excluded * Fix shellcheck * Adding more details to log * Update how the created and deleted are counted * New check using tree The previous approach was not working at all The files/dirs could be moved and that was not catched, so to make sure the process worked it was needed to check all the events, not just create and delete * fix shellcheck * install tree in all the systems * ignore test.tar file * Move to the initial step of prepare the start-monitor call * Fix missing " * Excluding runtime state dir * Revert --new for mocking files and creating runtime files with the suite * Not using tree separators anymore * Improve the exclussion of files using grep and --noreport * Skip monitor in case the tree command is not installed * Clean tests * Fix shell check * Fix shellcheck * fix yaml file * Fix tests which are leaving data * More cleanups for tests * More test fixes * More fixes for tests and tools * fix issues * Fix shellcheck * Automatic removal for installed packages * Some other test fixes * Avoid removing empty packages * Fix duplicated removal * update function name on pkgdb * Manually delete installed packages * Improve cleanup and fix packages removal * Moving test to focal This is because there is a bug in postgres on xenial when removing hte package google:ubuntu-16.04-64 .../tests/main/special-home-can-run-classic-snaps# systemctl status postgresql@9.5-main.service ● postgresql@9.5-main.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: exit-code) since Tue 2021-08-24 20:40:23 UTC; 57min ago Main PID: 26307 (code=exited, status=0/SUCCESS) Aug 24 20:40:15 aug242031-248411 systemd[1]: Starting PostgreSQL Cluster 9.5-main... Aug 24 20:40:17 aug242031-248411 systemd[1]: Started PostgreSQL Cluster 9.5-main. Aug 24 20:40:23 aug242031-248411 systemd[1]: Stopping PostgreSQL Cluster 9.5-main... Aug 24 20:40:23 aug242031-248411 postgresql@9.5-main[26895]: Can't exec "": No such file or directory at /usr/bin/pg_ctlcluster line 283. Aug 24 20:40:23 aug242031-248411 systemd[1]: postgresql@9.5-main.service: Control process exited, code=exited status=1 Aug 24 20:40:23 aug242031-248411 systemd[1]: Stopped PostgreSQL Cluster 9.5-main. Aug 24 20:40:23 aug242031-248411 systemd[1]: postgresql@9.5-main.service: Unit entered failed state. Aug 24 20:40:23 aug242031-248411 systemd[1]: postgresql@9.5-main.service: Failed with result 'exit-code'. * Move tree to find * Use test.pkgs instead of pkgdb to list installed and remove pkgs * fix missing call to cmd_list_installed * Adding another missing parameter to list-installed * Fix how diff file is checked * Fix shellcheck error * Remove check in case tree is not installed * fix another shell check not related to this pr * fix another shellcheck error not related to this pr * Fix manual merge * fix shellcheck