Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V1] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
@ 2023-04-26  6:31 qiutt
  2023-04-26  9:23 ` [OE-core] " Luca Ceresoli
       [not found] ` <175971C08FC40A4D.699@lists.openembedded.org>
  0 siblings, 2 replies; 4+ messages in thread
From: qiutt @ 2023-04-26  6:31 UTC (permalink / raw)
  To: qiutt, openembedded-core; +Cc: fnstml-fujitsuten

From: Qiu Tingting <qiutt@fujitsu.com>

When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
in test_script and test_one scripts, value of SRCDIR has problem.
  SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test

ptest log
  # ptest-runner e2fsprogs
  START: ptest-runner
  2022-12-17T11:08
  BEGIN: /usr/lib/e2fsprogs/ptest
  ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
  ./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
  DURATION: 0
  END: /usr/lib/e2fsprogs/ptest
  2022-12-17T11:08
  STOP: ptest-runner
  TOTAL: 1 FAIL: 0

Reason
  In Makefile.in, SRCDIR is set by prefix and libdir.
    @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
    @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
  prefix=/usr
  libdir=/usr/lib (when usrmerge is set)

solution
  After ptest compiling, check and modify SRCDIR in test_script and test_one.

Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
index 2620610903..3219817c08 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
@@ -122,6 +122,8 @@ RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck
 
 do_compile_ptest() {
 	oe_runmake -C ${B}/tests
+	sed -i 's/\/usr\/usr/\/usr/g' -i ${B}/tests/test_one
+	sed -i 's/\/usr\/usr/\/usr/g' -i ${B}/tests/test_script
 }
 
 do_install_ptest() {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH V1] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
  2023-04-26  6:31 [PATCH V1] Fix error SRCDIR when using usrmerge DISTRO_FEATURES qiutt
@ 2023-04-26  9:23 ` Luca Ceresoli
       [not found] ` <175971C08FC40A4D.699@lists.openembedded.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Luca Ceresoli @ 2023-04-26  9:23 UTC (permalink / raw)
  To: qiutt@fujitsu.com; +Cc: openembedded-core, fnstml-fujitsuten

Hello Qiu,

On Wed, 26 Apr 2023 14:31:07 +0800
"qiutt@fujitsu.com" <qiutt@fujitsu.com> wrote:

> From: Qiu Tingting <qiutt@fujitsu.com>
> 
> When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
> in test_script and test_one scripts, value of SRCDIR has problem.
>   SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test
> 
> ptest log
>   # ptest-runner e2fsprogs
>   START: ptest-runner
>   2022-12-17T11:08
>   BEGIN: /usr/lib/e2fsprogs/ptest
>   ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
>   ./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
>   DURATION: 0
>   END: /usr/lib/e2fsprogs/ptest
>   2022-12-17T11:08
>   STOP: ptest-runner
>   TOTAL: 1 FAIL: 0
> 
> Reason
>   In Makefile.in, SRCDIR is set by prefix and libdir.
>     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
>     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
>   prefix=/usr
>   libdir=/usr/lib (when usrmerge is set)
> 
> solution
>   After ptest compiling, check and modify SRCDIR in test_script and test_one.
> 
> Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
> ---
>  meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> index 2620610903..3219817c08 100644
> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> @@ -122,6 +122,8 @@ RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck
>  
>  do_compile_ptest() {
>  	oe_runmake -C ${B}/tests
> +	sed -i 's/\/usr\/usr/\/usr/g' -i ${B}/tests/test_one
> +	sed -i 's/\/usr\/usr/\/usr/g' -i ${B}/tests/test_script

There is a duplicate '-i' in each line.

Also the regex would more readable by using another spearator character,
which would allow getting rid of the backslashes e.g.: 

sed -i 's,/usr/usr,/usr,g' -i ${B}/tests/test_one

Best regards,
Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH V1] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
       [not found] ` <175971C08FC40A4D.699@lists.openembedded.org>
@ 2023-04-26  9:26   ` Luca Ceresoli
  2023-04-27  0:38     ` 回复: " Tingting Qiu (Fujitsu)
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Ceresoli @ 2023-04-26  9:26 UTC (permalink / raw)
  To: Luca Ceresoli via lists.openembedded.org
  Cc: luca.ceresoli, qiutt@fujitsu.com, openembedded-core,
	fnstml-fujitsuten

Hi Qiu,

On Wed, 26 Apr 2023 11:23:22 +0200
"Luca Ceresoli via lists.openembedded.org"
<luca.ceresoli=bootlin.com@lists.openembedded.org> wrote:

> Hello Qiu,
> 
> On Wed, 26 Apr 2023 14:31:07 +0800
> "qiutt@fujitsu.com" <qiutt@fujitsu.com> wrote:
> 
> > From: Qiu Tingting <qiutt@fujitsu.com>
> > 
> > When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
> > in test_script and test_one scripts, value of SRCDIR has problem.
> >   SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test
> > 
> > ptest log
> >   # ptest-runner e2fsprogs
> >   START: ptest-runner
> >   2022-12-17T11:08
> >   BEGIN: /usr/lib/e2fsprogs/ptest
> >   ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
> >   ./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
> >   DURATION: 0
> >   END: /usr/lib/e2fsprogs/ptest
> >   2022-12-17T11:08
> >   STOP: ptest-runner
> >   TOTAL: 1 FAIL: 0
> > 
> > Reason
> >   In Makefile.in, SRCDIR is set by prefix and libdir.
> >     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
> >     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
> >   prefix=/usr
> >   libdir=/usr/lib (when usrmerge is set)
> > 
> > solution
> >   After ptest compiling, check and modify SRCDIR in test_script and test_one.
> > 
> > Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
> > ---
> >  meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> > index 2620610903..3219817c08 100644
> > --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> > +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> > @@ -122,6 +122,8 @@ RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck
> >  
> >  do_compile_ptest() {
> >  	oe_runmake -C ${B}/tests
> > +	sed -i 's/\/usr\/usr/\/usr/g' -i ${B}/tests/test_one
> > +	sed -i 's/\/usr\/usr/\/usr/g' -i ${B}/tests/test_script  
> 
> There is a duplicate '-i' in each line.
> 
> Also the regex would more readable by using another spearator character,
> which would allow getting rid of the backslashes e.g.: 
> 
> sed -i 's,/usr/usr,/usr,g' -i ${B}/tests/test_one

And I forgot, this can be done in single command on both files:

sed -i 's,/usr/usr,/usr,g' \
    ${B}/tests/test_one \
    ${B}/tests/test_script 

Or maybe, in case it makes sense:

sed -i 's,/usr/usr,/usr,g' ${B}/tests/test_*

Best regards,
Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* 回复: [OE-core] [PATCH V1] Fix error SRCDIR when using usrmerge DISTRO_FEATURES
  2023-04-26  9:26   ` Luca Ceresoli
