Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proper chip and lines simulation to integrate on CI/CD #24

Open
sombriks opened this issue Feb 25, 2024 · 2 comments
Open

proper chip and lines simulation to integrate on CI/CD #24

sombriks opened this issue Feb 25, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request tests some kind of test (unit, functional, real hardware) is needed

Comments

@sombriks
Copy link
Owner

gather here any info related to the simulator.

for the two major versions if possible.

@sombriks sombriks added documentation Improvements or additions to documentation enhancement New feature or request tests some kind of test (unit, functional, real hardware) is needed labels Feb 25, 2024
@sombriks
Copy link
Owner Author

sombriks commented Mar 10, 2024

one partial update on this,

assuming that the kernel has the gpio-sim module, the following commands should create a fake chip for testing purposes:

mount | grep configfs  # provavelmente /sys/kernel/config
sudo su
modprobe gpio-sim
mkdir -p /sys/kernel/config/gpio-sim/fakegpio/gpio-bank0/line0
echo 1 > /sys/kernel/config/gpio-sim/fakegpio/live
chmod a+rw /dev/gpiochip1

then we can manipulate that chip like a real one, using libgpiod, or by /sys/devices/platform/gpio-sim.0/gpiochip1/sim_gpio0

detailed info at

if it works as expected, our test suite will be for real and helps immensely in the implementation of missing feature, so we will be able to do a 1.x release and work into 2.x s well.

image

@sombriks
Copy link
Owner Author

sombriks commented Apr 6, 2024

ok the thing is gpio-sim isn't available on older fedora (i am using 38 to develop 1.x branch) but gpio-mockup was supposed to be there but it is not.

so i need to compile the kernel module and try it again.

and, if it works, i need to proper document the process so everyone else could do it as well.

and, finally, do this in github actions so i can simulate a chip under my CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request tests some kind of test (unit, functional, real hardware) is needed
Projects
None yet
Development

No branches or pull requests

1 participant