How to correclty setup to run main.sh tests?

I am trying to run main.sh test using sudo -E ./main.sh as stated by the README.md.

However I am still getting a bunch of errors. I work in a guest debian incus vm.
If you need any other information about the environment in order to help me debug this issue ask it.
Here are the logs after running the above command:

==> Checking for dependencies
==> Available storage backends: dir btrfs
==> Using storage backend dir
==> Setting up directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/tzp
==> Spawning incusd in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/tzp
==> Spawned Incus (PID is 4451)
==> Confirming incusd is responsive (PID is 4451)
If this is your first time running Incus on this machine, you should also run: incus admin init

==> Binding to network
==> Bound to 127.0.0.1:55311
==> Setting up networking
Device eth0 added to default
==> Configuring storage backend
==> Configuring directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/tzp
Storage pool incustest-tzp created
Device root added to default
==> TEST BEGIN: checking dependencies
ldd: ./incus: No such file or directory
==> TEST DONE: checking dependencies (0s)
==> TEST BEGIN: database restore
==> Setting up directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0
==> Spawning incusd in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0
==> Spawned Incus (PID is 4556)
==> Confirming incusd is responsive (PID is 4556)
==> Binding to network
==> Bound to 127.0.0.1:55909
==> Setting up networking
Device eth0 added to default
==> Configuring storage backend
==> Configuring directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0
Storage pool incustest-SF0 created
Device root added to default
==> Shutting down Incus at /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0 (4556)
time="2025-02-03T16:20:42Z" level=warning msg="Failed to update instance types: Get \"https://images.linuxcontainers.org/meta/instance-types/gce.yaml\": context canceled"
time="2025-02-03T16:20:42Z" level=error msg="Failed updating instance types" err="context canceled"
time="2025-02-03T16:20:43Z" level=error msg="Failed to start the daemon" err="Failed to initialize global database: failed to ensure schema: failed to execute queries from /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0/database/patch.global.sql: no such table: broken"
Error: Failed to initialize global database: failed to ensure schema: failed to execute queries from /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0/database/patch.global.sql: no such table: broken
==> Spawning incusd in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0
==> Spawned Incus (PID is 4712)
==> Confirming incusd is responsive (PID is 4712)
==> Killing Incus at /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0 (4712)
==> Deleting all containers
==> Deleting all images
==> Deleting all profiles
Error: The "default" profile cannot be deleted
==> Deleting all managed networks
==> Clearing config of default profile
==> Deleting all storage pools
Storage pool incustest-SF0 deleted
==> Checking for locked DB tables
time="2025-02-03T16:20:46Z" level=error msg="Failed updating instance types" err="context canceled"
time="2025-02-03T16:20:46Z" level=warning msg="Failed to update instance types: Get \"https://images.linuxcontainers.org/meta/instance-types/azure.yaml\": context canceled"
==> Checking for leftover files
==> Checking for leftover DB entries
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
==> Tearing down directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/SF0
==> TEST DONE: database restore (9s)
==> TEST BEGIN: database out of disk space
51200+0 records in
51200+0 records out
52428800 bytes (52 MB, 50 MiB) copied, 0.169898 s, 309 MB/s
==> Setting up directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3
==> Spawning incusd in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3
==> Spawned Incus (PID is 4954)
==> Confirming incusd is responsive (PID is 4954)
==> Binding to network
==> Bound to 127.0.0.1:58285
==> Setting up networking
Device eth0 added to default
==> Configuring storage backend
==> Configuring directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3
Storage pool incustest-Oe3 created
Device root added to default
The testsuite requires /bin/busybox to be a static binary

