Ticket #186 (assigned task)

Opened 4 years ago

Last modified 2 years ago

Automate media kit sanity tests

Reported by: jlaska Owned by: hongqing
Priority: major Milestone: Future tasks
Component: tests Keywords:
Cc: robatino Blocked By:


This ticket is intended to track automating the mediakit sanity tests (http://fedoraproject.org/wiki/Category:Installer_Image_Sanity_Test_Cases).

Discussion already underway, along with code in Liam's private branch. For details see https://fedorahosted.org/pipermail/autoqa-devel/2010-June/000595.html

Change History

comment:1 Changed 4 years ago by robatino

  • Cc robatino added

comment:2 Changed 4 years ago by robatino

Make sure to use IEC units for the CD size, and SI units for the other media, as indicated in the test description. It appears that currently you're using SI units for everything. It's common for the CD ISO to be exactly 700 MiB = 734003200 bytes, which fits, so I adjusted the test to allow for this by changing < to <= (and made the same change for the other media).

You might want to consider adding a test which would only generate a warning, to see if the actual ISO size matches the size indicated by the ISO header. (See https://bugzilla.redhat.com/show_bug.cgi?id=585006 .) The rawread script at https://fedoraproject.org/wiki/File:Rawread.sh contains code to read the blocksize and blockcount from the ISO header. The ISO header size is just blocksize*blockcount.

comment:3 Changed 4 years ago by liam

The reason why we are checking the size of ISO is we should make sure the testers can burn the ISO to physical media. As we know the capacity of CDROM is 700M, DVD is 4.7G, we get the bytes of file via os.path.getsize(file),the transform to kb: os.path.getsize(file)/1024, to Mb: os.path.getsize(file)/1024/1024, we will find that 734003200/1024/1024=700. So I think I should have a more accurate transformation in my test. Thanks for your comments.

comment:4 Changed 4 years ago by robatino

capacity of a CD = 700 MiB = 734003200 bytes (IEC units)

capacity of a DVD = 4.7 GB = 4700000000 bytes (SI units)

capacity of a 1 GB flash drive = 1000000000 bytes (SI units)

So if you want to convert to larger units, you need to convert separately to kB and KiB:

size_kB = os.path.getsize(file)/1000

size_KiB = os.path.getsize(file)/1024

and similarly for MB and MiB, and GB and GiB. It's probably simpler to just use the size in bytes directly, to avoid the extra arithmetic, and not have to worry about rounding/truncation.

comment:5 Changed 4 years ago by liam

Interesting, the DVD can hold 4700000000 bytes,not 4.7GB if we use 1024 to transform.And the same as flash drive. Actually, CD can hold 734003200 bytes,equal to 700M,if use 1024 to transform.It's good idea to use bytes to scale the capacity of media,that would not confuse us. :) I did some modifications to the test correspondingly. Thanks for pointing this out, robatino.

comment:6 Changed 4 years ago by jlaska

  • Owner changed from lili to liam

comment:7 Changed 3 years ago by jlaska

  • Owner liam deleted

comment:8 Changed 3 years ago by hongqing

  • Status changed from new to assigned
  • Owner set to hongqing

comment:9 Changed 2 years ago by kparal

  • Milestone changed from Automate installation test plan to 0.8.0

comment:10 Changed 2 years ago by kparal

  • Milestone changed from 0.8.0 to Future tasks

This won't go into 0.8. Changing milestone.

Note: See TracTickets for help on using tickets.