Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
make
- name: execute test
run: |
sudo modprobe uio uio_pdrv_genirq uio_dmem_genirq
cd build

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you take opportunity to remove the cd build that is already done during build step ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each run keyword represents a new process and shell in the runner environment

@arnopo Thanks for the suggestion! As per the GitHub Actions workflow syntax reference (jobs.<job_id>.steps[*].run - https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun), doesn't each run: step spawn a new shell process, meaning the cd build from the build step would not carry over to the execute test step?

Probably also the reason why the test logs step references the full path build/Testing/Temporary/LastTest.log - https://github.com/OpenAMP/libmetal/blob/main/.github/workflows/continuous-integration.yml#L76 rather than just Testing/Temporary/LastTest.log ?

make test
- name: test logs
Expand Down
15 changes: 0 additions & 15 deletions lib/system/linux/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,21 +1113,6 @@ static int metal_linux_probe_driver(struct linux_bus *lbus,
ldrv->sdrv = sysfs_open_driver(lbus->bus_name, ldrv->drv_name);
}

/* Try sudo probing the module and then open the driver. */
if (!ldrv->sdrv) {
ret = snprintf(command, sizeof(command),
"sudo modprobe %s > /dev/null 2>&1", ldrv->mod_name);
if (ret >= (int)sizeof(command))
return -EOVERFLOW;
ret = system(command);
if (ret < 0) {
metal_log(METAL_LOG_WARNING,
"%s: executing system command '%s' failed.\n",
__func__, command);
}
ldrv->sdrv = sysfs_open_driver(lbus->bus_name, ldrv->drv_name);
}

/* If all else fails... */
return ldrv->sdrv ? 0 : -ENODEV;
}
Expand Down
Loading