[LTP] test with aio02 is failing with safe_macros.c:223: BROK: aio02.c:130: open(file, 16961, 0644) failed: EINVAL (22)

Yang Xu xuyang2018.jy@cn.fujitsu.com
Tue Feb 11 11:55:36 CET 2020


on 2020/02/11 18:25, Xiao Yang wrote:
> 
> On 2/11/20 6:01 PM, Pankaj Vinadrao Joshi wrote:
>> Hi sir,
>> I am begginer can you tell how i can  check if tmpfs is mounted on 
>> /tmp in your enviroment?
> 
> Hi,
> 
> 
> You can use df/mount command to do check, as below:
> 
> -----------------------------------------------------------------
> 
> [root@Fedora-30-vm linux]# df -h | grep '/tmp'
> tmpfs           993M  4.0K  993M   1% /tmp
> 
> [root@Fedora-30-vm linux]# mount | grep '/tmp'
> tmpfs on /tmp type tmpfs (rw,nosuid,nodev,seclabel)
> 
> ------------------------------------------------------------------
> 
>>
>> Sir if you have two minutes of time can you elaborate it whats its 
>> meaning?
> 
> aio02 uses open(O_WRONLY | O_TRUNC | O_DIRECT | O_LARGEFILE | O_CREAT) to
> 
> create test file in default /tmp directory and ****O_DIRECT flag may not 
> be supported
> 
> by tmpfs so calling open() returns EINVAL.
>
Hi Xiao
I think we should add a check or use a valid filesystem to test in this 
case.

Best Regards
Yang Xu
> 
> Thanks,
> 
> Xiao Yang
> 
>>
>>
>> Thank you 😊
>> ------------------------------------------------------------------------
>> *From:* Xiao Yang <ice_yangxiao@163.com>
>> *Sent:* Tuesday, February 11, 2020 3:04 PM
>> *To:* Pankaj Vinadrao Joshi <Pankaj.VJ@exaleapsemi.com>
>> *Subject:* Re: [LTP] test with aio02 is failing with 
>> safe_macros.c:223: BROK: aio02.c:130: open(file, 16961, 0644) failed: 
>> EINVAL (22)
>>
>> Hi,
>>
>>
>> Could you check if tmpfs is mounted on /tmp in your enviroment?
>>
>> It seems that tmpfs cannot support O_DIRECT flag and creating file 
>> with O_DIRECT in tmpfs triggers the error.
>>
>> Perhaps, you can fix the error by mounting normal filesystem(e.g. 
>> ext4/xfs) on /tmp for now.
>>
>>
>> Thanks,
>>
>> Xiao Yang
>>
>> On 2/11/20 4:31 PM, Pankaj Vinadrao Joshi wrote:
>>> Hi,
>>> i am running aio02 test on my RISC v machine,my testing is getting 
>>> failed with the message
>>> *safe_macros.c:223: BROK: aio02.c:130: open(file,16961,0644) failed: 
>>> EINVAL (22)*
>>>
>> [EXT]
> 
> 




More information about the ltp mailing list