Hi! When upgrading libaio as a package for Arch Linux to 0.3.113 I attempted to run the partcheck test suite.
This works for plain x86_64, but not for 32bit multilib. The build scripts for both can be found here:
lib32-libaio fails with:
make: Entering directory '/build/lib32-libaio/src/libaio-libaio-0.3.113' make[1]: Entering directory '/build/lib32-libaio/src/libaio-libaio-0.3.113/src' gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_queue_init.ol io_queue_init.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_queue_release.ol io_queue_release.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_queue_wait.ol io_queue_wait.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_queue_run.ol io_queue_run.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_getevents.ol io_getevents.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_submit.ol io_submit.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_cancel.ol io_cancel.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_setup.ol io_setup.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_destroy.ol io_destroy.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_pgetevents.ol io_pgetevents.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o raw_syscall.ol raw_syscall.c gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o compat-0_1.ol compat-0_1.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_queue_init.os io_queue_init.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_queue_release.os io_queue_release.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_queue_wait.os io_queue_wait.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_queue_run.os io_queue_run.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_getevents.os io_getevents.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_submit.os io_submit.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_cancel.os io_cancel.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_setup.os io_setup.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_destroy.os io_destroy.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o io_pgetevents.os io_pgetevents.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o raw_syscall.os raw_syscall.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c -o compat-0_1.os compat-0_1.c rm -f libaio.a ar r libaio.a io_queue_init.ol io_queue_release.ol io_queue_wait.ol io_queue_run.ol io_getevents.ol io_submit.ol io_cancel.ol io_setup.ol io_destroy.ol io_pgetevents.ol raw_syscall.ol compat-0_1.ol ar: creating libaio.a ranlib libaio.a gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -c struct_offsets.c gcc -m32 -shared -march=x86-64 -mtune=generic -O2 -pipe -Wall -I. -fPIC -Wl,--version-script=libaio.map -Wl,-soname=libaio.so.1 -o libaio.so.1.0.2 io_queue_init.os io_queue_release.os io_queue_wait.os io_queue_run.os io_getevents.os io_submit.os io_cancel.os io_setup.os io_destroy.os io_pgetevents.os raw_syscall.os compat-0_1.os -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto make[1]: Leaving directory '/build/lib32-libaio/src/libaio-libaio-0.3.113/src' make: Leaving directory '/build/lib32-libaio/src/libaio-libaio-0.3.113' ?[1m?[32m==>?[m??[1m Starting check()...?[m? make: Entering directory '/build/lib32-libaio/src/libaio-libaio-0.3.113' make[1]: Entering directory '/build/lib32-libaio/src/libaio-libaio-0.3.113/src' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/build/lib32-libaio/src/libaio-libaio-0.3.113/src' make[1]: Entering directory '/build/lib32-libaio/src/libaio-libaio-0.3.113/harness' gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/2.t\" -o cases/2.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -Wno-stringop-overflow -DTEST_NAME=\"cases/3.t\" -o cases/3.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/4.t\" -o cases/4.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/5.t\" -o cases/5.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/6.t\" -o cases/6.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/7.t\" -o cases/7.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/11.t\" -o cases/11.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/12.t\" -o cases/12.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/13.t\" -o cases/13.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/14.t\" -o cases/14.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/15.t\" -o cases/15.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/16.t\" -o cases/16.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/17.t\" -o cases/17.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/18.t\" -o cases/18.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/19.t\" -o cases/19.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/20.t\" -o cases/20.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/21.t\" -o cases/21.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/22.t\" -o cases/22.p main.c ../src/libaio.a -lpthread gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -Wall -I../src -g -O2 -DTEST_NAME=\"cases/23.t\" -o cases/23.p main.c ../src/libaio.a -lpthread mkdir testdir rm -f testdir/rofile rm -f testdir/rwfile echo "test" >testdir/rofile echo "test" >testdir/rwfile rm -f testdir/wofile echo "test" >testdir/wofile chmod 400 testdir/rofile chmod 600 testdir/rwfile chmod 200 testdir/wofile In file included from main.c:24: cases/23.t: In function ‘thrproc2’: cases/23.t:82:35: warning: passing argument 2 of ‘splice’ from incompatible pointer type [-Wincompatible-pointer-types] 82 | if (splice(tmpfd, &offset, pipefds[1], NULL, 1, 0) != 1) | ^~~~~~~ | | | off_t * {aka long int *} In file included from /usr/include/bits/fcntl.h:61, from /usr/include/fcntl.h:35, from main.c:9: /usr/include/bits/fcntl-linux.h:398:49: note: expected ‘__off64_t *’ {aka ‘long long int *’} but argument is of type ‘off_t *’ {aka ‘long int *’} 398 | extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, | ~~~~~~~~~~~^~~~~~~ In file included from main.c:24: cases/23.t: In function ‘thrproc3’: cases/23.t:106:35: warning: passing argument 2 of ‘splice’ from incompatible pointer type [-Wincompatible-pointer-types] 106 | if (splice(tmpfd, &offset, pipefds[1], NULL, 1, 0) != 1) | ^~~~~~~ | | | off_t * {aka long int *} In file included from /usr/include/bits/fcntl.h:61, from /usr/include/fcntl.h:35, from main.c:9: /usr/include/bits/fcntl-linux.h:398:49: note: expected ‘__off64_t *’ {aka ‘long long int *’} but argument is of type ‘off_t *’ {aka ‘long int *’} 398 | extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, | ~~~~~~~~~~~^~~~~~~ ./runtests.sh cases/2.p cases/3.p cases/4.p cases/5.p cases/6.p cases/7.p cases/11.p cases/12.p cases/13.p cases/14.p cases/15.p cases/16.p cases/17.p cases/18.p cases/19.p cases/20.p cases/21.p cases/22.p cases/23.p Test run starting at Wed Apr 13 03:47:04 PM CEST 2022 Starting cases/2.p expect -14: io_setup(-1000, 0xc0010000) = -14 [Bad address] expect -14: io_setup( 1000, 0xc0010000) = -14 [Bad address] expect -14: io_setup( 0, 0xc0010000) = -14 [Bad address] expect -22: io_setup(-1000, 0xf4e32928) = -22 [Invalid argument] expect -22: io_setup( -1, 0xf4e32928) = -22 [Invalid argument] expect -22: io_setup( 0, 0xf4e32928) = -22 [Invalid argument] expect 0: io_setup( 1, 0xf4e32928) = 0 [Success] expect -22: io_setup( 1, 0xf4e32928) = -22 [Invalid argument] test cases/2.t completed PASSED. Completed cases/2.p with 0. Starting cases/3.p expect -22: io_submit(0xffffffff, 1, 0xf3ad5584) = -22 [Invalid argument] expect 0: io_submit(0xec127000, 0, 0xf3ad5584) = 0 [Success] expect -14: io_submit(0xec127000, 1, (nil)) = -14 [Bad address] expect -14: io_submit(0xec127000, 1, 0xffffffff) = -14 [Bad address] expect -14: io_submit(0xec127000, 2, 0xf3ad558c) = -14 [Bad address] expect -14: io_submit(0xec127000, 2, 0xf3ad5594) = -14 [Bad address] expect -22: io_submit(0xec127000, -1, 0xf3ad5584) = -22 [Invalid argument] test cases/3.t completed PASSED. Completed cases/3.p with 0. Starting cases/4.p expect -9: (w), res = sync_submit: io_submit res=-9 [Bad file descriptor] -9 [Bad file descriptor] expect -9: (r), res = sync_submit: io_submit res=-9 [Bad file descriptor] -9 [Bad file descriptor] expect 512: (w), res = 512 [Success] expect 512: (r), res = 512 [Success] expect -22: (r), res = sync_submit: io_submit res=-22 [Invalid argument] -22 [Invalid argument] expect -22: (w), res = sync_submit: io_submit res=-22 [Invalid argument] -22 [Invalid argument] expect 0: (r), res = 0 [Success] expect 4: (w), res = 4 [Success] expect 4: (w), res = 4 [Success] expect 8: (r), res = 8 [Success] read after append: [12345678] expect -14: (r), res = -14 [Bad address] expect -14: (w), res = -14 [Bad address] expect -14: (w), res = -14 [Bad address] test cases/4.t completed PASSED. Completed cases/4.p with 0. Starting cases/5.p expect 512: (w), res = 512 [Success] expect 512: (r), res = 512 [Success] expect 512: (r), res = 512 [Success] expect 512: (w), res = 512 [Success] expect 512: (w), res = 512 [Success] expect -14: (r), res = -14 [Bad address] expect 512: (r), res = 512 [Success] expect 512: (w), res = 512 [Success] test cases/5.t completed PASSED. Completed cases/5.p with 0. Starting cases/6.p size = 65830712 expect 805306368: (w), res = 805306368 [Success] expect 805306368: (r), res = 805306368 [Success] test cases/6.t completed PASSED. Completed cases/6.p with 0. Starting cases/7.p expect 512: (w), res = 512 [Success] expect 512: (r), res = 512 [Success] expect 511: (w), res = 511 [Success] expect 511: (r), res = 511 [Success] expect -27: (w), res = -27 [File too large] expect 0: (r), res = 0 [Success] expect 0: (w), res = 0 [Success] test cases/7.t completed PASSED. Completed cases/7.p with 0. Starting cases/11.p completed 1000000 out of 1000000 writes completed 1000000 out of 1000000 reads test cases/11.t completed PASSED. Completed cases/11.p with 0. Starting cases/12.p expect 0: io_submit(0xe48f2000, 0, (nil)) = 0 [Success] expect -22: io_submit(0xe48f2000, 0, (nil)) = -22 [Invalid argument] child exited with status 0 test cases/12.t completed PASSED. Completed cases/12.p with 0. Starting cases/13.p expect 8: io_submit(0xee32c000, 8, 0xf51c9a7c) = 8 [] event[0]: write[0] okay, returned: 1048576 [okay] event[1]: write[1] okay, returned: 1048576 [okay] event[2]: write[2] okay, returned: 1048576 [okay] event[3]: write[3] okay, returned: 1048576 [okay] event[4]: write[4] okay, returned: 1048576 [okay] event[5]: write[5] okay, returned: 1048576 [okay] event[6]: write[6] okay, returned: 1048576 [okay] event[7]: write[7] okay, returned: 1048576 [okay] test cases/13.t completed PASSED. Completed cases/13.p with 0. Starting cases/14.p expect 0: io_submit(0xe5f4b000, 0, (nil)) = 0 [Success] child exited with status 0 test cases/14.t completed PASSED. Completed cases/14.p with 0. Starting cases/15.p expect 5120: (>), res = 5120 [Success] Checking memory: [Success] expect 5120: (<), res = 5120 [Success] expect 4608: (>), res = 4608 [Success] Checking memory: [Success] expect 4608: (<), res = 4608 [Success] Checking memory: [Success] test cases/15.t completed PASSED. Completed cases/15.p with 0. Starting cases/16.p eventfd write test [SUCCESS] eventfd read test [SUCCESS] test cases/16.t completed PASSED. Completed cases/16.p with 0. Starting cases/17.p aio ring size: 383 MAX_IOS: 382, IO_GETEVENTS Submitting: 382 Submitted: 382 Completed: 382 Verifying... OK MAX_IOS: 383, IO_GETEVENTS Submitting: 383 Submitted: 382 Submitting: 1 Submitted too much, that's okay Completed: 382 Submitting: 1 Submitted: 1 Completed: 1 Verifying... OK MAX_IOS: 384, IO_GETEVENTS Submitting: 384 Submitted: 382 Submitting: 2 Submitted too much, that's okay Completed: 382 Submitting: 2 Submitted: 2 Completed: 2 Verifying... OK MAX_IOS: 766, IO_GETEVENTS Submitting: 766 Submitted: 382 Submitting: 384 Submitted too much, that's okay Completed: 382 Submitting: 384 Submitted: 382 Submitting: 2 Submitted too much, that's okay Completed: 382 Submitting: 2 Submitted: 2 Completed: 2 Verifying... OK MAX_IOS: 1532, IO_GETEVENTS Submitting: 1532 Submitted: 382 Submitting: 1150 Submitted too much, that's okay Completed: 382 Submitting: 1150 Submitted: 382 Submitting: 768 Submitted too much, that's okay Completed: 382 Submitting: 768 Submitted: 382 Submitting: 386 Submitted too much, that's okay Completed: 382 Submitting: 386 Submitted: 382 Submitting: 4 Submitted too much, that's okay Completed: 382 Submitting: 4 Submitted: 4 Completed: 4 Verifying... OK MAX_IOS: 382, USER_GETEVENTS Submitting: 382 Submitted: 382 Completed: 382 Verifying... OK MAX_IOS: 383, USER_GETEVENTS Submitting: 383 Submitted: 382 Submitting: 1 Submitted too much, that's okay Completed: 382 Submitting: 1 Submitted: 1 Completed: 1 Verifying... OK MAX_IOS: 384, USER_GETEVENTS Submitting: 384 Submitted: 382 Submitting: 2 Submitted too much, that's okay Completed: 382 Submitting: 2 Submitted: 2 Completed: 2 Verifying... OK MAX_IOS: 766, USER_GETEVENTS Submitting: 766 Submitted: 382 Submitting: 384 Submitted too much, that's okay Completed: 382 Submitting: 384 Submitted: 382 Submitting: 2 Submitted too much, that's okay Completed: 382 Submitting: 2 Submitted: 2 Completed: 2 Verifying... OK MAX_IOS: 1532, USER_GETEVENTS Submitting: 1532 Submitted: 382 Submitting: 1150 Submitted too much, that's okay Completed: 382 Submitting: 1150 Submitted: 382 Submitting: 768 Submitted too much, that's okay Completed: 382 Submitting: 768 Submitted: 382 Submitting: 386 Submitted too much, that's okay Completed: 382 Submitting: 386 Submitted: 382 Submitting: 4 Submitted too much, that's okay Completed: 382 Submitting: 4 Submitted: 4 Completed: 4 Verifying... OK test cases/17.t completed PASSED. Completed cases/17.p with 0. Starting cases/18.p Completed cases/18.p with 3 -- SKIPPED. Starting cases/19.p test cases/19.t completed PASSED. Completed cases/19.p with 0. Starting cases/20.p aio_max_nr: 1048576 Creating 1048576 ioctx-s with 1 events each... Successfully created 65508 io_context-s Last io_setup call returned -12 (Cannot allocate memory) Creating 524288 ioctx-s with 2 events each... Successfully created 65508 io_context-s Last io_setup call returned -12 (Cannot allocate memory) Creating 262144 ioctx-s with 4 events each... Successfully created 65508 io_context-s Last io_setup call returned -12 (Cannot allocate memory) Creating 131072 ioctx-s with 8 events each... Successfully created 65508 io_context-s Last io_setup call returned -12 (Cannot allocate memory) Creating 65536 ioctx-s with 16 events each... Successfully created 65508 io_context-s Last io_setup call returned -12 (Cannot allocate memory) Creating 32768 ioctx-s with 32 events each... Successfully created 32768 io_context-s Creating 16384 ioctx-s with 64 events each... Successfully created 16384 io_context-s Creating 8192 ioctx-s with 128 events each... Successfully created 8192 io_context-s Creating 4096 ioctx-s with 256 events each... Successfully created 4096 io_context-s Creating 2048 ioctx-s with 512 events each... Successfully created 2048 io_context-s Creating 1024 ioctx-s with 1024 events each... Successfully created 1024 io_context-s Creating 512 ioctx-s with 2048 events each... Successfully created 512 io_context-s Creating 256 ioctx-s with 4096 events each... Successfully created 256 io_context-s Creating 128 ioctx-s with 8192 events each... Successfully created 128 io_context-s Creating 64 ioctx-s with 16384 events each... Successfully created 64 io_context-s Creating 32 ioctx-s with 32768 events each... Successfully created 32 io_context-s Creating 16 ioctx-s with 65536 events each... Successfully created 16 io_context-s Creating 8 ioctx-s with 131072 events each... Successfully created 8 io_context-s Creating 4 ioctx-s with 262144 events each... Successfully created 4 io_context-s Creating 2 ioctx-s with 524288 events each... Successfully created 2 io_context-s Creating 1 ioctx-s with 1048576 events each... Successfully created 1 io_context-s test cases/20.t completed PASSED. Completed cases/20.p with 0. Starting cases/21.p test cases/21.t completed SKIPPED. Completed cases/21.p with 3 -- SKIPPED. Starting cases/22.p test cases/22.t completed PASSED. Completed cases/22.p with 0. Starting cases/23.p splice failed in thread 2splice failed in thread 2: Success : Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Successsplice failed in thread 2 : Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2splice failed in thread 2: Success : Success splice failed in thread 2: Success splice failed in thread 2splice failed in thread 2: Success : Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success splice failed in thread 2: Success test cases/23.t completed FAILED. Completed cases/23.p with 1 -- FAILED. Pass: 16 Fail: 1 Skip: 2 Test run complete at Wed Apr 13 03:47:26 PM CEST 2022 make[1]: *** [Makefile:53: partcheck] Error 1 make[1]: Leaving directory '/build/lib32-libaio/src/libaio-libaio-0.3.113/harness' make: *** [Makefile:23: partcheck] Error 2 make: Leaving directory '/build/lib32-libaio/src/libaio-libaio-0.3.113'
There is an easy fix for this build failure, follows the signature published on the man page:
--- libaio-libaio-0.3.113.orig/harness/cases/23.t +++ libaio-libaio-0.3.113/harness/cases/23.t @@ -72,7 +72,7 @@ static void fail_errno(const char *forma static void *thrproc2(void *arg) { for (;;) { - off_t offset = 0; + off64_t offset = 0; pthread_barrier_wait(&barrier); if (exiting) @@ -92,7 +92,7 @@ static void *thrproc3(void *arg) { for (;;) { char c; - off_t offset = 0; + off64_t offset = 0; pthread_barrier_wait(&barrier); if (exiting)
actually there is an open PR already with this fix: https://pagure.io/libaio/pull-request/22
Login to comment on this ticket.