<feed xmlns='http://www.w3.org/2005/Atom'>
<title>phosphor-led-sysfs, branch master</title>
<subtitle>OpenBMC Phosphor LED sysfs helper sources</subtitle>
<id>https://git.raptorcs.com/git/phosphor-led-sysfs/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/phosphor-led-sysfs/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/'/>
<updated>2019-04-08T04:18:50+00:00</updated>
<entry>
<title>physical: Conform to LED class kernel ABI</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2019-03-18T06:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=5b1417bd21d1e9c00b25bb6db700aec442af746d'/>
<id>urn:sha1:5b1417bd21d1e9c00b25bb6db700aec442af746d</id>
<content type='text'>
The kernel says the following about the LED sysfs interface:

&gt; LED handling under Linux
&gt; ========================
&gt;
&gt; In its simplest form, the LED class just allows control of LEDs from
&gt; userspace. LEDs appear in /sys/class/leds/. The maximum brightness of the
&gt; LED is defined in max_brightness file. The brightness file will set the brightness
&gt; of the LED (taking a value 0-max_brightness). Most LEDs don't have hardware
&gt; brightness support so will just be turned on for non-zero brightness settings.

The existing code assumed that max_brightness always held a value of
255 and defined a constant for it. Instead, use a class variable to
cache the max brightness for the associated LED.

Change-Id: I2d8f46de0cddac5f9d8ff5444449518bb4056130
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>physical: Avoid unreachable statement in driveLED()</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T06:15:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=2332e91ff6b0758026ce68f049a74cda6e13b702'/>
<id>urn:sha1:2332e91ff6b0758026ce68f049a74cda6e13b702</id>
<content type='text'>
This also slightly improves the branch coverage statistics

Change-Id: I27d5168994831789a8f8dafeecc843242a7e406a
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>physical: Cleanup unnecessary variables</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T06:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=bf0b0a929025255da9ef1b53982b51f034e9566d'/>
<id>urn:sha1:bf0b0a929025255da9ef1b53982b51f034e9566d</id>
<content type='text'>
Change-Id: Ib5897e4f7226993c2deb1feb6e2e39d5a0f0cb5a
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>physical: Rework commentary for brevity</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T06:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=30552c95285892a81dc4ae704263cc98d07f3208'/>
<id>urn:sha1:30552c95285892a81dc4ae704263cc98d07f3208</id>
<content type='text'>
Change-Id: I84341c6418853ad7fb44aa6f02ab298cc70842f6
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>physical: 'frequency' is really periodicity</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T05:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=e5c40feae02560f56790457be1c2e289ccd0ce6f'/>
<id>urn:sha1:e5c40feae02560f56790457be1c2e289ccd0ce6f</id>
<content type='text'>
Change-Id: I1007d2a7104fa07351c89c52a860cde83b2d509c
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: physical: Capture state(Action::{On,Off}) parameters</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T05:33:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=30726a0c584e77677f64d5f06f8588b1b9881532'/>
<id>urn:sha1:30726a0c584e77677f64d5f06f8588b1b9881532</id>
<content type='text'>
Implement value sensing to verify the behaviour of the On and Off
actions. This constrains future on/off changes to interacting with sysfs
in the same manner.

Change-Id: Ie0ac063cbda3156ca7f0ef2eab9e700013780e44
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: physical: Capture Action::Blink parameters</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T05:21:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=861e5625ed88a7eb68c671a91d7d68b9fa71aad2'/>
<id>urn:sha1:861e5625ed88a7eb68c671a91d7d68b9fa71aad2</id>
<content type='text'>
Implement value sensing to verify behaviour of the blink action. This
constrains future blink changes to interacting with sysfs in the same
manner.

Change-Id: I7ed0a5d52e8dc99192e7938760ce99f618b9cb16
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: physical: Hit both branches of stableStateOperation()</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T04:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=aee9c2c452db3ce43df62a0ac779fda6e65a64ca'/>
<id>urn:sha1:aee9c2c452db3ce43df62a0ac779fda6e65a64ca</id>
<content type='text'>
Change-Id: Ic32d87dbe996a03e811e1be88fbcc00bf450e1f3
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: physical: Cover trigger:none, brigtness:asserted branch</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T03:34:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=04275e06d2aab6a5e13807e0a295d3b48a979118'/>
<id>urn:sha1:04275e06d2aab6a5e13807e0a295d3b48a979118</id>
<content type='text'>
The test causes execution to take the following path in
setInitialState(), previously outlined in 264d909d3dc9 ("test: Add tests
for Physical class") as being missed:

    auto brightness = led.getBrightness();
    if (brightness == ASSERT)
    {
        // LED is in Solid ON
        sdbusplus::xyz::openbmc_project::Led::server ::Physical::state(
            Action::On);
    }

This brings the line coverage to 97.6% (function coverage remains
unchanged by this patch).

Change-Id: I7a04fcd97819559575e69d267c62f16195495010
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: physical: Cover trigger:timer branch in setInitialState()</title>
<updated>2019-04-08T04:18:50+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-25T02:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-led-sysfs/commit/?id=56692708507e58e889c97123578b376dd84399d9'/>
<id>urn:sha1:56692708507e58e889c97123578b376dd84399d9</id>
<content type='text'>
The test causes execution to take the following path in
setInitialState(), previously outlined in 264d909d3dc9 ("test: Add tests
for Physical class") as being missed:

    auto trigger = led.getTrigger();
    if (trigger == "timer")
    {
        // LED is blinking. Get the delay_on and delay_off and compute
        // DutyCycle. sfsfs values are in strings. Need to convert 'em over to
        // integer.
        auto delayOn = led.getDelayOn();
        auto delayOff = led.getDelayOff();

        // Calculate frequency and then percentage ON
        frequency = delayOn + delayOff;
        auto factor = frequency / 100;
        auto dutyOn = delayOn / factor;

        // Update.
        this-&gt;dutyOn(dutyOn);
    }

This brings the line coverage to 96.6% (function coverage remains
unchanged by this patch).

Change-Id: Ie311186f6275d3fdd31de5698c7c14bb335128e1
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
</feed>
