From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: DJ Delorie <dj@redhat.com>
Cc: "linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
"ahajkova@redhat.com" <ahajkova@redhat.com>
Subject: Re: How to elf/tst-ldconfig-* in cross test setup
Date: Wed, 11 Mar 2020 21:50:30 +0000 [thread overview]
Message-ID: <1e5222c2-5e79-1cbe-1bc1-ea1c31f920a3@synopsys.com> (raw)
In-Reply-To: <xn36ae60br.fsf@greed.delorie.com>
On 3/11/20 2:36 PM, DJ Delorie via Libc-alpha wrote:
> Vineet Gupta via Libc-alpha <libc-alpha@sourceware.org> writes:
>> The issue is expected src-path for dso.
>>
>> | [pid 168] renameat(AT_FDCWD, "/usr/lib/tst-ldconfig-ld-mod.so", AT_FDCWD,
>> | "/tmp/tst-ldconfig/libldconfig-ld-mod.so") = -1 EXDEV
>> | (Invalid cross-device link)
>>
>> In cross setup, /usr/lib needs to be the host path where test is built or the dso
>> needs to be copied over to target at the canonical location. I'm not sure what the
>> right approach is so any pointers would be great.
>
> This rename should be happening inside the test-container, in a
> subdirectory of the build, so should not be a cross-dev link. Are you
> trying to run these tests manually?
No, I'm running this is a cross-compiled setup where the test artifacts are on a
NFS mounted host. Here's the full strace for test
$ strace_static -f
~/br/build/glibc-867196a7635/build/elf/tst-ldconfig-ld_so_conf-update
execve("~/br/build/glibc-867196a7635/build/elf/tst-ldconfig-ld_so_conf-update",
["~/br"...], 0x5ffffdc4 /* 11 va0
brk(NULL) = 0x1a000
uname({sysname="Linux", nodename="hsdk", ...}) = 0
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file
or directory)
openat(AT_FDCWD, "/lib/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such
file or directory)
statx(AT_FDCWD, "/lib/tls", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT,
STATX_BASIC_STATS, 0x5ffff164) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\303\0\1\0\0\0<\v\0\0004\0\0\0"...,
512) = 512
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS,
{stx_mask=STATX_BASIC_STATS, stx_attributes=0, stx_mode=S_IFREG|0755,
stx_size=309012, ...}) = 0
mmap2(NULL, 16516, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x20020000
mmap2(0x20022000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x20022000
close(3) = 0
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\303\0\1\0\0\0\340\264\1\0004\0\0\0"..., 512)
= 512
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS,
{stx_mask=STATX_BASIC_STATS, stx_attributes=0, stx_mode=S_IFREG|0755,
stx_size=24324580, ...}) = 0
mmap2(NULL, 1060392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x20026000
mprotect(0x20122000, 8192, PROT_NONE) = 0
mmap2(0x20124000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfc000) = 0x20124000
mmap2(0x20128000, 3624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS,
-1, 0) = 0x20128000
close(3) = 0
mmap2(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2012a000
arc_settls(0x2012a478) = 0
mprotect(0x20124000, 8192, PROT_READ) = 0
mprotect(0x20022000, 8192, PROT_READ) = 0
mprotect(0x16000, 8192, PROT_READ) = 0
mprotect(0x2001c000, 8192, PROT_READ) = 0
mmap2(NULL, 8, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x2001a000
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x2012a06c) = 2322
/home/vineetg/arc/BR-glibc/strace_static: Process 2322 attached
[pid 2321] rt_sigaction(SIGALRM, {sa_handler=0x123f8, sa_mask=[ALRM],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x200513f8}, <unfinished ...>
[pid 2322] prlimit64(0, RLIMIT_CORE, {rlim_cur=0, rlim_max=0}, <unfinished ...>
[pid 2321] <... rt_sigaction resumed>{sa_handler=SIG_DFL, sa_mask=[],
sa_flags=0}, 8) = 0
[pid 2322] <... prlimit64 resumed>NULL) = 0
[pid 2322] setpgid(0, 0 <unfinished ...>
[pid 2321] setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=20},
it_value={tv_sec=20, tv_usec=894348}}, <unfinished ...>
[pid 2322] <... setpgid resumed>) = 0
[pid 2321] <... setitimer resumed>{it_interval={tv_sec=0, tv_usec=0},
it_value={tv_sec=6917526297652493452, tv_usec=2306054381734274040}}) = 0
[pid 2322] statx(AT_FDCWD, "/var/cache/ldconfig",
AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, <unfinished ...>
[pid 2321] rt_sigaction(SIGINT, {sa_handler=0x123f8, sa_mask=[INT],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x200513f8}, <unfinished ...>
[pid 2322] <... statx resumed>{stx_mask=STATX_BASIC_STATS, stx_attributes=0,
stx_mode=S_IFDIR|0700, stx_size=60, ...}) = 0
[pid 2321] <... rt_sigaction resumed>{sa_handler=SIG_DFL, sa_mask=[],
sa_flags=0}, 8) = 0
[pid 2322] statx(AT_FDCWD, "/tmp/tst-ldconfig",
AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, <unfinished ...>
[pid 2321] wait4(2322, <unfinished ...>
[pid 2322] <... statx resumed>{stx_mask=STATX_BASIC_STATS, stx_attributes=0,
stx_mode=S_IFDIR|0755, stx_size=40, ...}) = 0
[pid 2322] brk(NULL) = 0x1a000
[pid 2322] brk(0x3c000) = 0x3c000
[pid 2322] renameat(AT_FDCWD,
"~/br/build/glibc-867196a7635/build/elf/tst-ldconfig-ld-mod.so", AT_FDCWD,
"/tmp/tst-ldconfig/libldconfig-ld-)
[pid 2322] write(1, "error: tst-ldconfig-ld_so_conf-u"..., 44error:
tst-ldconfig-ld_so_conf-update.c:78: ) = 44
[pid 2322] write(1, "Renaming/moving the DSO failed: "..., 57Renaming/moving the
DSO failed: Invalid cross-device link) = 57
[pid 2322] write(1, "\n", 1
) = 1
[pid 2322] exit_group(1) = ?
[pid 2322] +++ exited with 1 +++
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2020-03-11 21:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 19:56 How to elf/tst-ldconfig-* in cross test setup Vineet Gupta
2020-03-11 21:36 ` DJ Delorie
2020-03-11 21:50 ` Vineet Gupta [this message]
2020-03-11 22:07 ` DJ Delorie
2020-03-11 22:14 ` Vineet Gupta
2020-03-11 22:21 ` Vineet Gupta
2020-03-11 22:28 ` DJ Delorie
2020-03-11 22:38 ` Vineet Gupta
2020-03-11 22:56 ` Vineet Gupta
2020-03-12 0:53 ` Vineet Gupta
2020-03-11 22:23 ` DJ Delorie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1e5222c2-5e79-1cbe-1bc1-ea1c31f920a3@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=ahajkova@redhat.com \
--cc=dj@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-snps-arc@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.