History log of /openbmc/phosphor-led-sysfs/test/ (Results 1 – 25 of 39)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
673b981a01-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

interfaces: use old dbus encoding

Due to backwards compatibility with old configurations, this is an easy
fix to bring back the old object paths.

Tests are provided to capture this behavior.

Chang

interfaces: use old dbus encoding

Due to backwards compatibility with old configurations, this is an easy
fix to bring back the old object paths.

Tests are provided to capture this behavior.

Change-Id: Ic89f2eb02bb908cf23b833b08fdca941bef2a07a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

24d124f916-Jul-2024 Alexander Hansen <alexander.hansen@9elements.com>

sysfs: Refactor LED property parsing

Added new test for parsing led description from sysfs.

Since there are some edge cases that can happen, to make sure the
parsing happens as expected in all case

sysfs: Refactor LED property parsing

Added new test for parsing led description from sysfs.

Since there are some edge cases that can happen, to make sure the
parsing happens as expected in all cases.

The edge cases primarily come from the different led properties that can
be present or absent in devicetree. I have tested some combinations
thereof and would prefer the label to be generated by led sysfs instead
of manually providing the 3-component label.

However for that to work phosphor-led-sysfs must be able to extract the
labels components in all cases.

This modifies the behavior slightly but it will stay the same
for led names that have 1 or 3 components.

Change-Id: I8def089e4c8dc5d3a341cf6f6b1d6356f5aefe48
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

e48bf95d17-Aug-2022 Jayashree Dhanapal <jayashree-d@hcl.com>

controller: Heap-allocate LEDs

Do this in preparation for migrating to a single instance of the daemon
whose LED inventory is updated via DBus where the update is triggered by
udev.

Splitting out t

controller: Heap-allocate LEDs

Do this in preparation for migrating to a single instance of the daemon
whose LED inventory is updated via DBus where the update is triggered by
udev.

Splitting out this work reduces the review complexity of the patch that
rewrites the internals of the daemon.

Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I50e58126413514f7a64153f425629142fa5af6d4
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

29bd56b117-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I7282eed4dd7df45ffd15d5e93820b7f3013252b7
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...

001e2a3d01-Dec-2023 George Liu <liuxiwei@ieisystem.com>

Fix incorrect LED initial value

If LED is in blink state, `/sys/class/leds/<led_name>/trigger`
contains following:

```
none [timer] heartbeat default-on
```

The format of the content of the trigge

Fix incorrect LED initial value

If LED is in blink state, `/sys/class/leds/<led_name>/trigger`
contains following:

```
none [timer] heartbeat default-on
```

The format of the content of the trigger attribute is documented as
follows:

> What: /sys/class/leds/<led>/trigger
> Date: March 2006
> KernelVersion: 2.6.17
> Contact: Richard Purdie <rpurdie@rpsys.net>
> Description:
> Set the trigger for this LED. A trigger is a kernel based source
> of LED events.
>
> You can change triggers in a similar manner to the way an IO
> scheduler is chosen. Trigger specific parameters can appear in
> /sys/class/leds/<led> once a given trigger is selected. For
> their documentation see `sysfs-class-led-trigger-*`.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-class-led?h=v6.6#n71

That's unfortunately vague, but the "IO scheduler" reference is with
respect to the following:

> What: /sys/block/<disk>/queue/scheduler
> Date: October 2004
> Contact: linux-block@vger.kernel.org
> Description:
> [RW] When read, this file will display the current and available
> IO schedulers for this block device. The currently active IO
> scheduler will be enclosed in [] brackets. Writing an IO
> scheduler name to this file will switch control of this block
> device to that new IO scheduler. Note that writing an IO
> scheduler name to this file will attempt to load that IO
> scheduler module, if it isn't already present in the system.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/stable/sysfs-block?h=v6.6#n558

So the active trigger in the example at the top should be 'timer'.
However, getTrigger() currently returns "none", which leads to incorrect
results.

In setInitialState() the content of the "brightness" sysfs attribute
is read if the trigger is not "timer" (and it's not as it's "none").
But when LEDs is blinking, the read of `brightness` is undefined as
it may read 0 or 1.

Fixes: https://github.com/openbmc/phosphor-led-sysfs/issues/1

