Skip to content

Commit ba73a3e

Browse files
authored
Merge pull request #3607 from heiher/fix-tests
[0.2] Fix libc-tests for loongarch64
2 parents 947a185 + dc40904 commit ba73a3e

13 files changed

+36
-16
lines changed

libc-test/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3344,6 +3344,7 @@ fn test_linux(target: &str) {
33443344
let gnueabihf = target.contains("gnueabihf");
33453345
let x86_64_gnux32 = target.contains("gnux32") && x86_64;
33463346
let riscv64 = target.contains("riscv64");
3347+
let loongarch64 = target.contains("loongarch64");
33473348
let uclibc = target.contains("uclibc");
33483349

33493350
let mut cfg = ctest_cfg();
@@ -3466,6 +3467,7 @@ fn test_linux(target: &str) {
34663467
// Include linux headers at the end:
34673468
headers! {
34683469
cfg:
3470+
[loongarch64]: "asm/hwcap.h",
34693471
[riscv64]: "asm/hwcap.h",
34703472
"asm/mman.h",
34713473
[gnu]: "linux/aio_abi.h",

libc-test/semver/linux-aarch64.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ SKF_NET_OFF
6666
SO_PRIORITY
6767
SO_PROTOCOL
6868
SYS_accept
69+
SYS_fstat
6970
SYS_msgctl
7071
SYS_msgget
7172
SYS_msgrcv
@@ -79,6 +80,7 @@ SYS_semctl
7980
SYS_semget
8081
SYS_semop
8182
SYS_semtimedop
83+
SYS_setrlimit
8284
SYS_shmat
8385
SYS_shmctl
8486
SYS_shmdt

libc-test/semver/linux-i686.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ SYS_fadvise64_64
9696
SYS_fchown32
9797
SYS_fcntl64
9898
SYS_fork
99+
SYS_fstat
99100
SYS_fstat64
100101
SYS_fstatat64
101102
SYS_fstatfs64
@@ -165,6 +166,7 @@ SYS_setregid32
165166
SYS_setresgid32
166167
SYS_setresuid32
167168
SYS_setreuid32
169+
SYS_setrlimit
168170
SYS_setuid32
169171
SYS_sgetmask
170172
SYS_sigaction

libc-test/semver/linux-mips.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ SYS_epoll_wait
3030
SYS_eventfd
3131
SYS_fcntl64
3232
SYS_fork
33+
SYS_fstat
3334
SYS_fstat64
3435
SYS_fstatfs64
3536
SYS_ftime
@@ -77,6 +78,7 @@ SYS_send
7778
SYS_sendfile
7879
SYS_sendfile64
7980
SYS_set_thread_area
81+
SYS_setrlimit
8082
SYS_sgetmask
8183
SYS_sigaction
8284
SYS_signal

libc-test/semver/linux-powerpc.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ SYS_fadvise64
5454
SYS_fadvise64_64
5555
SYS_fcntl64
5656
SYS_fork
57+
SYS_fstat
5758
SYS_fstat64
5859
SYS_fstatat64
5960
SYS_fstatfs64
@@ -110,6 +111,7 @@ SYS_select
110111
SYS_send
111112
SYS_sendfile
112113
SYS_sendfile64
114+
SYS_setrlimit
113115
SYS_sgetmask
114116
SYS_sigaction
115117
SYS_signal

libc-test/semver/linux-powerpc64.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ SYS_epoll_create
6666
SYS_epoll_wait
6767
SYS_eventfd
6868
SYS_fork
69+
SYS_fstat
6970
SYS_fstatfs64
7071
SYS_ftime
7172
SYS_futimesat
@@ -117,6 +118,7 @@ SYS_rtas
117118
SYS_select
118119
SYS_send
119120
SYS_sendfile
121+
SYS_setrlimit
120122
SYS_sgetmask
121123
SYS_sigaction
122124
SYS_signal

libc-test/semver/linux-powerpc64le.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ SYS_epoll_create
6666
SYS_epoll_wait
6767
SYS_eventfd
6868
SYS_fork
69+
SYS_fstat
6970
SYS_fstatfs64
7071
SYS_ftime
7172
SYS_futimesat
@@ -117,6 +118,7 @@ SYS_rtas
117118
SYS_select
118119
SYS_send
119120
SYS_sendfile
121+
SYS_setrlimit
120122
SYS_sgetmask
121123
SYS_sigaction
122124
SYS_signal

libc-test/semver/linux-riscv64gc.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ SO_TIMESTAMPNS
4646
SO_WIFI_STATUS
4747
SYS_accept
4848
SYS_fadvise64
49+
SYS_fstat
4950
SYS_msgctl
5051
SYS_msgget
5152
SYS_msgrcv
@@ -59,6 +60,7 @@ SYS_semget
5960
SYS_semop
6061
SYS_semtimedop
6162
SYS_sendfile
63+
SYS_setrlimit
6264
SYS_shmat
6365
SYS_shmctl
6466
SYS_shmdt

libc-test/semver/linux-s390x.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ SYS_epoll_wait
4444
SYS_eventfd
4545
SYS_fadvise64
4646
SYS_fork
47+
SYS_fstat
4748
SYS_fstatfs64
4849
SYS_futimesat
4950
SYS_get_kernel_syms
@@ -76,6 +77,7 @@ SYS_s390_pci_mmio_write
7677
SYS_s390_runtime_instr
7778
SYS_select
7879
SYS_sendfile
80+
SYS_setrlimit
7981
SYS_sigaction
8082
SYS_signal
8183
SYS_signalfd

libc-test/semver/linux-sparc64.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ SYS_execv
4040
SYS_fadvise64
4141
SYS_fadvise64_64
4242
SYS_fork
43+
SYS_fstat
4344
SYS_fstat64
4445
SYS_fstatat64
4546
SYS_fstatfs64
@@ -79,6 +80,7 @@ SYS_sched_set_affinity
7980
SYS_select
8081
SYS_sendfile
8182
SYS_sendfile64
83+
SYS_setrlimit
8284
SYS_sgetmask
8385
SYS_sigaction
8486
SYS_signal

libc-test/semver/linux-x86_64.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ SYS_epoll_wait
9393
SYS_eventfd
9494
SYS_fadvise64
9595
SYS_fork
96+
SYS_fstat
9697
SYS_futimesat
9798
SYS_getdents
9899
SYS_getpgrp
@@ -120,6 +121,7 @@ SYS_renameat
120121
SYS_rmdir
121122
SYS_select
122123
SYS_sendfile
124+
SYS_setrlimit
123125
SYS_signalfd
124126
SYS_stat
125127
SYS_symlink

libc-test/semver/linux.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,7 +2876,6 @@ SYS_flistxattr
28762876
SYS_flock
28772877
SYS_fremovexattr
28782878
SYS_fsetxattr
2879-
SYS_fstat
28802879
SYS_fstatfs
28812880
SYS_fsync
28822881
SYS_ftruncate
@@ -3031,7 +3030,6 @@ SYS_setregid
30313030
SYS_setresgid
30323031
SYS_setresuid
30333032
SYS_setreuid
3034-
SYS_setrlimit
30353033
SYS_setsid
30363034
SYS_setsockopt
30373035
SYS_settimeofday

src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -264,20 +264,20 @@ align_const! {
264264
};
265265
}
266266

267-
pub const HWCAP_CPUCFG: ::c_ulong = 1 << 0;
268-
pub const HWCAP_LAM: ::c_ulong = 1 << 1;
269-
pub const HWCAP_UAL: ::c_ulong = 1 << 2;
270-
pub const HWCAP_FPU: ::c_ulong = 1 << 3;
271-
pub const HWCAP_LSX: ::c_ulong = 1 << 4;
272-
pub const HWCAP_LASX: ::c_ulong = 1 << 5;
273-
pub const HWCAP_CRC32: ::c_ulong = 1 << 6;
274-
pub const HWCAP_COMPLEX: ::c_ulong = 1 << 7;
275-
pub const HWCAP_CRYPTO: ::c_ulong = 1 << 8;
276-
pub const HWCAP_LVZ: ::c_ulong = 1 << 9;
277-
pub const HWCAP_LBT_X86: ::c_ulong = 1 << 10;
278-
pub const HWCAP_LBT_ARM: ::c_ulong = 1 << 11;
279-
pub const HWCAP_LBT_MIPS: ::c_ulong = 1 << 12;
280-
pub const HWCAP_PTW: ::c_ulong = 1 << 13;
267+
pub const HWCAP_LOONGARCH_CPUCFG: ::c_ulong = 1 << 0;
268+
pub const HWCAP_LOONGARCH_LAM: ::c_ulong = 1 << 1;
269+
pub const HWCAP_LOONGARCH_UAL: ::c_ulong = 1 << 2;
270+
pub const HWCAP_LOONGARCH_FPU: ::c_ulong = 1 << 3;
271+
pub const HWCAP_LOONGARCH_LSX: ::c_ulong = 1 << 4;
272+
pub const HWCAP_LOONGARCH_LASX: ::c_ulong = 1 << 5;
273+
pub const HWCAP_LOONGARCH_CRC32: ::c_ulong = 1 << 6;
274+
pub const HWCAP_LOONGARCH_COMPLEX: ::c_ulong = 1 << 7;
275+
pub const HWCAP_LOONGARCH_CRYPTO: ::c_ulong = 1 << 8;
276+
pub const HWCAP_LOONGARCH_LVZ: ::c_ulong = 1 << 9;
277+
pub const HWCAP_LOONGARCH_LBT_X86: ::c_ulong = 1 << 10;
278+
pub const HWCAP_LOONGARCH_LBT_ARM: ::c_ulong = 1 << 11;
279+
pub const HWCAP_LOONGARCH_LBT_MIPS: ::c_ulong = 1 << 12;
280+
pub const HWCAP_LOONGARCH_PTW: ::c_ulong = 1 << 13;
281281

282282
pub const SYS_io_setup: ::c_long = 0;
283283
pub const SYS_io_destroy: ::c_long = 1;

0 commit comments

Comments
 (0)