Bug 2660

Summary: POSIX: case lio_listio/11-1 fails on all arches
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Kai Kang <kai.kang>
Component: meta-yoctoAssignee: Kai Kang <kai.kang>
Status: RESOLVED NOTABUG QA Contact:
Severity: enhancement    
Priority: Undecided CC: poky.bs.watcher, poky.watcher, raj.khem, zhenfeng.zhao
Version: 1.3   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Bug Depends on:    
Bug Blocks: 2332    

Description Kai Kang 2012-06-26 06:55:24 UTC
case lio_listio/11-1 fails on all arches

Error message:
lio_listio/11-1.c Error lio_listio() should have returned -1
Comment 1 Kai Kang 2012-06-27 02:14:20 UTC
Open this bug just to record the case fails, but I think this failure is not a bug.

The case try to:
- open a file for writing                                                   
- submit a list with invalid opcodes to lio_listio in LIO_NOWAIT mode
- check that lio_listio returns -1

The POSIX specification(IEEE Std 1003.1-2008) says(Line 40292):
The supported operations are LIO_READ, LIO_WRITE, and LIO_NOP

But the spec doesn't say what should happen if the value it not one of the 3 operation codes.

In Khem Raj's <raj.khem@gmail.com> opioion, 
"for aio_lio_opcode posix says "The supported operations are LIO_READ,
LIO_WRITE, and LIO_NOP"

but it does not say what should happen if the value it not one of the above
so IMO its not a bug but falls into undefined behavior."

Ref: http://www.eglibc.org/archives/patches/msg01074.html