Change-Id: I1e06c2f9dc6511f04ec11aa30ea475f734496a50
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

85c1c2a729-Nov-2023 Patrick Williams <patrick@stwcx.xyz>

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer retur

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and auto.

Switch all uses of `enabled` to `allowed`.

Change-Id: I2fcb7f5ec79e4a71720306519e31d010ba9852ec
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

1c4503e710-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ifb60efb9b1e7ed6fab2ed71dcffb57f39c552de4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

f97abd1306-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: sysfs: Fix readability-static-accessed-through-instance

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:67:26: error: static member accessed through instance [readabili

test: sysfs: Fix readability-static-accessed-through-instance

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:67:26: error: static member accessed through instance [readability-static-accessed-through-instance,-warnings-as-errors]
f.exceptions(f.failbit);
^~
std::ofstream::
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:72:22: error: static member accessed through instance [readability-static-accessed-through-instance,-warnings-as-errors]
f.exceptions(f.failbit);
^~
std::ofstream::
```

Change-Id: I003097a68f17d4ec7ea8dee2e9638d8708770276
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

26085c2506-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: sysfs: Fix cppcoreguidelines-explicit-virtual-functions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:54:5: error: annotate this function with 'override' or (rarely)

test: sysfs: Fix cppcoreguidelines-explicit-virtual-functions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:54:5: error: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override,-warnings-as-errors]
~FakeSysfsLed()
^
override
```

Change-Id: I5461d3aee9c22080d5b88fda6084e0a7419e369e
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

ea80890506-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: sysfs: Fix readability-braces-around-statements

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:46:28: error: statement should be inside braces [readability-braces-arou

test: sysfs: Fix readability-braces-around-statements

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:46:28: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
if (dir == nullptr)
^
{
```

Change-Id: Ib36d16ad9c7b716b397ba95fb13aa2d41ec1f195
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

4156727306-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: sysfs: Fix several clang-tidy warnings

* cppcoreguidelines-avoid-c-arrays
* cppcoreguidelines-pro-bounds-array-to-pointer-decay
* readability-implicit-bool-conversion

```
../test/sysfs.cpp:42

test: sysfs: Fix several clang-tidy warnings

* cppcoreguidelines-avoid-c-arrays
* cppcoreguidelines-pro-bounds-array-to-pointer-decay
* readability-implicit-bool-conversion

```
../test/sysfs.cpp:42:9: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
char buffer[MAXPATHLEN] = {0};
^
../test/sysfs.cpp:44:17: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
strncpy(buffer, tmplt, sizeof(buffer) - 1);
^
../test/sysfs.cpp:45:29: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
char* dir = mkdtemp(buffer);
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:46:14: error: implicit conversion 'char *' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
if (!dir)
~^
== nullptr
```

Change-Id: Iab99b6551a51d83664c3f37df49f39f606614a7c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

b934a85706-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: sysfs: Fix cppcoreguidelines-special-member-functions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:31:7: error: class 'FakeSysfsLed' defines a non-default destructor

test: sysfs: Fix cppcoreguidelines-special-member-functions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:31:7: error: class 'FakeSysfsLed' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class FakeSysfsLed : public phosphor::led::SysfsLed
^
```

Change-Id: I180d0782fcb5c90a0e44f4023a3d146f1a408fb6
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

5998645f06-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: sysfs: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:29:25: error: invalid case style for variable 'MAX_BRIGHTNESS_VAL' [readability

test: sysfs: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:29:25: error: invalid case style for variable 'MAX_BRIGHTNESS_VAL' [readability-identifier-naming,-warnings-as-errors]
constexpr unsigned long MAX_BRIGHTNESS_VAL = 128;
^~~~~~~~~~~~~~~~~~
maxBrightnessVal
```

Change-Id: I8383e1476f31ff2c488b18a97d4a32294327a9c2
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

dea380c506-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: physical: Fix misc-unused-using-decls

```
../test/physical.cpp:74:18: error: using decl 'Throw' is unused [misc-unused-using-decls,-warnings-as-errors]
using ::testing::Throw;

test: physical: Fix misc-unused-using-decls

```
../test/physical.cpp:74:18: error: using decl 'Throw' is unused [misc-unused-using-decls,-warnings-as-errors]
using ::testing::Throw;
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:74:18: note: remove the using
using ::testing::Throw;
~~~~~~~~~~~~~~~~~^~~~~~
```

Change-Id: Ia13ce426cd366ea3c13f691fc1f1f93d1aa173ec
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

71246ca706-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: physical: Fix cppcoreguidelines-explicit-virtual-functions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:51:13: error: prefer using 'override' or (rarely) 'final'

test: physical: Fix cppcoreguidelines-explicit-virtual-functions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:51:13: error: prefer using 'override' or (rarely) 'final' instead of 'virtual' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override,-warnings-as-errors]
virtual ~MockLed()
~~~~~~~~^
override
```

Change-Id: If8fa33778605f485991723c24c3568d1c1af1cbb
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

c813e3b106-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: physical: Fix cppcoreguidelines-special-member-functions

```
../test/physical.cpp:44:7: error: class 'MockLed' defines a non-default destructor but does not define a copy constructor, a copy a

test: physical: Fix cppcoreguidelines-special-member-functions

```
../test/physical.cpp:44:7: error: class 'MockLed' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MockLed : public phosphor::led::SysfsLed
^
```

Change-Id: I8f13a36b826a9661377222dbd4b8a84fcbcdf23a
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

1caab51906-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: physical: Fix modernize-return-braced-init-list

```
../test/physical.cpp:41:12: error: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-re

test: physical: Fix modernize-return-braced-init-list

```
../test/physical.cpp:41:12: error: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list,-warnings-as-errors]
return fs::path(dir);
^
```

Change-Id: I80ca69e7dba3443f74cd16b756407ee2368923be
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

1978ed0506-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: physical: Fix several clang-tidy warnings

Address buffer management issues in createSandbox():

* cppcoreguidelines-avoid-c-arrays
* cppcoreguidelines-pro-bounds-array-to-pointer-decay
* reada

test: physical: Fix several clang-tidy warnings

Address buffer management issues in createSandbox():

* cppcoreguidelines-avoid-c-arrays
* cppcoreguidelines-pro-bounds-array-to-pointer-decay
* readability-implicit-bool-conversion
* readability-qualified-auto

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:23:5: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
char buffer[MAXPATHLEN] = {0};
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:25:13: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
strncpy(buffer, tmplt, sizeof(buffer) - 1);
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:26:5: error: 'auto dir' can be declared as 'auto *dir' [readability-qualified-auto,-warnings-as-errors]
auto dir = mkdtemp(buffer);
^~~~~
auto *
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:26:24: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
auto dir = mkdtemp(buffer);
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:27:10: error: implicit conversion 'char *' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
if (!dir)
~^
== nullptr
```

Change-Id: I6c7c7e7c88614378f160faac79f9a674055b83b9
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

feb990c506-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: physical: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:15:10: error: invalid case style for function 'create_sandbox' [readabili

test: physical: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:15:10: error: invalid case style for function 'create_sandbox' [readability-identifier-naming,-warnings-as-errors]
fs::path create_sandbox()
^~~~~~~~~~~~~~
createSandbox
```

Change-Id: I21a46563c5d75e27eff3ab1ffcc25e96025157e8
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

76544abd06-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

test: physical: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:10:16: error: invalid case style for variable 'LED_OBJ' [readability-iden

test: physical: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:10:16: error: invalid case style for variable 'LED_OBJ' [readability-identifier-naming,-warnings-as-errors]
constexpr auto LED_OBJ = "/foo/bar/led";
^~~~~~~
ledObj
```

Change-Id: I048eb89444702cf6bc5233f9b0e368908b134816
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

8e85228c06-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

sysfs: Fix several clang-tidy issues

* cppcoreguidelines-avoid-c-arrays
* cppcoreguidelines-pro-bounds-array-to-pointer-decay
* readability-identifier-naming

```
../sysfs.hpp:45:28: error: do not d

sysfs: Fix several clang-tidy issues

* cppcoreguidelines-avoid-c-arrays
* cppcoreguidelines-pro-bounds-array-to-pointer-decay
* readability-identifier-naming

```
../sysfs.hpp:45:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
static constexpr const char BRIGHTNESS[] = "brightness";
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:45:33: error: invalid case style for variable 'BRIGHTNESS' [readability-identifier-naming,-warnings-as-errors]
static constexpr const char BRIGHTNESS[] = "brightness";
^~~~~~~~~~
brightness
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:46:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
static constexpr const char MAX_BRIGHTNESS[] = "max_brightness";
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:46:33: error: invalid case style for variable 'MAX_BRIGHTNESS' [readability-identifier-naming,-warnings-as-errors]
static constexpr const char MAX_BRIGHTNESS[] = "max_brightness";
^~~~~~~~~~~~~~
maxBrightness
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:47:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
static constexpr const char TRIGGER[] = "trigger";
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:47:33: error: invalid case style for variable 'TRIGGER' [readability-identifier-naming,-warnings-as-errors]
static constexpr const char TRIGGER[] = "trigger";
^~~~~~~
trigger
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:48:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
static constexpr const char DELAY_ON[] = "delay_on";
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:48:33: error: invalid case style for variable 'DELAY_ON' [readability-identifier-naming,-warnings-as-errors]
static constexpr const char DELAY_ON[] = "delay_on";
^~~~~~~~
delayOn
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:49:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
static constexpr const char DELAY_OFF[] = "delay_off";
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:49:33: error: invalid case style for variable 'DELAY_OFF' [readability-identifier-naming,-warnings-as-errors]
static constexpr const char DELAY_OFF[] = "delay_off";
^~~~~~~~~
delayOff
../test/sysfs.cpp:62:46: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
std::array<const char *, 4> attrs = {BRIGHTNESS, TRIGGER, DELAY_ON, DELAY_OFF};
^
../test/sysfs.cpp:62:58: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
std::array<const char *, 4> attrs = {BRIGHTNESS, TRIGGER, DELAY_ON, DELAY_OFF};
^
../test/sysfs.cpp:62:67: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
std::array<const char *, 4> attrs = {BRIGHTNESS, TRIGGER, DELAY_ON, DELAY_OFF};
^
../test/sysfs.cpp:62:77: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
std::array<const char *, 4> attrs = {BRIGHTNESS, TRIGGER, DELAY_ON, DELAY_OFF};
^
```

Change-Id: I1df5f9b9f6a8c2073a0bc04ea5f88c580e2cb1b9
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

ff3d538b22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I44db990b2509a639c17765e7db10314ed858bd4d

show more ...

1f2b932b27-Dec-2021 George Liu <liuxiwei@inspur.com>

Fix some warnings by cppcheck

Warning message:
sysfs.hpp:27:5: style: Class 'SysfsLed' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
SysfsLed(std::filesystem::p

Fix some warnings by cppcheck

Warning message:
sysfs.hpp:27:5: style: Class 'SysfsLed' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
SysfsLed(std::filesystem::path&& root) : root(std::move(root))
^
test/sysfs.cpp:53:5: style: Class 'FakeSysfsLed' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
FakeSysfsLed(fs::path&& path) : SysfsLed(std::move(path))

Tested: Use cppcheck to build successfully and eliminate the above
warning message.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ib6cef5cb4eb6f44f3b8dcc0e9d2b95bd15c9818a

show more ...

5ee5f3b717-May-2021 George Liu <liuxiwei@inspur.com>

Remove autotools support

The intent behind this commit is build phosphor-led-sysfs with meson,
So clean up the autotools support.

Tested: built phosphor-led-sysfs successfully and worked.

Signed-o

Remove autotools support

The intent behind this commit is build phosphor-led-sysfs with meson,
So clean up the autotools support.

Tested: built phosphor-led-sysfs successfully and worked.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I217c3bf8e992bd3e58008559ee7adc313821b44c

show more ...

c7d70b6717-May-2021 George Liu <liuxiwei@inspur.com>

Add meson build

This commit is to add meson.build.
And later, we will remove Autotools and replace it with meson build.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I3107491093a6b69f9

Add meson build

This commit is to add meson.build.
And later, we will remove Autotools and replace it with meson build.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I3107491093a6b69f966bab6eeb4f2d7581bfa186

show more ...

12