From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: Uladzimir Bely <ubely@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH] ci: Add test cases for container fetching and loading
Date: Mon, 5 Aug 2024 12:43:40 +0200 [thread overview]
Message-ID: <ce0765f1-5202-48f8-a496-765cb2eca9a8@siemens.com> (raw)
In-Reply-To: <e13246ee69f545d47edc49c571a7c340ed76a4a1.camel@ilbers.de>
On 05.08.24 11:40, Uladzimir Bely wrote:
> On Mon, 2024-08-05 at 11:17 +0200, Jan Kiszka wrote:
>> On 05.08.24 09:16, Uladzimir Bely wrote:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> This plugs the two example recipes for loading container images
>>> into
>>> VM-based testing. The test consists of running 'true' in the
>>> installed
>>> alpine images.
>>>
>>> Rather than enabling the ci user to do password-less sudo, this
>>> uses su
>>> with the piped-in password. Another trick needed is to poll for the
>>> images because loading is performed asynchronously.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
>>> ---
>>> .../recipes-core/images/isar-image-ci.bb | 2 ++
>>> testsuite/citest.py | 24
>>> +++++++++++++++++++
>>> 2 files changed, 26 insertions(+)
>>>
>>> This is a drop-in replacement of patch 4 from "[PATCH v4 0/5]
>>> Introduce
>>> container fetcher and pre-loader" series:
>>> - Fixed syntax errors (incorrectly escaped '\$')
>>
>> IIRC, we do need the escape inside the shell (sh -c '...'). So, you
>> likely rather need to escape the escape character.
>>
>> Jan
>>
>>>
>
> I just tried to make a simple check:
>
> ```
> $ su -c 'for i in $(seq 3); do echo $i; done'
> Password:
> 1
> 2
> 3
>
> $ su -c 'for i in \$(seq 3); do echo $i; done'
> Password:
> bash: -c: line 1: syntax error near unexpected token `('
> bash: -c: line 1: `for i in \$(seq 3); do echo $i; done'
>
> $ su -c 'for i in \\$(seq 3); do echo $i; done'
> Password:
> \1
> 2
> 3
> ```
>
> We are likely don't need escaping at all.
Interesting - anyway, if this sequence is not properly resolved, the
test will fail. And I assume you had it running successfully, so we must
be fine.
>
> Anyway, we could just convert the tests from "cmd=<long_command"
> to "script=test_prebuild_container.sh" and have test logic in a human-
> readable form.
>
Also fine with me.
Jan
--
Siemens AG, Technology
Linux Expert Center
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/ce0765f1-5202-48f8-a496-765cb2eca9a8%40siemens.com.
next prev parent reply other threads:[~2024-08-05 10:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 7:16 Uladzimir Bely
2024-08-05 9:17 ` 'Jan Kiszka' via isar-users
2024-08-05 9:40 ` Uladzimir Bely
2024-08-05 10:43 ` 'Jan Kiszka' via isar-users [this message]
2024-08-05 10:51 ` Uladzimir Bely
2024-08-06 4:48 ` Uladzimir Bely
2024-08-06 9:48 ` Uladzimir Bely
2024-08-06 10:46 ` 'Jan Kiszka' via isar-users
2024-08-06 10:54 ` Uladzimir Bely
2024-08-06 15:16 ` Uladzimir Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce0765f1-5202-48f8-a496-765cb2eca9a8@siemens.com \
--to=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=ubely@ilbers.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox