diff mbox series

[isar-cip-core,v1,2/3] rules.tmpl: Make ltp rules file as template to make installation path configurable

Message ID 20250203115321.3589084-3-Sai.Sathujoda@toshiba-tsip.com (mailing list archive)
State New
Headers show
Series Make LTP installation path configurable | expand

Commit Message

Sai.Sathujoda@toshiba-tsip.com Feb. 3, 2025, 11:53 a.m. UTC
From: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>

Signed-off-by: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>
---
 recipes-core/ltp/files/debian/{rules => rules.tmpl} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename recipes-core/ltp/files/debian/{rules => rules.tmpl} (80%)

Comments

Jan Kiszka Feb. 4, 2025, 1:21 p.m. UTC | #1
On 03.02.25 12:53, Sai.Sathujoda@toshiba-tsip.com wrote:
> From: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>
> 
> Signed-off-by: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>
> ---
>  recipes-core/ltp/files/debian/{rules => rules.tmpl} | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>  rename recipes-core/ltp/files/debian/{rules => rules.tmpl} (80%)
> 
> diff --git a/recipes-core/ltp/files/debian/rules b/recipes-core/ltp/files/debian/rules.tmpl
> similarity index 80%
> rename from recipes-core/ltp/files/debian/rules
> rename to recipes-core/ltp/files/debian/rules.tmpl
> index 06b9070..918b443 100755
> --- a/recipes-core/ltp/files/debian/rules
> +++ b/recipes-core/ltp/files/debian/rules.tmpl
> @@ -1,7 +1,7 @@
>  #!/usr/bin/make -f
>  export DEB_CFLAGS_MAINT_APPEND  = -Wall  -Wno-format-security
>  
> -LTP_CONFIGURE_FLAGS = --prefix=/opt/ltp
> +LTP_CONFIGURE_FLAGS = --prefix=${LTP_INSTALL_PATH}
>  

Missing default value for LTP_INSTALL_PATH - comes with patch 3. The
whole series is in inverse order, in fact.

But making this a build-time configuration will mean that there might be
two binary packages called "ltp-full" that are actually not the same
anymore. Can't we select a path that is writable for all our images? Or,
even better, can't we fix ltp to separate installation from workdir?
BTW, does it matter where this workdir is located, on persistent storage
or on tmpfs?

Jan
Sai.Sathujoda@toshiba-tsip.com Feb. 5, 2025, 1:22 p.m. UTC | #2
Hi Jan,

We did not want to touch the install path being /opt/ltp in all our test images except the case where the security image comes in to picture.

To answer your question about fixing ltp to separate installation from workdir,  I believe the LTPROOT variable is basically the install path in runltp<https://github.com/linux-test-project/ltp/blob/master/runltp> script and in many areas, it works from the install path to access test scripts and create results there. So, I think configuring the install path in our recipes during build time can help us handle our read-only rootfs case.
Since the workdir is basically the install path, ltp installed on tmpfs is cleared out after boot.

Please correct me if I am wrong. After your confirmation I will re-order the v1 patches and send v2.

Thanks and regards,
Sai Ashrith
Jan Kiszka Feb. 7, 2025, 10:07 a.m. UTC | #3
On 05.02.25 14:22, Sai.Sathujoda@toshiba-tsip.com wrote:
> Hi Jan,
> 
> We did not want to touch the install path being* /opt/ltp *in all our
> test images except the case where the security image comes in to picture.
> 
> To answer your question about fixing ltp to separate installation from
> workdir,  I believe the LTPROOT variable is basically the install path
> in runltp <https://github.com/linux-test-project/ltp/blob/master/
> runltp> script and in many areas, it works from the install path to
> access test scripts and create results there. So, I think configuring
> the install path in our recipes during build time can help us handle our
> read-only rootfs case.
> Since the workdir is basically the install path, ltp installed on tmpfs
> is cleared out after boot. 

