diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2023-10-19 13:11:11 +0200 |
---|---|---|
committer | Martin Jansa <martin.jansa@gmail.com> | 2024-05-23 12:53:27 +0200 |
commit | 51d2866de793d71453dae42ccd3192443d09aa96 (patch) | |
tree | cfc680dd2f6c4ad6a2ea49461f5c3c2b2d6fe437 /meta/recipes-devtools/python/python3-magic_0.4.26.bb | |
parent | 4db06f6e8675de2a23b38672a983e40a69e8915b (diff) | |
download | openembedded-core-contrib-jansa/master.tar.gz |
io-uring-writev: add simple test for writting file with io_uringjansa/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-magic_0.4.26.bb')
0 files changed, 0 insertions, 0 deletions