Re: How to elf/tst-ldconfig-* in cross test setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/11/20 2:36 PM, DJ Delorie via Libc-alpha wrote:
> Vineet Gupta via Libc-alpha <libc-alpha@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-snps-arc



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux