All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego]  [PATCH v2] rpm: Fix test case rpm02.
@ 2019-02-03  1:18 Zheng Ruoqin
  2019-02-05 18:47 ` Tim.Bird
  2019-02-15 20:45 ` Tim.Bird
  0 siblings, 2 replies; 7+ messages in thread
From: Zheng Ruoqin @ 2019-02-03  1:18 UTC (permalink / raw)
  To: fuego

In some user's boards, the rpm provided in this suite is not fit for them, and rpm can't be installed.

This patch provide an srpm file for user to rebuild it to produce the
rpm file fit for them.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Qiu Tingting <qiutt@cn.fujitsu.com> 
---
 .../{ => data}/test-manual-1.2.3.noarch.rpm          | Bin
 .../Functional.rpm/data/test-manual-1.2.3.src.rpm    | Bin 0 -> 2335 bytes
 engine/tests/Functional.rpm/fuego_test.sh            |  19 +++++++++++++++++--
 engine/tests/Functional.rpm/tests/rpm_02.sh          |   2 +-
 4 files changed, 18 insertions(+), 3 deletions(-)
 rename engine/tests/Functional.rpm/{ => data}/test-manual-1.2.3.noarch.rpm (100%)
 create mode 100644 engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm

diff --git a/engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm b/engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
similarity index 100%
rename from engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
rename to engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
diff --git a/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm b/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
new file mode 100644
index 0000000000000000000000000000000000000000..9c0f45da76baed63ab88be26218c90f813ab260f
GIT binary patch
literal 2335
zcma)+c~DbV6o+2|Dn?OSsiGwiTo6=V-%DOzlBx(55drs|#W8QgSdu^%tEjc&0xlp3
zZle~pfICH0MC%`nOJzivx@%o)s|7|-sue|%o*Qo++L_Mu&Yb-6-E-c#=iGbW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test.sh b/engine/tests/Functional.rpm/fuego_test.sh
index 2a56a6d..b7856d8 100755
--- a/engine/tests/Functional.rpm/fuego_test.sh
+++ b/engine/tests/Functional.rpm/fuego_test.sh
@@ -1,19 +1,34 @@
 NEED_ROOT=1
 
+NEED_BUILD_RPM=false
 function test_pre_check {
     is_on_target_path rpm PROGRAM_RPM
     assert_define PROGRAM_RPM
+    is_on_target_path rpmbuild PROGRAM_RPMBUILD
+    if [ -n $PROGRAM_RPMBUILD ];
+    then
+        NEED_BUILD_RPM=true
+    fi
 }
 
 function test_deploy {
     put $TEST_HOME/rpm_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
-    put $TEST_HOME/test-manual-1.2.3.noarch.rpm $BOARD_TESTDIR/fuego.$TESTDIR/
+    put -r $TEST_HOME/data $BOARD_TESTDIR/fuego.$TESTDIR/
     put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/
 }
 
 function test_run {
+    if [ $NEED_BUILD_RPM ];
+    then
+        cmd "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
+            mv /etc/rpm/platform /etc/rpm/platform.old; \
+            rpmbuild --define \"_topdir \${dir:-$BOARD_TESTDIR/fuego.$TESTDIR/rpm}\" --rebuild data/test-manual-1.2.3.src.rpm; \
+            mv /etc/rpm/platform.old /etc/rpm/platform; \
+            mv rpm/RPMS/noarch/test-manual-1.2.3-20181012.noarch.rpm data/test-manual-1.2.3.noarch.rpm"
+    fi
     report "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
-        sh -v rpm_test.sh"
+        sh -v rpm_test.sh; \
+        rpm -e test-manual"
 }
 
 function test_processing {
diff --git a/engine/tests/Functional.rpm/tests/rpm_02.sh b/engine/tests/Functional.rpm/tests/rpm_02.sh
index 9b0f411..4a7de3b 100644
--- a/engine/tests/Functional.rpm/tests/rpm_02.sh
+++ b/engine/tests/Functional.rpm/tests/rpm_02.sh
@@ -11,7 +11,7 @@ then
     rpm -e $test_manual
 fi
 
-rpm -ivh ${test_manual}.rpm --nodeps
+rpm -ivh data/${test_manual}.rpm --nodeps
 
 if rpm -ql $test_manual | grep '.*/home/test/rpm-test/text1.txt.*'
 then
-- 
1.8.3.1




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

* Re: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
  2019-02-03  1:18 [Fuego] [PATCH v2] rpm: Fix test case rpm02 Zheng Ruoqin
@ 2019-02-05 18:47 ` Tim.Bird
  2019-02-11  3:58   ` Zheng, Ruoqin
  2019-02-15 20:45 ` Tim.Bird
  1 sibling, 1 reply; 7+ messages in thread
From: Tim.Bird @ 2019-02-05 18:47 UTC (permalink / raw)
  To: zhengrq.fnst, fuego

I'm not sure I understand the issue here. 

Please see questions inline below.

> -----Original Message-----
> From: Zheng Ruoqin
> 
> In some user's boards, the rpm provided in this suite is not fit for them, and
> rpm can't be installed.
> 
> This patch provide an srpm file for user to rebuild it to produce the
> rpm file fit for them.
> 
> Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> Signed-off-by: Qiu Tingting <qiutt@cn.fujitsu.com>
> ---
>  .../{ => data}/test-manual-1.2.3.noarch.rpm          | Bin
>  .../Functional.rpm/data/test-manual-1.2.3.src.rpm    | Bin 0 -> 2335 bytes
>  engine/tests/Functional.rpm/fuego_test.sh            |  19
> +++++++++++++++++--
>  engine/tests/Functional.rpm/tests/rpm_02.sh          |   2 +-
>  4 files changed, 18 insertions(+), 3 deletions(-)
>  rename engine/tests/Functional.rpm/{ => data}/test-manual-
> 1.2.3.noarch.rpm (100%)
>  create mode 100644 engine/tests/Functional.rpm/data/test-manual-
> 1.2.3.src.rpm
> 
> diff --git a/engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
> b/engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
> similarity index 100%
> rename from engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
> rename to engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
> diff --git a/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
> b/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..9c0f45da76baed63ab88be262
> 18c90f813ab260f
> GIT binary patch
> literal 2335
> zcma)+c~DbV6o+2|Dn?OSsiGwiTo6=V-
> %DOzlBx(55drs|#W8QgSdu^%tEjc&0xlp3
> zZle~pfICH0MC%`nOJzivx@%o)s|7|-sue|%o*Qo++L_Mu&Yb-6-E-
> c#=iGbWYuMj-
> z+l?S(gv=q@9U*3;#c50qp-
> DBV2~ktDo~CFu@qdSm=<x5*?1Qy3JcoQ!z(T<~fkl9M
> z!P1_f9l_9mShreGcd#LtpMaux3Jl`io`NEO7?_ObC|0Ct9VZ%iLDDg-
> PSofPtVW=9
> zyg;k9T7lBB5~qb&7#^LX?Lmzv@1)x{24)xJgbpczRA<29s;RB5trY&l8U)d<Zm2^
> p
> zz|;sZs6&o=Krv{}0}PG7>qdRZG1q}2?uNM@vo~hcS7$IK<_65cm>WSq^ojdM`
> 695t
> z3Hv8tehG^Fs6JHBD^Qew2Idw}RIh}&6%@rU!2AyLlK1S6)<%{I20gi>Shy-
> g4rY`a
> zaXw}RD2m^VxeF*-ZwKbC?^)ItGdg#Om-
> WZo9s6OwUF)GehUaC&Fn<Dy;$t!UU`G9-
> z`g((+_yo*-Ft5cN1PVRKwt>R_xa&btzCz3fQ1tvB%%5Yvf;k-
> XL(Gw&C|@1s(V&nI
> zN_k&T6lTcjs&5P^{FkG?P`#*56p!u$;zaEC#XJjh7$~Y&0EPABs1C#;W>g1a33JS
> Q
> z?vV$I^1JTGNTS{QO}O4~;=}vh-WBb%J5)v$no`+P%qqLn<bajpE2|Qct-
> LXLj@9mf
> z#BlT@M^A_)BCNdAELt2!hskPbzXs_r+Q_6dBH3hd&L=EZqm7^AdQQF!q;lzzr
> AH7#
> z-
> uU>+)0ah_;W)iUt2anmMoZ~<o@FGSlO#?fQnbM!NIcE5YBkT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))HmZ_^v!}|Gm%SyH!`dyHLOC()igvj|=kV`|f
> $8
> zz1jTB;&ZJfTi$s->a?)SdEL0?f~x(SnPYd3H$DI3!o{N<hToW*;a78FMBA&-sqxN=
> z%?-gV70X)F#I_YTk{XA9`owq113zWe8~cHSe>VO0>S@`bm&f0ZzOnoI_glBm-
> *B>}
> zVN^~*qw=`3e5`5CEoPWuVe_KP$zR9Y4xPB&C+%Ky;F2fRMU7Qq(`_Ynj~b5u
> 8nC}#
> zzV9Go&(zv6;XZ-
> WX^Uj)zUg#y>$_3HJDVyYZt7uO!i*WU`Axk}uA8;_417HQ0{fs{
> Ak^lez
> 
> literal 0
> HcmV?d00001
> 
> diff --git a/engine/tests/Functional.rpm/fuego_test.sh
> b/engine/tests/Functional.rpm/fuego_test.sh
> index 2a56a6d..b7856d8 100755
> --- a/engine/tests/Functional.rpm/fuego_test.sh
> +++ b/engine/tests/Functional.rpm/fuego_test.sh
> @@ -1,19 +1,34 @@
>  NEED_ROOT=1
> 
> +NEED_BUILD_RPM=false
>  function test_pre_check {
>      is_on_target_path rpm PROGRAM_RPM
>      assert_define PROGRAM_RPM
> +    is_on_target_path rpmbuild PROGRAM_RPMBUILD
> +    if [ -n $PROGRAM_RPMBUILD ];
> +    then
> +        NEED_BUILD_RPM=true
> +    fi

OK - just to clarify.  The logic here is that if a board has 'rpm' but not 'rpmbuild',
then just use the default test rpm package for the test.  But if a board has
the command 'rpmbuild' in the PATH, then use that to rebuild the
test rpm package, and use that instead of the default test rpm package.

Is that right?

What is deficient about the default test rpm package, that it cannot
be used in some circumstances?

I see that you are manipulating '_topdir' in the rebuild.  Is there some problem
with the test package touching things outside the Fuego test directory?

Can you provide an error message or log for when using the default test rpm
package fails on some board - that this fix is trying to address?

This is a fairly heavy-weight fix.  Not many embedded products will
have rpmbuild installed IMHO, so I hesitate to make that a requirement.
But it seems like the test still attempts to work even if 'rpmbuild' is missing.

But I want to get a sense for how many systems will have problems
with this test, in the case that rpmbuild is not present.

And I'm wondering if there's another way to resolve whatever problem
the test rpm package has (like maybe using --relocate option with 'rpm'
if there is some directory or path problem).

Thanks,
(Not applied yet)
 -- Tim


>  }
> 
>  function test_deploy {
>      put $TEST_HOME/rpm_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
> -    put $TEST_HOME/test-manual-1.2.3.noarch.rpm
> $BOARD_TESTDIR/fuego.$TESTDIR/
> +    put -r $TEST_HOME/data $BOARD_TESTDIR/fuego.$TESTDIR/
>      put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/
>  }
> 
>  function test_run {
> +    if [ $NEED_BUILD_RPM ];
> +    then
> +        cmd "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
> +            mv /etc/rpm/platform /etc/rpm/platform.old; \
> +            rpmbuild --define \"_topdir \${dir:-
> $BOARD_TESTDIR/fuego.$TESTDIR/rpm}\" --rebuild data/test-manual-
> 1.2.3.src.rpm; \
> +            mv /etc/rpm/platform.old /etc/rpm/platform; \
> +            mv rpm/RPMS/noarch/test-manual-1.2.3-20181012.noarch.rpm
> data/test-manual-1.2.3.noarch.rpm"
> +    fi
>      report "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
> -        sh -v rpm_test.sh"
> +        sh -v rpm_test.sh; \
> +        rpm -e test-manual"
>  }
> 
>  function test_processing {
> diff --git a/engine/tests/Functional.rpm/tests/rpm_02.sh
> b/engine/tests/Functional.rpm/tests/rpm_02.sh
> index 9b0f411..4a7de3b 100644
> --- a/engine/tests/Functional.rpm/tests/rpm_02.sh
> +++ b/engine/tests/Functional.rpm/tests/rpm_02.sh
> @@ -11,7 +11,7 @@ then
>      rpm -e $test_manual
>  fi
> 
> -rpm -ivh ${test_manual}.rpm --nodeps
> +rpm -ivh data/${test_manual}.rpm --nodeps
> 
>  if rpm -ql $test_manual | grep '.*/home/test/rpm-test/text1.txt.*'
>  then
> --
> 1.8.3.1
> 
> 
> 
> _______________________________________________
> Fuego mailing list
> Fuego@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego

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

* Re: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
  2019-02-05 18:47 ` Tim.Bird
@ 2019-02-11  3:58   ` Zheng, Ruoqin
  2019-02-15 20:41     ` Tim.Bird
  0 siblings, 1 reply; 7+ messages in thread
From: Zheng, Ruoqin @ 2019-02-11  3:58 UTC (permalink / raw)
  To: Tim.Bird, fuego

Hi Tim:

Sorry for I'm late to reply.

> 
> OK - just to clarify.  The logic here is that if a board has 'rpm' but not 'rpmbuild',
> then just use the default test rpm package for the test.  But if a board has the
> command 'rpmbuild' in the PATH, then use that to rebuild the test rpm package,
> and use that instead of the default test rpm package.
> 
> Is that right?
> 
Yes, that's right.

> What is deficient about the default test rpm package, that it cannot be used in some
> circumstances?
> 
Well, on my board, default test rpm package is ok to be installed, but in some other board, it can't be installed normally.

> I see that you are manipulating '_topdir' in the rebuild.  Is there some problem with
> the test package touching things outside the Fuego test directory?
> 

Well,there is no problem with the test package touching things outside the Fuego test directory.
But with '_topdir' in the rebuild, the rpm rebuild directory can be removed automatically after Fuego test.

> Can you provide an error message or log for when using the default test rpm
> package fails on some board - that this fix is trying to address?
> 

The boards are m3 and intel up2.
OS:  AGL 5.0.2
Kernel:  4.9

Jenkins Error Log as follows:
error: test-manual-1.2.3.noarch.rpm: signature region 62: tag number mismatch 7 ril 6 dl 792 rdl 168

error: test-manual-1.2.3.noarch.rpm cannot be installed
 -> rpm02: TEST-FAIL" 

Manually installation Error Log as follows:
# test_manual="test-manual-1.2.3.noarch" 

# rpm -ivh ${test_manual}.rpm --nodeps
error: test-manual-1.2.3.noarch.rpm: signature region 62: tag number mismatch 7 ril 6 dl 792 rdl 168

error: test-manual-1.2.3.noarch.rpm cannot be installed  

> This is a fairly heavy-weight fix.  Not many embedded products will have rpmbuild
> installed IMHO, so I hesitate to make that a requirement.
> But it seems like the test still attempts to work even if 'rpmbuild' is missing.
> 
> But I want to get a sense for how many systems will have problems with this test, in
> the case that rpmbuild is not present.
> 
> And I'm wondering if there's another way to resolve whatever problem the test rpm
> package has (like maybe using --relocate option with 'rpm'
> if there is some directory or path problem).
> 

Maybe there's another way, I need to look at that, thanks. 

> Thanks,
> (Not applied yet)
>  -- Tim
>

--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
       Nanjing, 210012, China
MAIL : zhengrq.fnst@cn.fujistu.com

> -----Original Message-----
> From: Tim.Bird@sony.com [mailto:Tim.Bird@sony.com]
> Sent: Wednesday, February 06, 2019 2:48 AM
> To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>;
> fuego@lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
> 
> I'm not sure I understand the issue here.
> 
> Please see questions inline below.
> 
> > -----Original Message-----
> > From: Zheng Ruoqin
> >
> > In some user's boards, the rpm provided in this suite is not fit for
> > them, and rpm can't be installed.
> >
> > This patch provide an srpm file for user to rebuild it to produce the
> > rpm file fit for them.
> >
> > Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> > Signed-off-by: Qiu Tingting <qiutt@cn.fujitsu.com>
> > ---
> >  .../{ => data}/test-manual-1.2.3.noarch.rpm          | Bin
> >  .../Functional.rpm/data/test-manual-1.2.3.src.rpm    | Bin 0 -> 2335 bytes
> >  engine/tests/Functional.rpm/fuego_test.sh            |  19
> > +++++++++++++++++--
> >  engine/tests/Functional.rpm/tests/rpm_02.sh          |   2 +-
> >  4 files changed, 18 insertions(+), 3 deletions(-)  rename
> > engine/tests/Functional.rpm/{ => data}/test-manual- 1.2.3.noarch.rpm
> > (100%)  create mode 100644
> > engine/tests/Functional.rpm/data/test-manual-
> > 1.2.3.src.rpm
> >
> > diff --git a/engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
> > b/engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
> > similarity index 100%
> > rename from engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
> > rename to
> > engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
> > diff --git
> > a/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
> > b/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
> > new file mode 100644
> > index
> > 0000000000000000000000000000000000000000..9c0f45da76baed63ab88be262
> > 18c90f813ab260f
> > GIT binary patch
> > literal 2335
> > zcma)+c~DbV6o+2|Dn?OSsiGwiTo6=V-
> > %DOzlBx(55drs|#W8QgSdu^%tEjc&0xlp3
> > zZle~pfICH0MC%`nOJzivx@%o)s|7|-sue|%o*Qo++L_Mu&Yb-6-E-
> > c#=iGbWYuMj-
> > z+l?S(gv=q@9U*3;#c50qp-
> > DBV2~ktDo~CFu@qdSm=<x5*?1Qy3JcoQ!z(T<~fkl9M
> > z!P1_f9l_9mShreGcd#LtpMaux3Jl`io`NEO7?_ObC|0Ct9VZ%iLDDg-
> > PSofPtVW=9
> > zyg;k9T7lBB5~qb&7#^LX?Lmzv@1)x{24)xJgbpczRA<29s;RB5trY&l8U)d<Zm2^
> > p
> > zz|;sZs6&o=Krv{}0}PG7>qdRZG1q}2?uNM@vo~hcS7$IK<_65cm>WSq^ojdM`
> > 695t
> > z3Hv8tehG^Fs6JHBD^Qew2Idw}RIh}&6%@rU!2AyLlK1S6)<%{I20gi>Shy-
> > g4rY`a
> > zaXw}RD2m^VxeF*-ZwKbC?^)ItGdg#Om-
> > WZo9s6OwUF)GehUaC&Fn<Dy;$t!UU`G9-
> > z`g((+_yo*-Ft5cN1PVRKwt>R_xa&btzCz3fQ1tvB%%5Yvf;k-
> > XL(Gw&C|@1s(V&nI
> > zN_k&T6lTcjs&5P^{FkG?P`#*56p!u$;zaEC#XJjh7$~Y&0EPABs1C#;W>g1a33JS
> > Q
> > z?vV$I^1JTGNTS{QO}O4~;=}vh-WBb%J5)v$no`+P%qq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D%xiY
> > =>s
> > z&BfJSWWCC&e<CIZ#Bech&1B%<n~u01c|ij#1FwzCi1ANPtY>p#=Ita#j|ecO9;i
> > (%
> > zRZjEjz0zyNu7O(FvnctOsXpZ|B4;l9Ax^o5vC(f*7v}tU_CTIm8`7<=-cosL(AeT<
> > zj<l0RKjG;&Nu!27$dV*w=fQVm))HmZ_^v!}|Gm%SyH!`dyHLOC()igvj|=kV`|f
> > $8
> > zz1jTB;&ZJfTi$s->a?)SdEL0?f~x(SnPYd3H$DI3!o{N<hToW*;a78FMBA&-sqxN=
> > z%?-gV70X)F#I_YTk{XA9`owq113zWe8~cHSe>VO0>S@`bm&f0ZzOnoI_glBm-
> > *B>}
> > zVN^~*qw=`3e5`5CEoPWuVe_KP$zR9Y4xPB&C+%Ky;F2fRMU7Qq(`_Ynj~b5u
> > 8nC}#
> > zzV9Go&(zv6;XZ-
> > WX^Uj)zUg#y>$_3HJDVyYZt7uO!i*WU`Axk}uA8;_417HQ0{fs{
> > Ak^lez
> >
> > literal 0
> > HcmV?d00001
> >
> > diff --git a/engine/tests/Functional.rpm/fuego_test.sh
> > b/engine/tests/Functional.rpm/fuego_test.sh
> > index 2a56a6d..b7856d8 100755
> > --- a/engine/tests/Functional.rpm/fuego_test.sh
> > +++ b/engine/tests/Functional.rpm/fuego_test.sh
> > @@ -1,19 +1,34 @@
> >  NEED_ROOT=1
> >
> > +NEED_BUILD_RPM=false
> >  function test_pre_check {
> >      is_on_target_path rpm PROGRAM_RPM
> >      assert_define PROGRAM_RPM
> > +    is_on_target_path rpmbuild PROGRAM_RPMBUILD
> > +    if [ -n $PROGRAM_RPMBUILD ];
> > +    then
> > +        NEED_BUILD_RPM=true
> > +    fi
> 
> OK - just to clarify.  The logic here is that if a board has 'rpm' but not 'rpmbuild',
> then just use the default test rpm package for the test.  But if a board has the
> command 'rpmbuild' in the PATH, then use that to rebuild the test rpm package,
> and use that instead of the default test rpm package.
> 
> Is that right?
> 
> What is deficient about the default test rpm package, that it cannot be used in some
> circumstances?
> 
> I see that you are manipulating '_topdir' in the rebuild.  Is there some problem with
> the test package touching things outside the Fuego test directory?
> 
> Can you provide an error message or log for when using the default test rpm
> package fails on some board - that this fix is trying to address?
> 
> This is a fairly heavy-weight fix.  Not many embedded products will have rpmbuild
> installed IMHO, so I hesitate to make that a requirement.
> But it seems like the test still attempts to work even if 'rpmbuild' is missing.
> 
> But I want to get a sense for how many systems will have problems with this test, in
> the case that rpmbuild is not present.
> 
> And I'm wondering if there's another way to resolve whatever problem the test rpm
> package has (like maybe using --relocate option with 'rpm'
> if there is some directory or path problem).
> 
> Thanks,
> (Not applied yet)
>  -- Tim
> 
> 
> >  }
> >
> >  function test_deploy {
> >      put $TEST_HOME/rpm_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
> > -    put $TEST_HOME/test-manual-1.2.3.noarch.rpm
> > $BOARD_TESTDIR/fuego.$TESTDIR/
> > +    put -r $TEST_HOME/data $BOARD_TESTDIR/fuego.$TESTDIR/
> >      put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/  }
> >
> >  function test_run {
> > +    if [ $NEED_BUILD_RPM ];
> > +    then
> > +        cmd "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
> > +            mv /etc/rpm/platform /etc/rpm/platform.old; \
> > +            rpmbuild --define \"_topdir \${dir:-
> > $BOARD_TESTDIR/fuego.$TESTDIR/rpm}\" --rebuild data/test-manual-
> > 1.2.3.src.rpm; \
> > +            mv /etc/rpm/platform.old /etc/rpm/platform; \
> > +            mv rpm/RPMS/noarch/test-manual-1.2.3-20181012.noarch.rpm
> > data/test-manual-1.2.3.noarch.rpm"
> > +    fi
> >      report "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
> > -        sh -v rpm_test.sh"
> > +        sh -v rpm_test.sh; \
> > +        rpm -e test-manual"
> >  }
> >
> >  function test_processing {
> > diff --git a/engine/tests/Functional.rpm/tests/rpm_02.sh
> > b/engine/tests/Functional.rpm/tests/rpm_02.sh
> > index 9b0f411..4a7de3b 100644
> > --- a/engine/tests/Functional.rpm/tests/rpm_02.sh
> > +++ b/engine/tests/Functional.rpm/tests/rpm_02.sh
> > @@ -11,7 +11,7 @@ then
> >      rpm -e $test_manual
> >  fi
> >
> > -rpm -ivh ${test_manual}.rpm --nodeps
> > +rpm -ivh data/${test_manual}.rpm --nodeps
> >
> >  if rpm -ql $test_manual | grep '.*/home/test/rpm-test/text1.txt.*'
> >  then
> > --
> > 1.8.3.1
> >
> >
> >
> > _______________________________________________
> > Fuego mailing list
> > Fuego@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/fuego
> 




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

* Re: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
  2019-02-11  3:58   ` Zheng, Ruoqin
@ 2019-02-15 20:41     ` Tim.Bird
  0 siblings, 0 replies; 7+ messages in thread
From: Tim.Bird @ 2019-02-15 20:41 UTC (permalink / raw)
  To: zhengrq.fnst, fuego



> -----Original Message-----
> From: Zheng, Ruoqin 
> 
> Hi Tim:
> 
> Sorry for I'm late to reply.
> 
> >
> > OK - just to clarify.  The logic here is that if a board has 'rpm' but not
> 'rpmbuild',
> > then just use the default test rpm package for the test.  But if a board has
> the
> > command 'rpmbuild' in the PATH, then use that to rebuild the test rpm
> package,
> > and use that instead of the default test rpm package.
> >
> > Is that right?
> >
> Yes, that's right.
> 
> > What is deficient about the default test rpm package, that it cannot be
> used in some
> > circumstances?
> >
> Well, on my board, default test rpm package is ok to be installed, but in some
> other board, it can't be installed normally.
> 
> > I see that you are manipulating '_topdir' in the rebuild.  Is there some
> problem with
> > the test package touching things outside the Fuego test directory?
> >
> 
> Well,there is no problem with the test package touching things outside the
> Fuego test directory.
> But with '_topdir' in the rebuild, the rpm rebuild directory can be removed
> automatically after Fuego test.
> 
> > Can you provide an error message or log for when using the default test
> rpm
> > package fails on some board - that this fix is trying to address?
> >
> 
> The boards are m3 and intel up2.
> OS:  AGL 5.0.2
> Kernel:  4.9
> 
> Jenkins Error Log as follows:
> error: test-manual-1.2.3.noarch.rpm: signature region 62: tag number
> mismatch 7 ril 6 dl 792 rdl 168
> 
> error: test-manual-1.2.3.noarch.rpm cannot be installed
>  -> rpm02: TEST-FAIL"
> 
> Manually installation Error Log as follows:
> # test_manual="test-manual-1.2.3.noarch"
> 
> # rpm -ivh ${test_manual}.rpm --nodeps
> error: test-manual-1.2.3.noarch.rpm: signature region 62: tag number
> mismatch 7 ril 6 dl 792 rdl 168
> 
> error: test-manual-1.2.3.noarch.rpm cannot be installed

This seems to be a problem with checking one of the signatures of the
rpm.  Since this test is a test of basic rpm functionality, maybe we should
eliminate the signatures.

What happens if you do:
rpm --delsign test-manual-1.2.3.noarch.rpm ?

This should remove the signatures from the test rpm package, and allow it to be
installed.  Since I don't see this problem, I can't test this here.  Can you add this
somewhere appropriate (maybe even doing it as a pre-step to the test rpm package),
and let me know what happens on the boards where this test was failing?

> > This is a fairly heavy-weight fix.  Not many embedded products will have
> rpmbuild
> > installed IMHO, so I hesitate to make that a requirement.
> > But it seems like the test still attempts to work even if 'rpmbuild' is missing.
> >
> > But I want to get a sense for how many systems will have problems with
> this test, in
> > the case that rpmbuild is not present.
> >
> > And I'm wondering if there's another way to resolve whatever problem the
> test rpm
> > package has (like maybe using --relocate option with 'rpm'
> > if there is some directory or path problem).
> >
> 
> Maybe there's another way, I need to look at that, thanks.

Please try out my idea for removing the signature.  Or alternatively,
maybe there's an rpm command line option to ignore the signature
on installation?

I see something in the man page about a '--nosignature' option.

It would be nice to know why the signature is failing on some machines
and not others.  Checking that the signature-checking mechanisms
of rpm work would be a more advanced test, beyond the scope of this
simple test.  But maybe as this test is expanded in the future that could
be added to the list of things to check.
 -- Tim


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

* Re: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
  2019-02-03  1:18 [Fuego] [PATCH v2] rpm: Fix test case rpm02 Zheng Ruoqin
  2019-02-05 18:47 ` Tim.Bird
@ 2019-02-15 20:45 ` Tim.Bird
  2019-02-22  1:22   ` Zheng, Ruoqin
  1 sibling, 1 reply; 7+ messages in thread
From: Tim.Bird @ 2019-02-15 20:45 UTC (permalink / raw)
  To: zhengrq.fnst, fuego

Another possibility here, is that instead of working around the problem,
the test found a real issue that needs to be fixed in some versions of rpm.

See https://github.com/rpm-software-management/rpm/issues/270

It's possible that this is not a problem with the Functional.rpm, but that
it actually found a real bug, and the test should be left alone.

Let me know what you think.
 -- Tim


> -----Original Message-----
> From: fuego-bounces@lists.linuxfoundation.org [mailto:fuego-
> bounces@lists.linuxfoundation.org] On Behalf Of Zheng Ruoqin
> Sent: Saturday, February 02, 2019 5:18 PM
> To: fuego@lists.linuxfoundation.org
> Subject: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
> 
> In some user's boards, the rpm provided in this suite is not fit for them, and
> rpm can't be installed.
> 
> This patch provide an srpm file for user to rebuild it to produce the
> rpm file fit for them.
> 
> Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> Signed-off-by: Qiu Tingting <qiutt@cn.fujitsu.com>
> ---
>  .../{ => data}/test-manual-1.2.3.noarch.rpm          | Bin
>  .../Functional.rpm/data/test-manual-1.2.3.src.rpm    | Bin 0 -> 2335 bytes
>  engine/tests/Functional.rpm/fuego_test.sh            |  19
> +++++++++++++++++--
>  engine/tests/Functional.rpm/tests/rpm_02.sh          |   2 +-
>  4 files changed, 18 insertions(+), 3 deletions(-)
>  rename engine/tests/Functional.rpm/{ => data}/test-manual-
> 1.2.3.noarch.rpm (100%)
>  create mode 100644 engine/tests/Functional.rpm/data/test-manual-
> 1.2.3.src.rpm
> 
> diff --git a/engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
> b/engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
> similarity index 100%
> rename from engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
> rename to engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
> diff --git a/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
> b/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..9c0f45da76baed63ab88be262
> 18c90f813ab260f
> GIT binary patch
> literal 2335
> zcma)+c~DbV6o+2|Dn?OSsiGwiTo6=V-
> %DOzlBx(55drs|#W8QgSdu^%tEjc&0xlp3
> zZle~pfICH0MC%`nOJzivx@%o)s|7|-sue|%o*Qo++L_Mu&Yb-6-E-
> c#=iGbWYuMj-
> z+l?S(gv=q@9U*3;#c50qp-
> DBV2~ktDo~CFu@qdSm=<x5*?1Qy3JcoQ!z(T<~fkl9M
> z!P1_f9l_9mShreGcd#LtpMaux3Jl`io`NEO7?_ObC|0Ct9VZ%iLDDg-
> PSofPtVW=9
> zyg;k9T7lBB5~qb&7#^LX?Lmzv@1)x{24)xJgbpczRA<29s;RB5trY&l8U)d<Zm2^
> p
> zz|;sZs6&o=Krv{}0}PG7>qdRZG1q}2?uNM@vo~hcS7$IK<_65cm>WSq^ojdM`
> 695t
> z3Hv8tehG^Fs6JHBD^Qew2Idw}RIh}&6%@rU!2AyLlK1S6)<%{I20gi>Shy-
> g4rY`a
> zaXw}RD2m^VxeF*-ZwKbC?^)ItGdg#Om-
> WZo9s6OwUF)GehUaC&Fn<Dy;$t!UU`G9-
> z`g((+_yo*-Ft5cN1PVRKwt>R_xa&btzCz3fQ1tvB%%5Yvf;k-
> XL(Gw&C|@1s(V&nI
> zN_k&T6lTcjs&5P^{FkG?P`#*56p!u$;zaEC#XJjh7$~Y&0EPABs1C#;W>g1a33JS
> Q
> z?vV$I^1JTGNTS{QO}O4~;=}vh-WBb%J5)v$no`+P%qqLn<bajpE2|Qct-
> LXLj@9mf
> z#BlT@M^A_)BCNdAELt2!hskPbzXs_r+Q_6dBH3hd&L=EZqm7^AdQQF!q;lzzr
> AH7#
> z-
> uU>+)0ah_;W)iUt2anmMoZ~<o@FGSlO#?fQnbM!NIcE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=fQVm))HmZ_^v!}|Gm%SyH!`dyHLOC()igvj|=kV`|f
> $8
> zz1jTB;&ZJfTi$s->a?)SdEL0?f~x(SnPYd3H$DI3!o{N<hToW*;a78FMBA&-sqxN=
> z%?-gV70X)F#I_YTk{XA9`owq113zWe8~cHSe>VO0>S@`bm&f0ZzOnoI_glBm-
> *B>}
> zVN^~*qw=`3e5`5CEoPWuVe_KP$zR9Y4xPB&C+%Ky;F2fRMU7Qq(`_Ynj~b5u
> 8nC}#
> zzV9Go&(zv6;XZ-
> WX^Uj)zUg#y>$_3HJDVyYZt7uO!i*WU`Axk}uA8;_417HQ0{fs{
> Ak^lez
> 
> literal 0
> HcmV?d00001
> 
> diff --git a/engine/tests/Functional.rpm/fuego_test.sh
> b/engine/tests/Functional.rpm/fuego_test.sh
> index 2a56a6d..b7856d8 100755
> --- a/engine/tests/Functional.rpm/fuego_test.sh
> +++ b/engine/tests/Functional.rpm/fuego_test.sh
> @@ -1,19 +1,34 @@
>  NEED_ROOT=1
> 
> +NEED_BUILD_RPM=false
>  function test_pre_check {
>      is_on_target_path rpm PROGRAM_RPM
>      assert_define PROGRAM_RPM
> +    is_on_target_path rpmbuild PROGRAM_RPMBUILD
> +    if [ -n $PROGRAM_RPMBUILD ];
> +    then
> +        NEED_BUILD_RPM=true
> +    fi
>  }
> 
>  function test_deploy {
>      put $TEST_HOME/rpm_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
> -    put $TEST_HOME/test-manual-1.2.3.noarch.rpm
> $BOARD_TESTDIR/fuego.$TESTDIR/
> +    put -r $TEST_HOME/data $BOARD_TESTDIR/fuego.$TESTDIR/
>      put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/
>  }
> 
>  function test_run {
> +    if [ $NEED_BUILD_RPM ];
> +    then
> +        cmd "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
> +            mv /etc/rpm/platform /etc/rpm/platform.old; \
> +            rpmbuild --define \"_topdir \${dir:-
> $BOARD_TESTDIR/fuego.$TESTDIR/rpm}\" --rebuild data/test-manual-
> 1.2.3.src.rpm; \
> +            mv /etc/rpm/platform.old /etc/rpm/platform; \
> +            mv rpm/RPMS/noarch/test-manual-1.2.3-20181012.noarch.rpm
> data/test-manual-1.2.3.noarch.rpm"
> +    fi
>      report "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
> -        sh -v rpm_test.sh"
> +        sh -v rpm_test.sh; \
> +        rpm -e test-manual"
>  }
> 
>  function test_processing {
> diff --git a/engine/tests/Functional.rpm/tests/rpm_02.sh
> b/engine/tests/Functional.rpm/tests/rpm_02.sh
> index 9b0f411..4a7de3b 100644
> --- a/engine/tests/Functional.rpm/tests/rpm_02.sh
> +++ b/engine/tests/Functional.rpm/tests/rpm_02.sh
> @@ -11,7 +11,7 @@ then
>      rpm -e $test_manual
>  fi
> 
> -rpm -ivh ${test_manual}.rpm --nodeps
> +rpm -ivh data/${test_manual}.rpm --nodeps
> 
>  if rpm -ql $test_manual | grep '.*/home/test/rpm-test/text1.txt.*'
>  then
> --
> 1.8.3.1
> 
> 
> 
> _______________________________________________
> Fuego mailing list
> Fuego@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego

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

* Re: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
  2019-02-15 20:45 ` Tim.Bird
@ 2019-02-22  1:22   ` Zheng, Ruoqin
  2019-02-27 22:28     ` Tim.Bird
  0 siblings, 1 reply; 7+ messages in thread
From: Zheng, Ruoqin @ 2019-02-22  1:22 UTC (permalink / raw)
  To: fuego

Hi Tim:

> This seems to be a problem with checking one of the signatures of the rpm.  Since
> this test is a test of basic rpm functionality, maybe we should eliminate the
> signatures.
> 
> What happens if you do:
> rpm --delsign test-manual-1.2.3.noarch.rpm ?

Rpm log as follws:
# rpm --delsign test-manual-1.2.3.noarch.rpm
test-manual-1.2.3.noarch.rpm:
error: test-manual-1.2.3.noarch.rpm: rpmReadSignature failed: signature region 62: tag number mismatch 7 ril 6 dl 792 rdl 168

# rpmsign --delsign test-manual-1.2.3.noarch.rpm
test-manual-1.2.3.noarch.rpm:
error: test-manual-1.2.3.noarch.rpm: rpmReadSignature failed: signature region 62: tag number mismatch 7 ril 6 dl 792 rdl 168

It the same error.

> 
> Please try out my idea for removing the signature.  Or alternatively, maybe there's
> an rpm command line option to ignore the signature on installation?
> 
> I see something in the man page about a '--nosignature' option.

Well, install without signature has the same error
# rpm --nosignature -i test-manual-1.2.3.noarch.rpm
error: test-manual-1.2.3.noarch.rpm: signature region 62: tag number mismatch 7 ril 6 dl 792 rdl 168

error: test-manual-1.2.3.noarch.rpm cannot be installed

>Another possibility here, is that instead of working around the problem, the test found a real issue that needs to be fixed in some versions of rpm.

>See https://github.com/rpm-software-management/rpm/issues/270

>It's possible that this is not a problem with the Functional.rpm, but that it actually found a real bug, and the test should be left alone.

Yes, maybe it's a bug,I need more test to ensure.

--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
       Nanjing, 210012, China
MAIL : zhengrq.fnst@cn.fujistu.com


> -----Original Message-----
> From: Tim.Bird@sony.com [mailto:Tim.Bird@sony.com]
> Sent: Saturday, February 16, 2019 4:46 AM
> To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>;
> fuego@lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
> 
> Another possibility here, is that instead of working around the problem, the test
> found a real issue that needs to be fixed in some versions of rpm.
> 
> See https://github.com/rpm-software-management/rpm/issues/270
> 
> It's possible that this is not a problem with the Functional.rpm, but that it actually
> found a real bug, and the test should be left alone.
> 
> Let me know what you think.
>  -- Tim
> 
> 
> > -----Original Message-----
> > From: fuego-bounces@lists.linuxfoundation.org [mailto:fuego-
> > bounces@lists.linuxfoundation.org] On Behalf Of Zheng Ruoqin
> > Sent: Saturday, February 02, 2019 5:18 PM
> > To: fuego@lists.linuxfoundation.org
> > Subject: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
> >
> > In some user's boards, the rpm provided in this suite is not fit for
> > them, and rpm can't be installed.
> >
> > This patch provide an srpm file for user to rebuild it to produce the
> > rpm file fit for them.
> >
> > Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> > Signed-off-by: Qiu Tingting <qiutt@cn.fujitsu.com>
> > ---
> >  .../{ => data}/test-manual-1.2.3.noarch.rpm          | Bin
> >  .../Functional.rpm/data/test-manual-1.2.3.src.rpm    | Bin 0 -> 2335 bytes
> >  engine/tests/Functional.rpm/fuego_test.sh            |  19
> > +++++++++++++++++--
> >  engine/tests/Functional.rpm/tests/rpm_02.sh          |   2 +-
> >  4 files changed, 18 insertions(+), 3 deletions(-)  rename
> > engine/tests/Functional.rpm/{ => data}/test-manual- 1.2.3.noarch.rpm
> > (100%)  create mode 100644
> > engine/tests/Functional.rpm/data/test-manual-
> > 1.2.3.src.rpm
> >
> > diff --git a/engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
> > b/engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
> > similarity index 100%
> > rename from engine/tests/Functional.rpm/test-manual-1.2.3.noarch.rpm
> > rename to
> > engine/tests/Functional.rpm/data/test-manual-1.2.3.noarch.rpm
> > diff --git
> > a/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
> > b/engine/tests/Functional.rpm/data/test-manual-1.2.3.src.rpm
> > new file mode 100644
> > index
> > 0000000000000000000000000000000000000000..9c0f45da76baed63ab88be262
> > 18c90f813ab260f
> > GIT binary patch
> > literal 2335
> > zcma)+c~DbV6o+2|Dn?OSsiGwiTo6=V-
> > %DOzlBx(55drs|#W8QgSdu^%tEjc&0xlp3
> > zZle~pfICH0MC%`nOJzivx@%o)s|7|-sue|%o*Qo++L_Mu&Yb-6-E-
> > c#=iGbWYuMj-
> > z+l?S(gv=q@9U*3;#c50qp-
> > DB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
> > zzV9Go&(zv6;XZ-
> > WX^Uj)zUg#y>$_3HJDVyYZt7uO!i*WU`Axk}uA8;_417HQ0{fs{
> > Ak^lez
> >
> > literal 0
> > HcmV?d00001
> >
> > diff --git a/engine/tests/Functional.rpm/fuego_test.sh
> > b/engine/tests/Functional.rpm/fuego_test.sh
> > index 2a56a6d..b7856d8 100755
> > --- a/engine/tests/Functional.rpm/fuego_test.sh
> > +++ b/engine/tests/Functional.rpm/fuego_test.sh
> > @@ -1,19 +1,34 @@
> >  NEED_ROOT=1
> >
> > +NEED_BUILD_RPM=false
> >  function test_pre_check {
> >      is_on_target_path rpm PROGRAM_RPM
> >      assert_define PROGRAM_RPM
> > +    is_on_target_path rpmbuild PROGRAM_RPMBUILD
> > +    if [ -n $PROGRAM_RPMBUILD ];
> > +    then
> > +        NEED_BUILD_RPM=true
> > +    fi
> >  }
> >
> >  function test_deploy {
> >      put $TEST_HOME/rpm_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
> > -    put $TEST_HOME/test-manual-1.2.3.noarch.rpm
> > $BOARD_TESTDIR/fuego.$TESTDIR/
> > +    put -r $TEST_HOME/data $BOARD_TESTDIR/fuego.$TESTDIR/
> >      put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/  }
> >
> >  function test_run {
> > +    if [ $NEED_BUILD_RPM ];
> > +    then
> > +        cmd "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
> > +            mv /etc/rpm/platform /etc/rpm/platform.old; \
> > +            rpmbuild --define \"_topdir \${dir:-
> > $BOARD_TESTDIR/fuego.$TESTDIR/rpm}\" --rebuild data/test-manual-
> > 1.2.3.src.rpm; \
> > +            mv /etc/rpm/platform.old /etc/rpm/platform; \
> > +            mv rpm/RPMS/noarch/test-manual-1.2.3-20181012.noarch.rpm
> > data/test-manual-1.2.3.noarch.rpm"
> > +    fi
> >      report "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
> > -        sh -v rpm_test.sh"
> > +        sh -v rpm_test.sh; \
> > +        rpm -e test-manual"
> >  }
> >
> >  function test_processing {
> > diff --git a/engine/tests/Functional.rpm/tests/rpm_02.sh
> > b/engine/tests/Functional.rpm/tests/rpm_02.sh
> > index 9b0f411..4a7de3b 100644
> > --- a/engine/tests/Functional.rpm/tests/rpm_02.sh
> > +++ b/engine/tests/Functional.rpm/tests/rpm_02.sh
> > @@ -11,7 +11,7 @@ then
> >      rpm -e $test_manual
> >  fi
> >
> > -rpm -ivh ${test_manual}.rpm --nodeps
> > +rpm -ivh data/${test_manual}.rpm --nodeps
> >
> >  if rpm -ql $test_manual | grep '.*/home/test/rpm-test/text1.txt.*'
> >  then
> > --
> > 1.8.3.1
> >
> >
> >
> > _______________________________________________
> > Fuego mailing list
> > Fuego@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/fuego
> 




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

* Re: [Fuego] [PATCH v2] rpm: Fix test case rpm02.
  2019-02-22  1:22   ` Zheng, Ruoqin
@ 2019-02-27 22:28     ` Tim.Bird
  0 siblings, 0 replies; 7+ messages in thread
From: Tim.Bird @ 2019-02-27 22:28 UTC (permalink / raw)
  To: zhengrq.fnst, fuego



> -----Original Message-----
> From:  Zheng, Ruoqin
> 
> > This seems to be a problem with checking one of the signatures of the rpm.
> Since
> > this test is a test of basic rpm functionality, maybe we should eliminate the
> > signatures.
> >
> > What happens if you do:
> > rpm --delsign test-manual-1.2.3.noarch.rpm ?
> 
> Rpm log as follws:
> # rpm --delsign test-manual-1.2.3.noarch.rpm
> test-manual-1.2.3.noarch.rpm:
> error: test-manual-1.2.3.noarch.rpm: rpmReadSignature failed: signature
> region 62: tag number mismatch 7 ril 6 dl 792 rdl 168
> 
> # rpmsign --delsign test-manual-1.2.3.noarch.rpm
> test-manual-1.2.3.noarch.rpm:
> error: test-manual-1.2.3.noarch.rpm: rpmReadSignature failed: signature
> region 62: tag number mismatch 7 ril 6 dl 792 rdl 168
> 
> It the same error.
> 
> >
> > Please try out my idea for removing the signature.  Or alternatively, maybe
> there's
> > an rpm command line option to ignore the signature on installation?
> >
> > I see something in the man page about a '--nosignature' option.
> 
> Well, install without signature has the same error
> # rpm --nosignature -i test-manual-1.2.3.noarch.rpm
> error: test-manual-1.2.3.noarch.rpm: signature region 62: tag number
> mismatch 7 ril 6 dl 792 rdl 168
> 
> error: test-manual-1.2.3.noarch.rpm cannot be installed
> 
> >Another possibility here, is that instead of working around the problem, the
> test found a real issue that needs to be fixed in some versions of rpm.
> 
> >See https://github.com/rpm-software-management/rpm/issues/270
> 
> >It's possible that this is not a problem with the Functional.rpm, but that it
> actually found a real bug, and the test should be left alone.
> 
> Yes, maybe it's a bug,I need more test to ensure.

OK.  Please let me know the result of your investigation, and
whether you want to proceed with the change you originally requested.
For now, I'm dropping this patch.  You can re-send it again if you want
it applied in the future.

Thanks,
 -- Tim


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

end of thread, other threads:[~2019-02-27 22:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-03  1:18 [Fuego] [PATCH v2] rpm: Fix test case rpm02 Zheng Ruoqin
2019-02-05 18:47 ` Tim.Bird
2019-02-11  3:58   ` Zheng, Ruoqin
2019-02-15 20:41     ` Tim.Bird
2019-02-15 20:45 ` Tim.Bird
2019-02-22  1:22   ` Zheng, Ruoqin
2019-02-27 22:28     ` Tim.Bird

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.