diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2023-10-19 13:11:11 +0200 |
---|---|---|
committer | Martin Jansa <martin.jansa@gmail.com> | 2024-09-20 10:21:33 +0200 |
commit | 25793ea52cdbb4878e0510f5e8c899a3e18ec628 (patch) | |
tree | cf6d5cd509cd413d293b64060ca43bb24840911e /meta/recipes-devtools/python/python3-typing-extensions_4.2.0.bb | |
parent | 45fb756a078c4486888a8b753995a5cf87643acb (diff) | |
download | openembedded-core-contrib-jansa/master.tar.gz |
io-uring-writev: add simple test for writting file with io_uringjansa/styheadjansa/master
* pseudo doesn't support io_uring yet as shown after nodejs was upgraded
and nodejs-native >= 20.3.0 with libuv >= 1.45.0 which has:
https://github.com/libuv/libuv/pull/3952
* files created in do_install with nodejs-native aren't tracked by pseudo
and will result in host-user-contamination QA issue or
"KeyError: 'getpwuid(): uid not found" as documented in:
https://github.com/shr-project/com.webos.app.minimal/commit/bd238047c8ce3cd085041d276613396b863213cf
* this is much simpler test for io_uring without the need to build whole
nodejs-native, it's based on:
https://unixism.net/2020/04/io-uring-by-example-part-1-introduction/
just using writev instead of readv
* if it works fine, the file "test" will be tracked in pseudo database
since the creation in ${D} like:
core2-64-oe-linux/io-uring-writev/1.0 $ sqlite3 pseudo/files.db "select * from files"
1|/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/io-uring-writev/1.0/image|66305|48357743|0|0|16877|0|0
2|/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/io-uring-writev/1.0/image/test|66305|48316709|0|0|33188|0|0
and it does in this case, because I haven't figured out how to call writev()
without opening the fd of output file first where the openat() call gets
intercepted by pseudo
io-uring-writev/1.0 $ strace -v ./io-uring-writev test2 2>&1 | grep openat
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "test2", O_WRONLY|O_CREAT, 0666) = 4
while with libuv there was no openat() for the output files in strace
* add test with libuv as well and surprisingly it's still working in current pseudo
oe-core/tmp-glibc/work/core2-64-oe-linux/io-uring-writev/1.0 $ sqlite3 pseudo/files.db "select * from files"
1|/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/io-uring-writev/1.0/image|66305|62072917|0|0|16877|0|0
2|/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/io-uring-writev/1.0/image/test|66305|62061857|0|0|33188|0|0
3|/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/io-uring-writev/1.0/image/task-copy.h|66305|62061858|0|0|33188|0|0
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/python/python3-typing-extensions_4.2.0.bb')
0 files changed, 0 insertions, 0 deletions