Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ jobs:
sudo chroot $CHROOT apt install -y livecd-rootfs snapcraft
sudo cp -a Makefile snapcraft.yaml hooks live-build extra-files $CHROOT/build
sudo chroot $CHROOT sh -c 'mount -t proc proc /proc; mount -t sysfs sys /sys; cd build; snapcraft'
# basic smoke testing
unsquashfs -ll core*.snap | grep /usr/lib/snapd/snapd$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need the $ at the end of the line? Also I feel like a more efficient way to check this is:

Suggested change
unsquashfs -ll core*.snap | grep /usr/lib/snapd/snapd$
unsquashfs -ll core*.snap /usr/lib/snapd/snapd | grep /usr/lib/snapd/snapd

otherwise grep will check every single file in the snap

Copy link

@mardy mardy Aug 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $ ensures that the test will fail if the snapd binary is replaced by a directory (like /usr/lib/snapd/snapd/foo), which is highly unlikely but it still makes the test more robust, so I'd vote for keeping it. Your suggestion about limiting the filtering in unsquashfs itself is also good.