@ 2023-04-27  0:38     ` Tingting Qiu (Fujitsu)
  0 siblings, 0 replies; 4+ messages in thread
From: Tingting Qiu (Fujitsu) @ 2023-04-27  0:38 UTC (permalink / raw)
  To: Luca Ceresoli via lists.openembedded.org,
	luca.ceresoli@bootlin.com
  Cc: openembedded-core@lists.openembedded.org,
	fnstml-fujitsuten@fujitsu.com

[-- Attachment #1: Type: text/plain, Size: 3525 bytes --]

Hi, Luca

Thanks for your reviewing, It looks good.
I will send patch v2 for it.

Best regards,
Qiu Tingting

________________________________
发件人: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> 代表 Luca Ceresoli via lists.openembedded.org <luca.ceresoli=bootlin.com@lists.openembedded.org>
发送时间: 2023年4月26日 17:26
收件人: Luca Ceresoli via lists.openembedded.org <luca.ceresoli=bootlin.com@lists.openembedded.org>
抄送: luca.ceresoli@bootlin.com <luca.ceresoli@bootlin.com>; Qiu, Tingting/仇 婷婷 <qiutt@fujitsu.com>; openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>; FNST fnstml-fujitsuten <fnstml-fujitsuten@fujitsu.com>
主题: Re: [OE-core] [PATCH V1] Fix error SRCDIR when using usrmerge DISTRO_FEATURES

Hi Qiu,

On Wed, 26 Apr 2023 11:23:22 +0200
"Luca Ceresoli via lists.openembedded.org"
<luca.ceresoli=bootlin.com@lists.openembedded.org> wrote:

> Hello Qiu,
>
> On Wed, 26 Apr 2023 14:31:07 +0800
> "qiutt@fujitsu.com" <qiutt@fujitsu.com> wrote:
>
> > From: Qiu Tingting <qiutt@fujitsu.com>
> >
> > When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
> > in test_script and test_one scripts, value of SRCDIR has problem.
> >   SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test
> >
> > ptest log
> >   # ptest-runner e2fsprogs
> >   START: ptest-runner
> >   2022-12-17T11:08
> >   BEGIN: /usr/lib/e2fsprogs/ptest
> >   ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
> >   ./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
> >   DURATION: 0
> >   END: /usr/lib/e2fsprogs/ptest
> >   2022-12-17T11:08
> >   STOP: ptest-runner
> >   TOTAL: 1 FAIL: 0
> >
> > Reason
> >   In Makefile.in, SRCDIR is set by prefix and libdir.
> >     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
> >     @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
> >   prefix=/usr
> >   libdir=/usr/lib (when usrmerge is set)
> >
> > solution
> >   After ptest compiling, check and modify SRCDIR in test_script and test_one.
> >
> > Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
> > ---
> >  meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> > index 2620610903..3219817c08 100644
> > --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> > +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb
> > @@ -122,6 +122,8 @@ RDEPENDS:${PN}-ptest += "e2fsprogs-badblocks e2fsprogs-dumpe2fs e2fsprogs-e2fsck
> >
> >  do_compile_ptest() {
> >      oe_runmake -C ${B}/tests
> > +   sed -i 's/\/usr\/usr/\/usr/g' -i ${B}/tests/test_one
> > +   sed -i 's/\/usr\/usr/\/usr/g' -i ${B}/tests/test_script
>
> There is a duplicate '-i' in each line.
>
> Also the regex would more readable by using another spearator character,
> which would allow getting rid of the backslashes e.g.:
>
> sed -i 's,/usr/usr,/usr,g' -i ${B}/tests/test_one

And I forgot, this can be done in single command on both files:

sed -i 's,/usr/usr,/usr,g' \
    ${B}/tests/test_one \
    ${B}/tests/test_script

Or maybe, in case it makes sense:

sed -i 's,/usr/usr,/usr,g' ${B}/tests/test_*

Best regards,
Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: Type: text/html, Size: 8355 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-27  0:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-26  6:31 [PATCH V1] Fix error SRCDIR when using usrmerge DISTRO_FEATURES qiutt
2023-04-26  9:23 ` [OE-core] " Luca Ceresoli
     [not found] ` <175971C08FC40A4D.699@lists.openembedded.org>
2023-04-26  9:26   ` Luca Ceresoli
2023-04-27  0:38     ` 回复: " Tingting Qiu (Fujitsu)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox