If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Add base image version to HTML report

RESOLVED FIXED

Status

Testing
Marionette
--
enhancement
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: RobertC, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
It would be nice to have additional information about the device in the html report (e.g., base build and memory setting)
As far as I'm aware the base build is not available after a full flash. Also, determining the memory allocation requires switching the device into fastboot mode, so I don't think this would be trivial.

Tony: Do you know a way to determine the base build that persists after a full flash, or a way to determine the memory allocation without using fastboot?
Flags: needinfo?(tchung)

Comment 2

3 years ago
(In reply to Dave Hunt (:davehunt) from comment #1)
> As far as I'm aware the base build is not available after a full flash.
> Also, determining the memory allocation requires switching the device into
> fastboot mode, so I don't think this would be trivial.
> 
> Tony: Do you know a way to determine the base build that persists after a
> full flash, or a way to determine the memory allocation without using
> fastboot?

Determining base build version:
Easiest way on KK only, just do:  adb shell getprop ro.boot.bootloader
$ L1TC10011800   (where "...xxx180x" is version 180)

Longer way:  (from check_versions.sh in b2g-flash-tool repo)
# get and print device information
PROPS=( "Device-Name:ro.product.device"
        "FW-Release:ro.build.version.release"
        "FW-Incremental:ro.build.version.incremental"
        "FW-Date:ro.build.date"
        "Bootloader:ro.boot.bootloader" )
for KEY_VALUE in "${PROPS[@]}" ; do
    KEY="${KEY_VALUE%%:*}"
    VALUE="${KEY_VALUE##*:}"
    RET=$(run_adb shell getprop $VALUE | tr -d '\r\n')
    if [[ ${RET} ]]; then
        printf ${OUTPUT_FORMAT_DEVICE} "${KEY}" "${RET}"
    fi
done

As for memory allocation, not sure what you are asking?  can you get away with adb shell b2g-info or adb shell cat /proc/meminfo?
Flags: needinfo?(tchung)
(In reply to Tony Chung [:tchung] from comment #2)
> (In reply to Dave Hunt (:davehunt) from comment #1)
> > As far as I'm aware the base build is not available after a full flash.
> > Also, determining the memory allocation requires switching the device into
> > fastboot mode, so I don't think this would be trivial.
> > 
> > Tony: Do you know a way to determine the base build that persists after a
> > full flash, or a way to determine the memory allocation without using
> > fastboot?
> 
> Determining base build version:
> Easiest way on KK only, just do:  adb shell getprop ro.boot.bootloader
> $ L1TC10011800   (where "...xxx180x" is version 180)

Great, that appears to persist beyond a full flash. I've raised bug 1073441 to get this into mozversion. Once there, we should just need to include the new entry in the HTML report.

> As for memory allocation, not sure what you are asking?  can you get away
> with adb shell b2g-info or adb shell cat /proc/meminfo?

It looks like grabbing MemTotal from /proc/meminfo would be enough, and pretty easy to do. I don't think this should be in mozversion though, we could either do it in mozdevice or just directly into the HTML report.
Depends on: 1073441

Updated

3 years ago
Summary: Additional information about the device in the report → Add base image version and memory allocation to HTML report
Created attachment 8498781 [details] [diff] [review]
Add base image version to HTML report. v1.0
Attachment #8498781 - Flags: review?(mdas)
(In reply to Dave Hunt (:davehunt) from comment #3)
> (In reply to Tony Chung [:tchung] from comment #2)
> > As for memory allocation, not sure what you are asking?  can you get away
> > with adb shell b2g-info or adb shell cat /proc/meminfo?
> 
> It looks like grabbing MemTotal from /proc/meminfo would be enough, and
> pretty easy to do. I don't think this should be in mozversion though, we
> could either do it in mozdevice or just directly into the HTML report.

Will: Do you think this is something we should add to mozdevice? I see that getInfo [1] could return memory stats, but currently doesn't for the ADB device manager [2].

[1] http://mozbase.readthedocs.org/en/latest/mozdevice.html#mozdevice.DeviceManager.getInfo
[2] http://hg.mozilla.org/mozilla-central/file/2399d1ae89e9/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py#l499
Flags: needinfo?(wlachance)
(In reply to Dave Hunt (:davehunt) from comment #5)
> (In reply to Dave Hunt (:davehunt) from comment #3)
> > (In reply to Tony Chung [:tchung] from comment #2)
> > > As for memory allocation, not sure what you are asking?  can you get away
> > > with adb shell b2g-info or adb shell cat /proc/meminfo?
> > 
> > It looks like grabbing MemTotal from /proc/meminfo would be enough, and
> > pretty easy to do. I don't think this should be in mozversion though, we
> > could either do it in mozdevice or just directly into the HTML report.
> 
> Will: Do you think this is something we should add to mozdevice? I see that
> getInfo [1] could return memory stats, but currently doesn't for the ADB
> device manager [2].
> 
> [1]
> http://mozbase.readthedocs.org/en/latest/mozdevice.html#mozdevice.
> DeviceManager.getInfo
> [2]
> http://hg.mozilla.org/mozilla-central/file/2399d1ae89e9/testing/mozbase/
> mozdevice/mozdevice/devicemanagerADB.py#l499

I think it would be a good idea to put something like this in devicemanagerADB? The current return value from devicemanagerSUT for memory available is kinda broken and illegible (I get "PA:332009472, FREE: 7692288" and have no idea what it actually means). Maybe a new info keyword like "memtotal" which just gives the total amount of ram available on the device makes the most sense.
Flags: needinfo?(wlachance)

Updated

3 years ago
Depends on: 1078274
I've raised bug 1078274 for returning the total memory available on the device. Let me know if you're interested to work on this, I'd be happy to mentor.
Attachment #8498781 - Flags: review?(mdas) → review+

Updated

3 years ago
Keywords: checkin-needed
Whiteboard: [leave-open]
https://hg.mozilla.org/integration/mozilla-inbound/rev/f50d71868097
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f50d71868097

Updated

3 years ago
Depends on: 1083218
I'm going to close this and implement the device information changes as part of bug 1065402. This is because getting a device manager instance in the code that generates the HTML report will be quite hacky.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Summary: Add base image version and memory allocation to HTML report → Add base image version to HTML report

Updated

3 years ago
Whiteboard: [leave-open]
You need to log in before you can comment on or make changes to this bug.