fwts brightness - monitor hotkey events should have a delay

Bug #1983644 reported by HsuanYi Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fwts (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I think this fail is caused by the timing sequence.
After the hotkey is triggered, the brightness is get and set by the fwts functions earlier than the hotkey event:

--------------------------------------------------------------------------------
if (brightness_wait_event(fw) == 0)
    fwts_failed(fw, LOG_LEVEL_HIGH,
        "BrightnessNoHotKey",
        "Did not detect ACPI hotkey event.");
else {
    int new_brightness;

    if (brightness_get_setting(entry->d_name, "actual_brightness", &new_brightness) != FWTS_OK) {
        fwts_failed(fw, LOG_LEVEL_HIGH,
            "BrightnessNotExist",
            "Actual brightness could not be accessed for %s.",
            entry->d_name);
    } else {
        if (new_brightness > 0)
            fwts_passed(fw, "Brightness increased on UP hotkey for %s.", entry->d_name);
        else
            fwts_failed(fw, LOG_LEVEL_HIGH,
                "BrightnessNoIncrease",
                "Did not see brightness increased for %s.",
                entry->d_name);
    }
}

tmp = (saved_brightness > 0) ? saved_brightness : 1;
brightness_set_setting(entry->d_name, "brightness", tmp);
fwts_printf(fw, "==== Press the brightness DOWN hotkey for %s ====\n", entry->d_name);
--------------------------------------------------------------------------------

Maybe it should have a delay after brightness_wait_event.

Revision history for this message
HsuanYi Lin (mark126688) wrote :
HsuanYi Lin (mark126688)
Changed in fwts (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.