df -h output:
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           793M  728K  793M   1% /run
/dev/sda2       9.6G  8.4G  1.2G  89% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
efivarfs         56K   31K   21K  60% /sys/firmware/efi/efivars
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.9G  8.0K  3.9G   1% /tmp
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-resolved.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-networkd.service
/dev/sda1        99M  8.7M   90M   9% /boot/efi
tmpfs            50M   22M   29M  44% /run/incus_agent
incus_code      952G  776G  173G  82% /home/user/Desktop/code/github-irhndt
tmpfs           1.0M     0  1.0M   0% /run/credentials/getty@tty1.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/serial-getty@ttyS0.service
tmpfs           793M   56K  793M   1% /run/user/1000
tmpfs            64M     0   64M   0% /home/user/Desktop/code/github-irhndt/incus/test/tmp.IeF/qpf/database/global
none            3.9G     0  3.9G   0% /home/user/Desktop/code/github-irhndt/incus/test/tmp.5zK/dev
none            3.9G     0  3.9G   0% /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/dev
tmpfs           100K     0  100K   0% /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/tzp/shmounts
tmpfs           100K     0  100K   0% /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/tzp/guestapi
tmpfs            64M   59M  6.0M  91% /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3/database/global
tmpfs           100K     0  100K   0% /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3/shmounts
tmpfs           100K     0  100K   0% /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3/guestapi
::group::dmesg logs
Feb 03 16:14:53 systemd[1]: systemd-pcrlock.socket - Make TPM PCR Policy was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
Feb 03 16:14:53 systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket.
Feb 03 16:14:53 systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket.
Feb 03 16:14:53 systemd[1]: Mounting dev-hugepages.mount - Huge Pages File System...
Feb 03 16:14:53 systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System...
Feb 03 16:14:53 systemd[1]: Mounting run-lock.mount - Legacy Locks Directory /run/lock...
Feb 03 16:14:53 systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System...
Feb 03 16:14:53 systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System...
Feb 03 16:14:53 systemd[1]: Mounting tmp.mount - Temporary Directory /tmp...
Feb 03 16:14:53 systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes...
Feb 03 16:14:53 systemd[1]: Starting modprobe@configfs.service - Load Kernel Module configfs...
Feb 03 16:14:53 systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm...
Feb 03 16:14:53 systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore...
Feb 03 16:14:53 systemd[1]: Starting modprobe@fuse.service - Load Kernel Module fuse...
Feb 03 16:14:53 systemd[1]: systemd-hibernate-clear.service - Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67).
Feb 03 16:14:53 systemd[1]: Starting systemd-journald.service - Journal Service...
Feb 03 16:14:53 systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules...
Feb 03 16:14:53 systemd[1]: Starting systemd-network-generator.service - Generate network units from Kernel command line...
Feb 03 16:14:53 systemd[1]: systemd-pcrmachine.service - TPM PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
Feb 03 16:14:53 kernel: pstore: Using crash dump compression: deflate
Feb 03 16:14:53 systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
Feb 03 16:14:53 systemd[1]: systemd-tpm2-setup-early.service - Early TPM SRK Setup was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
Feb 03 16:14:53 systemd[1]: Starting systemd-udev-load-credentials.service - Load udev Rules from Credentials...
Feb 03 16:14:53 systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices...
Feb 03 16:14:53 systemd[1]: Mounted dev-hugepages.mount - Huge Pages File System.
Feb 03 16:14:53 systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System.
Feb 03 16:14:53 systemd[1]: Mounted run-lock.mount - Legacy Locks Directory /run/lock.
Feb 03 16:14:53 systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System.
Feb 03 16:14:53 systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System.
Feb 03 16:14:53 systemd[1]: Mounted tmp.mount - Temporary Directory /tmp.
Feb 03 16:14:53 systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes.
Feb 03 16:14:53 systemd[1]: modprobe@configfs.service: Deactivated successfully.
Feb 03 16:14:53 systemd-journald[312]: Collecting audit messages is disabled.
Feb 03 16:14:53 systemd[1]: Finished modprobe@configfs.service - Load Kernel Module configfs.
Feb 03 16:14:53 systemd[1]: modprobe@drm.service: Deactivated successfully.
Feb 03 16:14:53 systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm.
Feb 03 16:14:53 systemd[1]: modprobe@fuse.service: Deactivated successfully.
Feb 03 16:14:53 systemd[1]: Finished modprobe@fuse.service - Load Kernel Module fuse.
Feb 03 16:14:53 systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules.
Feb 03 16:14:53 systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control File System...
Feb 03 16:14:53 systemd[1]: Mounting sys-kernel-config.mount - Kernel Configuration File System...
Feb 03 16:14:53 systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables...
Feb 03 16:14:53 kernel: pstore: Registered efi_pstore as persistent store backend
Feb 03 16:14:53 systemd[1]: Starting systemd-tmpfiles-setup-dev-early.service - Create Static Device Nodes in /dev gracefully...
Feb 03 16:14:53 systemd[1]: modprobe@efi_pstore.service: Deactivated successfully.
Feb 03 16:14:53 systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore.
Feb 03 16:14:53 systemd[1]: Finished systemd-network-generator.service - Generate network units from Kernel command line.
Feb 03 16:14:53 systemd[1]: Mounted sys-fs-fuse-connections.mount - FUSE Control File System.
Feb 03 16:14:53 systemd[1]: Mounted sys-kernel-config.mount - Kernel Configuration File System.
Feb 03 16:14:53 systemd[1]: Reached target network-pre.target - Preparation for Network.
Feb 03 16:14:53 systemd[1]: Finished systemd-udev-load-credentials.service - Load udev Rules from Credentials.
Feb 03 16:14:53 kernel: EXT4-fs (sda2): re-mounted d247cea6-59bc-4142-a148-d32dd20b21e9 r/w. Quota mode: none.
Feb 03 16:14:53 systemd[1]: Finished systemd-remount-fs.service - Remount Root and Kernel File Systems.
Feb 03 16:14:53 systemd[1]: Finished systemd-sysctl.service - Apply Kernel Variables.
Feb 03 16:14:53 systemd[1]: systemd-hwdb-update.service - Rebuild Hardware Database was skipped because of an unmet condition check (ConditionNeedsUpdate=/etc).
Feb 03 16:14:53 systemd[1]: systemd-pstore.service - Platform Persistent Storage Archival was skipped because of an unmet condition check (ConditionDirectoryNotEmpty=/sys/fs/pstore).
Feb 03 16:14:53 systemd[1]: Starting systemd-random-seed.service - Load/Save OS Random Seed...
Feb 03 16:14:53 systemd[1]: systemd-tpm2-setup.service - TPM SRK Setup was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
Feb 03 16:14:53 systemd[1]: Finished systemd-random-seed.service - Load/Save OS Random Seed.
Feb 03 16:14:53 systemd[1]: Finished systemd-tmpfiles-setup-dev-early.service - Create Static Device Nodes in /dev gracefully.
Feb 03 16:14:53 systemd[1]: systemd-sysusers.service - Create System Users was skipped because no trigger condition checks were met.
Feb 03 16:14:53 systemd[1]: Starting systemd-resolved.service - Network Name Resolution...
Feb 03 16:14:53 systemd[1]: Starting systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in /dev...
Feb 03 16:14:53 systemd[1]: Started systemd-journald.service - Journal Service.
Feb 03 16:14:53 systemd-journald[312]: Received client request to flush runtime journal.
Feb 03 16:14:53 kernel: sd 0:0:0:1: Attached scsi generic sg0 type 0
Feb 03 16:14:53 kernel: input: QEMU Virtio Keyboard as /devices/pci0000:00/0000:00:01.0/0000:01:00.2/virtio2/input/input5
Feb 03 16:14:53 kernel: NET: Registered PF_VSOCK protocol family
Feb 03 16:14:54 kernel: cfg80211: Loading compiled-in X.509 certificates for regulatory database
Feb 03 16:14:54 kernel: Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf'
Feb 03 16:14:54 kernel: Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
Feb 03 16:14:54 kernel: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
Feb 03 16:14:54 kernel: Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
Feb 03 16:14:54 kernel: platform regulatory.0: firmware: failed to load regulatory.db (-2)
Feb 03 16:14:54 kernel: platform regulatory.0: firmware: failed to load regulatory.db (-2)
Feb 03 16:14:54 kernel: platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
Feb 03 16:14:54 kernel: cfg80211: failed to load regulatory.db
Feb 03 16:14:54 kernel: input: QEMU Virtio Tablet as /devices/pci0000:00/0000:00:01.0/0000:01:00.3/virtio3/input/input6
Feb 03 16:14:54 kernel: netfs: FS-Cache loaded
Feb 03 16:14:54 kernel: input: PC Speaker as /devices/platform/pcspkr/input/input7
Feb 03 16:14:54 kernel: iTCO_vendor_support: vendor-support=0
Feb 03 16:14:54 kernel: iTCO_wdt iTCO_wdt.1.auto: Found a ICH9 TCO device (Version=2, TCOBASE=0x0660)
Feb 03 16:14:54 kernel: iTCO_wdt iTCO_wdt.1.auto: initialized. heartbeat=30 sec (nowayout=0)
Feb 03 16:14:54 kernel: 9pnet: Installing 9P2000 support
Feb 03 16:14:54 kernel: FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Feb 03 16:14:54 kernel: 9p: Installing v9fs 9p2000 file system support
Feb 03 16:14:54 kernel: RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 10737418240 ms ovfl timer
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.480:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=435 comm="apparmor_parser"
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.488:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=443 comm="apparmor_parser"
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.488:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=443 comm="apparmor_parser"
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.492:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lxc-container-default" pid=436 comm="apparmor_parser"
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.492:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lxc-container-default-cgns" pid=436 comm="apparmor_parser"
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.492:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lxc-container-default-with-mounting" pid=436 comm="apparmor_parser"
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.492:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lxc-container-default-with-nesting" pid=436 comm="apparmor_parser"
Feb 03 16:14:54 kernel: cryptd: max_cpu_qlen set to 1000
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.500:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/lxc-copy" pid=446 comm="apparmor_parser"
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.508:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/lxc-start" pid=448 comm="apparmor_parser"
Feb 03 16:14:54 kernel: audit: type=1400 audit(1738599294.512:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=445 comm="apparmor_parser"
Feb 03 16:14:54 kernel: AES CTR mode by8 optimization enabled
Feb 03 16:14:55 kernel: bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
::endgroup::
==> Cleaning up
==> Killing Incus at /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/tzp (4451)
==> Deleting all containers
==> Deleting all images
==> Deleting all profiles
Error: The "default" profile cannot be deleted
==> Deleting all managed networks
==> Clearing config of default profile
==> Deleting all storage pools
Storage pool incustest-tzp deleted
==> Checking for locked DB tables
==> Checking for leftover files
==> Checking for leftover DB entries
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
Error: in prepare, disk I/O error (10)
==> Tearing down directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/tzp
==> Killing Incus at /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3 (4954)
==> Deleting all containers
==> Deleting all images
==> Deleting all profiles
Error: The "default" profile cannot be deleted
==> Deleting all managed networks
==> Clearing config of default profile
==> Deleting all storage pools
Storage pool incustest-Oe3 deleted
==> Checking for locked DB tables
==> Checking for leftover files
==> Checking for leftover DB entries
==> Tearing down directory backend in /home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3
rm: cannot remove '/home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3/database/global': Device or resource busy
rm: cannot remove '/home/user/Desktop/code/github-irhndt/incus/test/tmp.Gyj/Oe3/database/global': Device or resource busy

It requires incus and incusd to be found within the $PATH.

Normally that happens mostly naturally as Go developers usually put ~/go/bin/ in their $PATH which then gets picked up by sudo -E.

Hi, thank you for the reply. I understood the above however having /home/user/go/bin in PATH in conjunction of using sudo -E still don’t work as far as I understand even with -E sudo does not look into the user updated path, in fact I can’t even run sudo -E incus, however I made my way around simply by adding built binaries to a global path. (This is weird because if I do a sudo -E env I get the correct path)

However the point is the real errors I keep having are not linked to those PATH issues as far as my knowledge goes. Here is a clearer log:

sudo -E ./main.sh
==> Checking for dependencies
==> Available storage backends: dir btrfs lvm
==> Using storage backend dir
==> Setting up directory backend in /home/developer/code/incus/test/tmp.Lps/ilI
==> Spawning incusd in /home/developer/code/incus/test/tmp.Lps/ilI
==> Spawned Incus (PID is 238406)
==> Confirming incusd is responsive (PID is 238406)
If this is your first time running Incus on this machine, you should also run: incus admin init

==> Binding to network
==> Bound to 127.0.0.1:51049
==> Setting up networking
Device eth0 added to default
==> Configuring storage backend
==> Configuring directory backend in /home/developer/code/incus/test/tmp.Lps/ilI
Storage pool incustest-ilI created
Device root added to default
==> TEST BEGIN: checking dependencies
ldd: ./incus: No such file or directory
==> TEST DONE: checking dependencies (0s)
==> TEST BEGIN: database restore
==> Setting up directory backend in /home/developer/code/incus/test/tmp.Lps/NRS
==> Spawning incusd in /home/developer/code/incus/test/tmp.Lps/NRS
==> Spawned Incus (PID is 238533)
==> Confirming incusd is responsive (PID is 238533)
==> Binding to network
==> Bound to 127.0.0.1:47127
==> Setting up networking
Device eth0 added to default
==> Configuring storage backend
==> Configuring directory backend in /home/developer/code/incus/test/tmp.Lps/NRS
Storage pool incustest-NRS created
Device root added to default
==> Shutting down Incus at /home/developer/code/incus/test/tmp.Lps/NRS (238533)
ERROR  [2025-02-07T09:00:27Z] Failed updating instance types                err="context canceled"
WARNING[2025-02-07T09:00:27Z] Failed to update instance types: Get "https://images.linuxcontainers.org/meta/instance-types/aws.yaml": context canceled 
ERROR  [2025-02-07T09:00:28Z] Failed to start the daemon                    err="Failed to initialize global database: failed to ensure schema: failed to execute queries from /home/developer/code/incus/test/tmp.Lps/NRS/database/patch.global.sql: no such table: broken"
Error: Failed to initialize global database: failed to ensure schema: failed to execute queries from /home/developer/code/incus/test/tmp.Lps/NRS/database/patch.global.sql: no such table: broken
==> Spawning incusd in /home/developer/code/incus/test/tmp.Lps/NRS
==> Spawned Incus (PID is 238707)
==> Confirming incusd is responsive (PID is 238707)
==> Killing Incus at /home/developer/code/incus/test/tmp.Lps/NRS (238707)
==> Deleting all containers
==> Deleting all images
==> Deleting all profiles
Error: The "default" profile cannot be deleted
==> Deleting all managed networks
==> Clearing config of default profile
==> Deleting all storage pools
Storage pool incustest-NRS deleted
==> Checking for locked DB tables
WARNING[2025-02-07T09:00:29Z] Failed to update instance types: Get "https://images.linuxcontainers.org/meta/instance-types/.yaml": context canceled 
ERROR  [2025-02-07T09:00:29Z] Failed updating instance types                err="context canceled"
==> Checking for leftover files
==> Checking for leftover DB entries
==> Tearing down directory backend in /home/developer/code/incus/test/tmp.Lps/NRS
==> TEST DONE: database restore (5s)
==> TEST BEGIN: database out of disk space
51200+0 records in
51200+0 records out
52428800 bytes (52 MB, 50 MiB) copied, 0.08205 s, 639 MB/s
==> Setting up directory backend in /home/developer/code/incus/test/tmp.Lps/hTR
==> Spawning incusd in /home/developer/code/incus/test/tmp.Lps/hTR
==> Spawned Incus (PID is 238959)
==> Confirming incusd is responsive (PID is 238959)
==> Binding to network
==> Bound to 127.0.0.1:47245
==> Setting up networking
Device eth0 added to default
==> Configuring storage backend
==> Configuring directory backend in /home/developer/code/incus/test/tmp.Lps/hTR
Storage pool incustest-hTR created
Device root added to default
The testsuite requires /bin/busybox to be a static binary

df -h output:
Filesystem                       Size  Used Avail Use% Mounted on
udev                              16G     0   16G   0% /dev
tmpfs                            3.2G  1.4M  3.2G   1% /run
/dev/mapper/nexus--dev--vg-root   23G  6.6G   16G  31% /
tmpfs                             16G   23M   16G   1% /dev/shm
efivarfs                         128K   91K   33K  74% /sys/firmware/efi/efivars
tmpfs                            5.0M   12K  5.0M   1% /run/lock
tmpfs                            1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
tmpfs                            1.0M     0  1.0M   0% /run/credentials/systemd-cryptsetup@sda3_crypt.service
/dev/sda2                        456M  209M  223M  49% /boot
/dev/mapper/nexus--dev--vg-tmp   1.8G  3.2M  1.7G   1% /tmp
/dev/mapper/nexus--dev--vg-var   9.1G  367M  8.3G   5% /var
/dev/mapper/nexus--dev--vg-home  433G  2.2G  409G   1% /home
/dev/sda1                        511M  4.4M  507M   1% /boot/efi
tmpfs                            1.0M     0  1.0M   0% /run/credentials/getty@tty1.service
tmpfs                            3.2G  2.8M  3.2G   1% /run/user/1000
none                              16G     0   16G   0% /home/developer/code/incus/test/tmp.Lps/dev
tmpfs                            100K     0  100K   0% /home/developer/code/incus/test/tmp.Lps/ilI/shmounts
tmpfs                            100K     0  100K   0% /home/developer/code/incus/test/tmp.Lps/ilI/guestapi
tmpfs                             64M   59M  6.0M  91% /home/developer/code/incus/test/tmp.Lps/hTR/database/global
tmpfs                            100K     0  100K   0% /home/developer/code/incus/test/tmp.Lps/hTR/shmounts
tmpfs                            100K     0  100K   0% /home/developer/code/incus/test/tmp.Lps/hTR/guestapi
::group::dmesg logs
Feb 06 15:37:53 kernel: audit: type=1400 audit(1738856273.802:31): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/bin/lxc-copy" pid=42054 comm="apparmor_parser"
Feb 06 15:37:53 kernel: audit: type=1400 audit(1738856273.810:32): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/bin/lxc-start" pid=42058 comm="apparmor_parser"
Feb 06 15:37:53 kernel: audit: type=1400 audit(1738856273.826:33): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="lxc-container-default" pid=42062 comm="apparmor_parser"
Feb 06 15:37:53 kernel: audit: type=1400 audit(1738856273.826:34): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="lxc-container-default-cgns" pid=42062 comm="apparmor_parser"
Feb 06 15:37:53 kernel: audit: type=1400 audit(1738856273.826:35): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="lxc-container-default-with-mounting" pid=42062 comm="apparmor_parser"
Feb 06 15:37:53 kernel: audit: type=1400 audit(1738856273.826:36): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="lxc-container-default-with-nesting" pid=42062 comm="apparmor_parser"
Feb 06 21:49:13 kernel: perf: interrupt took too long (2517 > 2500), lowering kernel.perf_event_max_sample_rate to 79250
Feb 07 03:12:28 kernel: perf: interrupt took too long (3227 > 3146), lowering kernel.perf_event_max_sample_rate to 61750
Feb 07 06:39:41 kernel: PM: suspend entry (deep)
Feb 07 08:56:41 kernel: Filesystems sync: 0.021 seconds
Feb 07 08:56:41 kernel: Freezing user space processes
Feb 07 08:56:41 kernel: Freezing user space processes completed (elapsed 0.001 seconds)
Feb 07 08:56:41 kernel: OOM killer disabled.
Feb 07 08:56:41 kernel: Freezing remaining freezable tasks
Feb 07 08:56:41 kernel: Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Feb 07 08:56:41 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Feb 07 08:56:41 kernel: sd 1:0:0:0: [sda] Synchronizing SCSI cache
Feb 07 08:56:41 kernel: ata2.00: Entering standby power mode
Feb 07 08:56:41 kernel: ACPI: EC: interrupt blocked
Feb 07 08:56:41 kernel: ACPI: PM: Preparing to enter system sleep state S3
Feb 07 08:56:41 kernel: ACPI: EC: event blocked
Feb 07 08:56:41 kernel: ACPI: EC: EC stopped
Feb 07 08:56:41 kernel: ACPI: PM: Saving platform NVS memory
Feb 07 08:56:41 kernel: Disabling non-boot CPUs ...
Feb 07 08:56:41 kernel: smpboot: CPU 7 is now offline
Feb 07 08:56:41 kernel: smpboot: CPU 6 is now offline
Feb 07 08:56:41 kernel: smpboot: CPU 5 is now offline
Feb 07 08:56:41 kernel: smpboot: CPU 4 is now offline
Feb 07 08:56:41 kernel: smpboot: CPU 3 is now offline
Feb 07 08:56:41 kernel: smpboot: CPU 2 is now offline
Feb 07 08:56:41 kernel: smpboot: CPU 1 is now offline
Feb 07 08:56:41 kernel: ACPI: PM: Low-level resume complete
Feb 07 08:56:41 kernel: ACPI: EC: EC started
Feb 07 08:56:41 kernel: ACPI: PM: Restoring platform NVS memory
Feb 07 08:56:41 kernel: Enabling non-boot CPUs ...
Feb 07 08:56:41 kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
Feb 07 08:56:41 kernel: CPU1 is up
Feb 07 08:56:41 kernel: smpboot: Booting Node 0 Processor 2 APIC 0x4
Feb 07 08:56:41 kernel: CPU2 is up
Feb 07 08:56:41 kernel: smpboot: Booting Node 0 Processor 3 APIC 0x6
Feb 07 08:56:41 kernel: CPU3 is up
Feb 07 08:56:41 kernel: smpboot: Booting Node 0 Processor 4 APIC 0x1
Feb 07 08:56:41 kernel: CPU4 is up
Feb 07 08:56:41 kernel: smpboot: Booting Node 0 Processor 5 APIC 0x3
Feb 07 08:56:41 kernel: CPU5 is up
Feb 07 08:56:41 kernel: smpboot: Booting Node 0 Processor 6 APIC 0x5
Feb 07 08:56:41 kernel: CPU6 is up
Feb 07 08:56:41 kernel: smpboot: Booting Node 0 Processor 7 APIC 0x7
Feb 07 08:56:41 kernel: CPU7 is up
Feb 07 08:56:41 kernel: ACPI: PM: Waking up from system sleep state S3
Feb 07 08:56:41 kernel: ACPI: EC: interrupt unblocked
Feb 07 08:56:41 kernel: ACPI: EC: event unblocked
Feb 07 08:56:41 kernel: usb usb1: root hub lost power or was reset
Feb 07 08:56:41 kernel: xhci_hcd 0000:00:14.0: xHC error in resume, USBSTS 0x401, Reinit
Feb 07 08:56:41 kernel: usb usb3: root hub lost power or was reset
Feb 07 08:56:41 kernel: usb usb4: root hub lost power or was reset
Feb 07 08:56:41 kernel: ath: phy0: ASPM enabled: 0x42
Feb 07 08:56:41 kernel: usb usb2: root hub lost power or was reset
Feb 07 08:56:41 kernel: mei_me 0000:00:16.0: FW not ready: resetting: dev_state = 1
Feb 07 08:56:41 kernel: mei_me 0000:00:16.0: unexpected reset: dev_state = INIT_CLIENTS fw status = 1E000045 60000106 
Feb 07 08:56:41 kernel: usb 2-1: reset high-speed USB device number 2 using ehci-pci
Feb 07 08:56:41 kernel: usb 1-1: reset high-speed USB device number 2 using ehci-pci
Feb 07 08:56:41 kernel: ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Feb 07 08:56:41 kernel: ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Feb 07 08:56:41 kernel: ata2.00: ACPI cmd f5/00:00:00:00:00:a0(SECURITY FREEZE LOCK) filtered out
Feb 07 08:56:41 kernel: ata2.00: ACPI cmd ef/10:03:00:00:00:a0(SET FEATURES) filtered out
Feb 07 08:56:41 kernel: sd 1:0:0:0: [sda] Starting disk
Feb 07 08:56:41 kernel: ata2.00: ACPI cmd f5/00:00:00:00:00:a0(SECURITY FREEZE LOCK) filtered out
Feb 07 08:56:41 kernel: ata2.00: ACPI cmd ef/10:03:00:00:00:a0(SET FEATURES) filtered out
Feb 07 08:56:41 kernel: ata3.00: ACPI cmd ef/10:03:00:00:00:a0(SET FEATURES) filtered out
Feb 07 08:56:41 kernel: ata2.00: configured for UDMA/100
Feb 07 08:56:41 kernel: ata3.00: ACPI cmd ef/10:03:00:00:00:a0(SET FEATURES) filtered out
Feb 07 08:56:41 kernel: ata3.00: configured for UDMA/133
Feb 07 08:56:41 kernel: usb 1-1.3: reset high-speed USB device number 4 using ehci-pci
Feb 07 08:56:41 kernel: usb 1-1.1: reset full-speed USB device number 3 using ehci-pci
Feb 07 08:56:41 kernel: usb 1-1.1: device firmware changed
Feb 07 08:56:41 kernel: OOM killer enabled.
Feb 07 08:56:41 kernel: Restarting tasks ... 
Feb 07 08:56:41 kernel: usb 1-1.1: USB disconnect, device number 3
Feb 07 08:56:41 kernel: done.
Feb 07 08:56:41 kernel: random: crng reseeded on system resumption
Feb 07 08:56:41 kernel: usb 1-1.1: new full-speed USB device number 5 using ehci-pci
Feb 07 08:56:41 kernel: PM: suspend exit
Feb 07 08:56:41 kernel: usb 1-1.1: New USB device found, idVendor=13d3, idProduct=3362, bcdDevice= 0.01
Feb 07 08:56:41 kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 07 08:56:41 kernel: usb 1-1.1: Product: Bluetooth USB Host Controller
Feb 07 08:56:41 kernel: usb 1-1.1: Manufacturer: Atheros Communications
Feb 07 08:56:41 kernel: usb 1-1.1: SerialNumber: Alaska Day 2006
Feb 07 08:56:41 kernel: usb 1-1.1: Failed to access otp area (-32)
Feb 07 08:56:41 kernel: usb 1-1.1: USB disconnect, device number 5
Feb 07 08:56:41 kernel: usb 1-1.1: new full-speed USB device number 6 using ehci-pci
Feb 07 08:56:42 kernel: atl1c 0000:04:00.0: atl1c: enp4s0 NIC Link is Up<1000 Mbps Full Duplex>
Feb 07 08:56:46 kernel: usb 1-1.1: New USB device found, idVendor=13d3, idProduct=3362, bcdDevice= 0.02
Feb 07 08:56:46 kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 07 08:56:46 kernel: usb 1-1.1: Product: Bluetooth USB Host Controller
Feb 07 08:56:46 kernel: usb 1-1.1: Manufacturer: Atheros Communications
Feb 07 08:56:46 kernel: usb 1-1.1: SerialNumber: Alaska Day 2006
Feb 07 08:56:46 kernel: Bluetooth: MGMT ver 1.23
Feb 07 08:57:09 kernel: NET: Registered PF_VSOCK protocol family
Feb 07 08:57:09 kernel: kvm_intel: L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details.
::endgroup::
==> Cleaning up
==> Killing Incus at /home/developer/code/incus/test/tmp.Lps/ilI (238406)
==> Deleting all containers
==> Deleting all images
==> Deleting all profiles
Error: The "default" profile cannot be deleted
==> Deleting all managed networks
==> Clearing config of default profile
==> Deleting all storage pools
Storage pool incustest-ilI deleted
==> Checking for locked DB tables
==> Checking for leftover files
==> Checking for leftover DB entries
==> Tearing down directory backend in /home/developer/code/incus/test/tmp.Lps/ilI
==> Killing Incus at /home/developer/code/incus/test/tmp.Lps/hTR (238959)
==> Deleting all containers
==> Deleting all images
==> Deleting all profiles
Error: The "default" profile cannot be deleted
==> Deleting all managed networks
==> Clearing config of default profile
==> Deleting all storage pools
Storage pool incustest-hTR deleted
==> Checking for locked DB tables
==> Checking for leftover files
==> Checking for leftover DB entries
==> Tearing down directory backend in /home/developer/code/incus/test/tmp.Lps/hTR
rm: cannot remove '/home/developer/code/incus/test/tmp.Lps/hTR/database/global': Device or resource busy
rm: cannot remove '/home/developer/code/incus/test/tmp.Lps/hTR/database/global': Device or resource busy


==> TEST DONE: database out of disk space
==> Test result: failure

Also I don’t get this line, the only place I have found a call to ldd is in test/suites/deps.sh and effectively ldd cannot find liblxc in incus:
ldd: ./incus: No such file or directory

You may want to do this in two steps:

  • sudo -E -s
  • ./test.sh

This will make it easier to check/fix the environment prior to calling test.sh.

Here my go to is:

  • sudo -E -s
  • INCUS_TMPFS=1 ./main.sh

The tmpfs is useful to keep everything nice and clean, especially on test failures :slight_smile: