Age | Commit message (Collapse) | Author |
|
Without this patch, since https://github.com/torvalds/linux/commit/dcd46d897adb70d63e025f175a00a89797d31a43
this test runs in infinite loop.
Signed-off-by: Yann Sionneau <ysionneau@kalrayinc.com>
|
|
|
|
|
|
|
|
Move function call outside the inline asm code to simplify a clobber list.
The patch fixes tests tst-tls7 and tst-tls8 on ARCv3, they didn't pass
because cc was not in clobber list and bad code was generated. The
compiler didn't take in account changes of CPU Condition flags.
Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
|
|
Signed-off-by: Sergey Matyukevich <sergey.matyukevich@synopsys.com>
Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
Use @DTPOFF instead of @TPOFF in TLS_LD as specified by the xtensa ABI.
DTPOFF produces variable offset relative to the variable's module TLS
block, it's the linker's job to replace it with TPOFF and adjust
surrounding code when the object file is linked into an executable.
This fixes tests tls/tst-tls[123] on xtensa that fail if built as PIE.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
|
|
add nios2 tls macros from glibc
|
|
Retrieved from
https://github.com/bminor/glibc/blob/master/sysdeps/nios2/tls-macros.h
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Signed-off-by: Yann Sionneau <yann@sionneau.net>
|
|
|
|
|
|
|
|
|
|
|
|
* TLS tests were "empty" because nothing was setting the following variables:
* USE_TLS
* HAVE___THREAD
* HAVE_TLS_MODEL_ATTRIBUTE
All toolchains supported by uClibc-ng today do support both NPTL threads and TLS.
All ports also define HAVE_TLS_MODEL_ATTRIBUTE except alpha.
* 3 tests (tst-tls6 / tst-tls7 / tst-tls8) were peeking into internal/private
data structures from libc, which is not possible anymore since libc and
tests are now split into 2 git repositories.
This commit fixes those 2 issues so that TLS tests can be run again.
Signed-off-by: Yann Sionneau <yann@sionneau.net>
|
|
This was causing a compile error for powerpc64 toolchain
because r3 was both listed as clobbered and as output
in inline asm.
Signed-off-by: Yann Sionneau <yann@sionneau.net>
|
|
Signed-off-by: Yann Sionneau <yann@sionneau.net>
|
|
Signed-off-by: Yann Sionneau <yann@sionneau.net>
|
|
|
|
Fix build with latest glibc
|
|
Fix the following error with latest glibc:
In file included from /home/fabrice/buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot/usr/include/mqueue.h:93:0,
from tst-mqueue4.c:22:
In function 'mq_open',
inlined from 'do_test' at tst-mqueue4.c:174:6:
/home/fabrice/buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot/usr/include/bits/mqueue2.h:41:5: error: call to '__mq_open_wrong_number_of_args' declared with attribute error: mq_open can be called either with 2 or 4 arguments
__mq_open_wrong_number_of_args ();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.net/results/f370abcc8dc12975d96a46c34db978554f8c21db
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Fix the following error with latest glibc:
In function 'open',
inlined from 'do_test' at tst-nftw.c:38:10,
inlined from 'main' at ../test-skeleton.c:318:12:
/home/mark/buildroot-test/instance-0/output/host/riscv32-buildroot-linux-gnu/sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
__open_missing_mode ();
^~~~~~~~~~~~~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.net/results/f370abcc8dc12975d96a46c34db978554f8c21db
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
|
|
|
|
|
|
This test was changed from using fork to vfork by:
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=822e4896c1072b9f84b17f4f7bcb7c51d1a57723
This change was wrong because man page says the child of vfork() must ONLY do either:
- a call to one of exec(2)
- a call to _exit(2)
- get killed by a signal
BUT the test case does:
- a call to kill
- and also a call to exit(3) and not _exit(2)
This test produces a double free() causing assert in free because this is called several times:
https://elixir.bootlin.com/uclibc-ng/latest/source/libc/stdlib/_atexit.c#L270
So, it seems wrong both in theory (according to man page) and in fact in practice (assert in free).
Here I propose to get back to testing fork(), which is the original test case from:
https://sourceware.org/bugzilla/show_bug.cgi?id=838
And to just "PASS" on no-mmu systems.
For the record, here is the assert call stack:
FAIL tst-mallocfork got 1 expected 0
./tst-mallocfork: libc/stdlib/malloc-standard/malloc.c: 149: __do_check_inuse_chunk: Assertion `((((mchunkptr)(((char*)(p))+((p)->size & ~0x1)))->size) & 0x1)' failed.
Didn't expect signal from child: got `Aborted'
0 free (mem=0x3a010) at libc/stdlib/malloc-standard/free.c:285
1 0x00000000000220c4 in __exit_handler (status=1) at libc/stdlib/_atexit.c:270
2 0x000000000001afa0 in __GI_exit (rv=1) at libc/stdlib/_atexit.c:301
3 0x0000000000010dcc in main (argc=1, argv=0x7ffffffd98) at ../test-skeleton.c:405
4 0x000000000001cba8 in __uClibc_main (main=0x10988 <main>, argc=1, argv=0x7ffffffd98, app_init=0x100e8, app_fini=0x23918 <_fini>, rtld_fini=0x0 <k1c_start>, stack_end=0x7ffffffd90) at libc/misc/internals/__uClibc_main.c:512
5 0x00000000000eb8b8 in ?? ()
Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
|
|
Seen on ARC when it passed in 1 setup, but segv on other
| Path: /sd/arc_initramfs_hs_1812-gnu-2018.09-BIG/uClibc-ng-testsuite-Os/rt/tst-posix_spawn
| CPU: 1 PID: 3313 Comm: tst-posix_spawn Not tainted
| 4.19.0-00003-ga4e0cf751ad3 #108
|
| [ECR ]: 0x00050100 => Invalid Read @ 0x00000000 by insn @ 0x20060c84
| [EFA ]: 0x00000000
| [BLINK ]: 0x20060bf4
| [ERET ]: 0x20060c84
| @off 0x52c84 in [/lib/libuClibc-1.0.29.so]
| VMA: 0x2000e000 to 0x20072000
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
Since glibc 2.28
(https://savannah.gnu.org/forum/forum.php?forum_id=9205), the obsolete
functions encrypt, encrypt_r, setkey, setkey_r, cbc_crypt, ecb_crypt,
and des_setparity are no longer available to newly linked binaries, and
the headers <rpc/des_crypt.h> and <rpc/rpc_des.h> are no longer
installed. These functions encrypted and decrypted data with the DES
block cipher, which is no longer considered secure. Software that still
uses these functions should switch to a modern cryptography library,
such as libgcrypt.
So add a NO_CRYPT variable to disable test/crypt
Fixes:
- http://autobuild.buildroot.org/results/158438debb0ce313b012b871e199bed42ba38294
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
|
|
This seems to work fine on ARC !
This reverts commit f0567d67075ff7a27ada8ab5bce750fe8a739763.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
They cannot be enabled, because atomic.h is not exported
and just an internal uClibc-ng header.
Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
|
|
The RWF_DSYNC and RWF_HIPRI macros were introduced in kernel version 4.6
with the preadv2/pwritev2 system calls. musl libc provides its own
syscall definitions, even when the kernel headers are older. This leads
to the following build failure:
tst-syscall6.c: In function 'main':
tst-syscall6.c:32:48: error: 'RWF_DSYNC' undeclared (first use in this function)
nio = syscall(SYS_pwritev2, fd, iov, 2, 0, 0, RWF_DSYNC);
^~~~~~~~~
tst-syscall6.c:32:48: note: each undeclared identifier is reported only once for each function it appears in
tst-syscall6.c:42:58: error: 'RWF_HIPRI' undeclared (first use in this function)
nio = syscall(SYS_preadv2, fd, iov, 1, strlen(str0), 0, RWF_HIPRI);
^~~~~~~~~
Make the code depend also on RWF_HIPRI to fix this failure.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
|
|
|
|
|
|
|
|
|
Add tests in preparation for genericizing some of the architecture
syscall() implementations.
This was noticed when testing OR1K and found it had a broken syscall
implementation.
These tests try to cover the libc syscall() lqyer which has the purpose
of passing the syscall number and arguments to the kernel. The actual
kernel syscalls chosen have been selected for ease of testing.
Signed-off-by: Stafford Horne <shorne@gmail.com>
|
|
|
|
When ran on ARC, these tests would ocassionally fail
| [ARCLinux]# for i in 1 2 3 4 5 ; do ./tst-cancel2; echo $?; done
| write succeeded
| result is wrong: expected 0xffffffff, got 0x1
| 1 <-- fail
| 0 <-- pass
| 0 <--- pass
| 0 <-- pass
| write succeeded
| result is wrong: expected 0xffffffff, got 0x1
| 1 <-- fail
Same test (which originated form glibc) doesn't fail in glibc builds.
Turns out there's a subtle race in uclibc version
The test creates a new thread, makes it do a looong write call, and
parent then cancels the thread, expecting it to unwind out of write
call cleanly. However the write (even for 10k bytes) could finish
before parent gets a chance to resume and/or cancel it, causing the
occasional failure.
Fix this subtelty by making it write not just once but forever.
Cc: Cupertino Miranda <cmiranda@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
This reverts commit 1502f8269bb8e58f8b29fb69af3a3b8c7b2532de.
|
|
Follow-up of 68de9946e914d8c30dcc6667a059ea59e5b74cac
Signed-off-by: Eugene Rudoy <gene.devel@gmail.com>
|
|
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
|
|
|
|
|
|
|