On 2023-06-02 12:06:25+0800, Zhangjin Wu wrote:
Willy, Arnd and Thomas
Based on your suggestions, in the comming v3, I plan to split the whole rv32 support to something like this:
Is each of these parts a new patchset?
Yeah, It is also my plan, just like the v2 series.
I would suggest to do so.
Generic part1
(The old feedbacks are applied with the new Suggested-by lines, welcome your additional feedbacks if there are ;-))
selftests/nolibc: syscall_args: use generic __NR_statx tools/nolibc: add missing nanoseconds support for __NR_statx selftests/nolibc: allow specify extra arguments for qemu selftests/nolibc: fix up compile warning with glibc on x86_64 selftests/nolibc: not include limits.h for nolibc selftests/nolibc: use INT_MAX instead of __INT_MAX__ tools/nolibc: arm: add missing my_syscall6 tools/nolibc: open: fix up compile warning for arm selftests/nolibc: support two errnos with EXPECT_SYSER2() selftests/nolibc: remove gettimeofday_bad1/2 completely selftests/nolibc: add new gettimeofday test cases
These all look good and non-controversial.
Add Compile support for rv32
(Convert all of the unsupported syscalls to a return of -ENOSYS, this allows us to fix up the test failures one by one not that urgently later)
tools/nolibc: fix up #error compile failures with -ENOSYS tools/nolibc: fix up undeclared syscall macros with #ifdef and -ENOSYS
These should be their own series in my opinion. It will likely generate some discussion.
The 1st one is not rv32 specific, but the 2nd one requires rv32 compile support to be validated.
selftests/nolibc: riscv: customize makefile for rv32
(The first two are new but clear enough, based on the idea of suggestion from Arnd [1])
- Fix up the left test failures one by one
I'm not a fan of adding an "official" rv32 support with still failing tests.
That is reasonable, but in another side, without the rv32 compile support, It may be a little hard to test the left patchsets (see below explain).
The other reasons for rv32 compile support is:
* Some people may use nolibc without the left syscalls. * It is able to detect the new test failures.
But anyway, the compile support is not urgent.
(Plan to add everyone as a standalone patchset, which will easier the review and merge progress)
wait4 -> waitid lseek -> llseek gettimeofday -> clock_gettime/clock_gettime64 select -> pselect6/pselect6_time64 ppoll -> ppoll_time64
I guess these new codepaths will also be used on non-rv32 architectures and will therefore validated without rv32.
Unfortunately, most of them are time32 syscalls related (except the llseek), rv32 is the first architecture who has no kernel side time32 syscalls support, that's why I plan to add compile support at first ;-)
If the new time64 syscalls will be added as the first 'branch', then, they will be validated on the other 32bit architecture, but some of them may be not added as the first 'branch', for example, the waitid() emulated wait4() is bigger than the original one.
So you could submit these before the final rv32 patch in a series.
Thanks for your suggestion.
I'm working on cleaning up them independently and carefully, will send them out as standalone patchsets.
Best regards, Zhangjin
Clean up some old test cases one by one
Like statx ...
Best regards, Zhangjin