Re: [uclibc-ng-devel] arc patch from glibc repo

2017-12-16 Thread Waldemar Brodkorb
Hi Vineet,
Vineet Gupta wrote,

> On 11/05/2017 02:03 AM, Waldemar Brodkorb wrote:
> >Hi Alexey,
> >
> >the attached patch fixes at least 3 test suite errors for me.
> >tst-cancel20/21/4.
> >Tested with latest 2017.09 ARC binutils/gcc.
> >
> >Okay to apply?
> >
> >best regards
> >  Waldemar
> 
> Are you sure it is the list above.
> 
> I presume, 
> https://tests.embedded-test.org/uClibc-ng/1.0.26/REPORT.arcv2.libc.uClibc-ng-1.0.26
> didn't have this fix and yet the tests mentioned above are PASS there.
> 
> The reason I ask is because in my experiments here with ARC GNU 2017.09 +
> uClibc with and w/o this patch (actually not exactly same, but similar -
> attached), I don't see any consistent PASS(es)
> There are some changes to say tst-kill6, tst-oncex3 etc but if you run them
> 5 times they seem to PASS/FAIL randomly - in either setups
> 
> So this patch is not fixing anything IMO. We need to really fix the inherent
> race in these tests.
> 
> BTW I did post a test case fix for tst-cancel2 and that is now consistently 
> PASS.

Indeed it seems really to depend on which system I have run the
tests with and without the patch.

On my IBM X200 notebook the tests passed after adding the patch.
But on the gcc farm server the tests were still failing.

So it is like you said, the patch does not fix the issue.

best regards
 Waldemar
___
devel mailing list
devel@uclibc-ng.org
https://mailman.uclibc-ng.org/cgi-bin/mailman/listinfo/devel


[uclibc-ng-devel] Proper test for broken posix_spawn

2017-12-16 Thread Alex Potapenko
Hi Waldemar,

I've recently encountered an issue with broken posix_spawn in uClibc-ng
1.0.26, which made cups 2.2.[46] unusable. Looking at commit
71b3a63b641716165f664cf112be0673a122cea0, I see that it should be fixed in
1.0.27. I have a small test code that illustrates the problem with
posix_spawn, which works fine with GNU lib C, but fails with uClibc-ng
1.0.26 (see posix_spawn.c attached). If I remove POSIX_SPAWN_SETSIGDEF
flag, it works OK. I can't test it with 1.0.27 yet, could you please verify
that it works?

Also, if it works fine, another question. What is the proper macro test for
working posix_spawn (uClibc-ng version 1.0.27+)?

Thank you,
Alex
#include 
#include 
#include 

#include 
#include 
#include 

extern char **environ;

void run_cmd(char *cmd)
{
pid_t pid;
posix_spawnattr_t attrs;
posix_spawn_file_actions_t actions;
sigset_t defsignals;
char *argv[] = {"sh", "-c", cmd, NULL};
int status;

sigemptyset();
sigaddset(, SIGTERM);
sigaddset(, SIGCHLD);
sigaddset(, SIGPIPE);

posix_spawnattr_init();
posix_spawnattr_setflags(, POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_SETSIGDEF);
posix_spawnattr_setpgroup(, 0);
posix_spawnattr_setsigdefault(, );

printf("Run command: %s\n", cmd);
status = posix_spawn(, "/bin/sh", , , argv, environ);
if (status == 0) {
printf("Child pid: %i\n", pid);
if (waitpid(pid, , 0) != -1) {
printf("Child exited with status %i\n", status);
} else {
perror("waitpid");
}
} else {
printf("posix_spawn: %s\n", strerror(status));
}
}

int main(int argc, char* argv[])
{
run_cmd(argv[1]);
return 0;
}
___
devel mailing list
devel@uclibc-ng.org
https://mailman.uclibc-ng.org/cgi-bin/mailman/listinfo/devel