mkumatag / openbmc-automation

Test OpenBMC Distribution, moved to - https://github.com/openbmc/openbmc-test-automation
Apache License 2.0
5 stars 11 forks source link

Autotest on Handling multiple attempts at ipmi reservation ids -V2 #50

Closed williamli80 closed 8 years ago

williamli80 commented 8 years ago

1.Test Wrong ReservationID is for testing expired reservation id. 2.Test Correct ReservationID is for testing correct reservation id. 3.Ipmi command content is hardcode.

Signed-off-by: Nan Li bjlinan@cn.ibm.com


This change is Reviewable

mkumatag commented 8 years ago

Can some one review and give LGTM in reviewable ?

williamli80 commented 8 years ago

This test case is for the story below: "Handle multiple attempts at ipmi reservation ids"( https://jazz07.rchland.ibm.com:13443/jazz/web/projects/OpenBMC#action=com.ibm.team.workitem.viewWorkItem&id=139963 ). Patch: https://github.com/openbmc/phosphor-host-ipmid/pull/82 https://github.com/openbmc/openpower-host-ipmi-oem/pull/11

Test case mechanism: We use a combination of 2 ipmi commands when we want to add an eSEL: "Reserve sel command" and "eSEL partial add command". In this situation, we would first reserve the esel repository by issuing a reserve sel command. We would then add the event log by issuing the esel partial add command.

Openbmc handles a global variable named reservation_id. Obmc returns reservation_id to us when receiving reserve id command, meanwhile reservation_id increases by one (+1).

To simulate a multiple attempt situation, we run 2 reserve sel command firstly to get 2 reservation_id, then issue an esel partial add command. The first reservation_id we got is expired, the second reservation_id is correct reservation_id. The idea is:

  1. In the test case named "Test Wrong Reservation_ID", we would feed the 1st reservation_id we got to esel partial add command. Because this reservation_id is expired, so obmc will reject this request. We would get a string including "Reservation cancelled or invalid" when the esel partial add is rejected. We could find this string in the output, to prove that obmc would reject incorrect reservation_id.
  2. In the test case named "Test Correct Reservation_ID", we would feed the 2nd reservation_id we got to esel partial add command, so obmc will accept this request. Then check the output, there would be no error. So it works.

In those esel partial add command, the other parameters are just hard code (magic).

Please correct me.

causten commented 8 years ago

Review status: 0 of 1 files reviewed at latest revision, 3 unresolved discussions.


_tests/test_esel.robot, line 42 [r2] (raw file):_


   Execute Command   rm /tmp/esel
   Sleep             10s

why sleep?


Comments from Reviewable

williamli80 commented 8 years ago

Hi, I'm worried that the "rm /tmp/esel" may conflict with the following test case which make write/read to /tmp/esel. Please correct me.

causten commented 8 years ago

one test case should not effect the other. The Execute Command will no complete until it is done. You could replace the sleep with a ...

Execute Command sync

That would flush buffers

Previously, williamli80 (William Li ( Nan Li, 李楠)) wrote… > Hi, I'm worried that the "rm /tmp/esel" may conflict with the following test case which make write/read to /tmp/esel. Please correct me. >

Review status: 0 of 1 files reviewed at latest revision, 3 unresolved discussions.


Comments from Reviewable

williamli80 commented 8 years ago

Ok! Thanks, Chris! "Execute Command sync" works.

causten commented 8 years ago

Reviewed 1 of 1 files at r3. Review status: all files reviewed at latest revision, 3 unresolved discussions.


Comments from Reviewable

mkumatag commented 8 years ago

I see most of the comments addressed. Anything pending for LGTM?

Previously, williamli80 (William Li ( Nan Li, 李楠)) wrote… > Ok! Thanks, Chris! "Execute Command sync" works. >

Review status: all files reviewed at latest revision, 3 unresolved discussions.


Comments from Reviewable

williamli80 commented 8 years ago

Waiting for review.

causten commented 8 years ago
:lgtm:
Previously, williamli80 (William Li ( Nan Li, 李楠)) wrote… > Waiting for review. >

Review status: all files reviewed at latest revision, 3 unresolved discussions.


Comments from Reviewable

causten commented 8 years ago

all good from my end     Chris AustenPOWER Systems Enablement Manager(512) 286-5184 (T/L: 363-5184)     ----- Original message -----From: Manjunath A Kumatagi notifications@github.comTo: mkumatag/openbmc-automation openbmc-automation@noreply.github.comCc: Chris Austen/Austin/IBM@IBMUS, Comment comment@noreply.github.comSubject: Re: [mkumatag/openbmc-automation] Autotest on Handling multiple attempts at ipmi reservation ids -V2 (#50)Date: Mon, May 30, 2016 12:45 AM  I see most of the comments addressed. Anything pending for LGTM?   Previously, williamli80 (William Li ( Nan Li, 李楠)) wrote…   Ok! Thanks, Chris! "Execute Command sync" works.   Review status: all files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.