It looks to me like you can customize the output folders via various
command line options when calling ltp (-g, -l, -C, -T, ...). If that
becomes too unhandy or if the script is not consistent in this regard,
we could package LTPROOT/output and LTPROOT/result as link to a writable
folders.

Jan

> 
> Please correct me if I am wrong. After your confirmation I will re-order
> the v1 patches and send v2.
> 
> Thanks and regards,
> Sai Ashrith
> 
> 
> ------------------------------------------------------------------------
> *From:* Jan Kiszka <jan.kiszka@siemens.com>
> *Sent:* Tuesday, February 4, 2025 6:51 PM
> *To:* ashrith sai(TSIP) <Sai.Sathujoda@toshiba-tsip.com>; cip-
> dev@lists.cip-project.org <cip-dev@lists.cip-project.org>
> *Cc:* dinesh kumar(TSIP TMIEC ODG Porting) <dinesh.kumar@toshiba-
> tsip.com>; hayashi kazuhiro(林 和宏 DME ○DIG□MPS○MP4)
> <kazuhiro3.hayashi@toshiba.co.jp>
> *Subject:* Re: [isar-cip-core v1 2/3] rules.tmpl: Make ltp rules file as
> template to make installation path configurable
>  
> On 03.02.25 12:53, Sai.Sathujoda@toshiba-tsip.com wrote:
>> From: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>
>> 
>> Signed-off-by: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>
>> ---
>>  recipes-core/ltp/files/debian/{rules => rules.tmpl} | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>  rename recipes-core/ltp/files/debian/{rules => rules.tmpl} (80%)
>> 
>> diff --git a/recipes-core/ltp/files/debian/rules b/recipes-core/ltp/files/debian/rules.tmpl
>> similarity index 80%
>> rename from recipes-core/ltp/files/debian/rules
>> rename to recipes-core/ltp/files/debian/rules.tmpl
>> index 06b9070..918b443 100755
>> --- a/recipes-core/ltp/files/debian/rules
>> +++ b/recipes-core/ltp/files/debian/rules.tmpl
>> @@ -1,7 +1,7 @@
>>  #!/usr/bin/make -f
>>  export DEB_CFLAGS_MAINT_APPEND  = -Wall  -Wno-format-security
>>  
>> -LTP_CONFIGURE_FLAGS = --prefix=/opt/ltp
>> +LTP_CONFIGURE_FLAGS = --prefix=${LTP_INSTALL_PATH}
>>  
> 
> Missing default value for LTP_INSTALL_PATH - comes with patch 3. The
> whole series is in inverse order, in fact.
> 
> But making this a build-time configuration will mean that there might be
> two binary packages called "ltp-full" that are actually not the same
> anymore. Can't we select a path that is writable for all our images? Or,
> even better, can't we fix ltp to separate installation from workdir?
> BTW, does it matter where this workdir is located, on persistent storage
> or on tmpfs?
> 
> Jan
> 
> -- 
> Siemens AG, Foundational Technologies
> Linux Expert Center
diff mbox series

Patch

diff --git a/recipes-core/ltp/files/debian/rules b/recipes-core/ltp/files/debian/rules.tmpl
similarity index 80%
rename from recipes-core/ltp/files/debian/rules
rename to recipes-core/ltp/files/debian/rules.tmpl
index 06b9070..918b443 100755
--- a/recipes-core/ltp/files/debian/rules
+++ b/recipes-core/ltp/files/debian/rules.tmpl
@@ -1,7 +1,7 @@ 
 #!/usr/bin/make -f
 export DEB_CFLAGS_MAINT_APPEND  = -Wall  -Wno-format-security
 
-LTP_CONFIGURE_FLAGS = --prefix=/opt/ltp
+LTP_CONFIGURE_FLAGS = --prefix=${LTP_INSTALL_PATH}
 
 %:
 	dh $@  --with autoreconf