Message ID | 20200901195405.32162-1-ibr@radix50.net |
---|---|
State | Accepted, archived |
Headers | show |
Series | None | expand |
On Wednesday, September 2, 2020 at 1:24:13 AM UTC+5:30 i...@radix50.net wrote: > From: Henning Schild <henning...@siemens.com> > > Signed-off-by: Henning Schild <henning...@siemens.com> > --- > scripts/ci_build.sh | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh > index d2c707b..af996d1 100755 > --- a/scripts/ci_build.sh > +++ b/scripts/ci_build.sh > @@ -212,3 +212,15 @@ echo -e "do_fetch_append() {\n\n}" >> > "${ISARROOT}/meta/classes/dpkg-base.bbclas > bitbake $BB_ARGS mc:qemuamd64-stretch:isar-image-base > > mv "${ISARROOT}/meta/classes/dpkg-base.bbclass.ci-backup" > "${ISARROOT}/meta/classes/dpkg-base.bbclass" > + > +# Test wic --exclude-path > +cp -a "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" > > +mv > ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img > \ > + > ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img.ci-backup > > +sed -i -e 's/part \/ /part \/ --exclude-path usr /g' > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" > + > +bitbake $BB_ARGS mc:qemuamd64-stretch:isar-image-base > + > +mv > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" > +mv > ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img.ci-backup > \ > + > ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img > > The only problem I see is the CI actually doesnot validate the image to see if /usr is excluded. It validates the code-path for errors but doesnot validate the feature itself. We could mount and check though. Once the new wic is integrated this should be easy with the "wic ls" feature. We could list the contents of the partition using "wic ls" and validate if /usr is excluded. Thanks, Vijai Kumar K
Baurzhan, thanks for the proposed fix. Looks like you got the idea that this one was supposed to only test wic, not "bootable". If you think that still makes sense we can keep it, we could also go to "wic ls". We could also add a wks file that excludes /var and turns it into a partition on its own. That would test the exclude, be bootable, and be a good example. I would actually opt for that or for dropping the testcase alltogether. Henning Am Tue, 1 Sep 2020 22:30:30 -0700 (PDT) schrieb "vijaikumar....@gmail.com" <vijaikumar.kanagarajan@gmail.com>: > On Wednesday, September 2, 2020 at 1:24:13 AM UTC+5:30 > i...@radix50.net wrote: > > > From: Henning Schild <henning...@siemens.com> > > > > Signed-off-by: Henning Schild <henning...@siemens.com> > > --- > > scripts/ci_build.sh | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh > > index d2c707b..af996d1 100755 > > --- a/scripts/ci_build.sh > > +++ b/scripts/ci_build.sh > > @@ -212,3 +212,15 @@ echo -e "do_fetch_append() {\n\n}" >> > > "${ISARROOT}/meta/classes/dpkg-base.bbclas > > bitbake $BB_ARGS mc:qemuamd64-stretch:isar-image-base > > > > mv "${ISARROOT}/meta/classes/dpkg-base.bbclass.ci-backup" > > "${ISARROOT}/meta/classes/dpkg-base.bbclass" > > + > > +# Test wic --exclude-path > > +cp -a > > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" > > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" > > > > +mv > > ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img > > \ > > + > > ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img.ci-backup > > > > +sed -i -e 's/part \/ /part \/ --exclude-path usr /g' > > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" > > + > > +bitbake $BB_ARGS mc:qemuamd64-stretch:isar-image-base > > + > > +mv > > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" > > "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" > > +mv > > ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img.ci-backup > > \ > > + > > ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img > > > > > > The only problem I see is the CI actually doesnot validate the image > to see if /usr is excluded. It validates the code-path for errors but > doesnot validate the feature itself. We could mount and check though. > Once the new wic is integrated this should be easy with the "wic ls" > feature. We could list the contents of the partition using > "wic ls" and validate if /usr is excluded. > > Thanks, > Vijai Kumar K >
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh index d2c707b..af996d1 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -212,3 +212,15 @@ echo -e "do_fetch_append() {\n\n}" >> "${ISARROOT}/meta/classes/dpkg-base.bbclas bitbake $BB_ARGS mc:qemuamd64-stretch:isar-image-base mv "${ISARROOT}/meta/classes/dpkg-base.bbclass.ci-backup" "${ISARROOT}/meta/classes/dpkg-base.bbclass" + +# Test wic --exclude-path +cp -a "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" +mv ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img \ + ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img.ci-backup +sed -i -e 's/part \/ /part \/ --exclude-path usr /g' "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" + +bitbake $BB_ARGS mc:qemuamd64-stretch:isar-image-base + +mv "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" +mv ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img.ci-backup \ + ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img