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

Add Alpine CI job with SourceHut #1917

Closed
wants to merge 2 commits into from
Closed

Add Alpine CI job with SourceHut #1917

wants to merge 2 commits into from

Conversation

XVilka
Copy link
Member

@XVilka XVilka commented Nov 1, 2021

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the documentation and the rizin book with the relevant information (if needed)

Detailed description

Alpine linux built around Musl and is widely used as a Docker/Podman container base.

Test plan

CI is green

Might be helpful for solving #982

../librz/util/thread.c: In function 'rz_th_setaffinity':
../librz/util/thread.c:138:26: warning: passing argument 1 of 'sched_setaffinity' makes integer from pointer without a cast [-Wint-conversion]
  138 |  if (sched_setaffinity(th->tid, sizeof(c), &c) != 0) {
      |                        ~~^~~~~
      |                          |
      |                          pthread_t {aka struct __pthread *}
In file included from /usr/include/pthread.h:30,
                 from ../librz/include/rz_th.h:24,
                 from ../librz/util/thread.c:4:
/usr/include/sched.h:91:23: note: expected 'pid_t' {aka 'int'} but argument is of type 'pthread_t' {aka 'struct __pthread *'}
   91 | int sched_setaffinity(pid_t, size_t, const cpu_set_t *);
      |                       ^~~~~
[1167/1725] Compiling C object librz/util/librz_util.so.0.4.0-git.p/strpool.c.o
[1168/1725] Compiling C object librz/util/librz_util.so.0.4.0-git.p/strbuf.c.o
[1169/1725] Compiling C object librz/util/librz_util.so.0.4.0-git.p/str_trim.c.o
../librz/util/sys.c: In function 'rz_sys_backtrace':
../librz/util/sys.c:303:2: warning: #warning TODO: rz_sys_bt : unimplemented [-Wcpp]
  303 | #warning TODO: rz_sys_bt : unimplemented
      |  ^~~~~~~

From src/shed/affinity.c from musl:

int sched_setaffinity(pid_t tid, size_t size, const cpu_set_t *set)
{
	return syscall(SYS_sched_setaffinity, tid, size, set);
}

int pthread_setaffinity_np(pthread_t td, size_t size, const cpu_set_t *set)
{
	return syscall(SYS_sched_setaffinity, td->tid, size, set);
}

Copy link
Member

@ret2libc ret2libc left a comment

Choose a reason for hiding this comment

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

We already build for alpine in our build-static job in ci.yml, why also this?

@XVilka
Copy link
Member Author

XVilka commented Nov 3, 2021

@ret2libc consider it's testing PR/branch. I thought it will solve the problem because that one was static and this one is dynamic. Apparently, it didn't resolve the issue.

@ret2libc
Copy link
Member

ret2libc commented Nov 3, 2021

@ret2libc consider it's testing PR/branch. I thought it will solve the problem because that one was static and this one is dynamic. Apparently, it didn't resolve the issue.

I think we already have a lot of checks during a PR creation and I'm of the idea that we don't really need to catch every single system bug at PR time, but it's also ok to have some failures in dev, as long as users are expected to use releases/stable branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants