public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* Re: [LTP] [PATCH] aio02: remove test for aio_fsync() and aio_fdsync()
       [not found] <1372322290-21498-1-git-send-email-gaowanlong@cn.fujitsu.com>
@ 2013-06-27  9:30 ` Jan Stancek
  2013-06-27 12:43 ` chrubis
  1 sibling, 0 replies; 2+ messages in thread
From: Jan Stancek @ 2013-06-27  9:30 UTC (permalink / raw)
  To: Wanlong Gao; +Cc: LTP



----- Original Message -----
> From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com>
> To: "LTP" <ltp-list@lists.sourceforge.net>
> Cc: "Cyril Hrubis" <chrubis@suse.cz>, "Caspar Zhang" <caspar@casparzhang.com>, "Garrett Cooper" <yanegomi@gmail.com>,
> "Mike Frysinger" <vapier@gentoo.org>, jstancek@redhat.com, "Wanlong Gao" <gaowanlong@cn.fujitsu.com>
> Sent: Thursday, 27 June, 2013 10:38:10 AM
> Subject: [PATCH] aio02: remove test for aio_fsync() and aio_fdsync()
> 
> Linux filesystems doesn't support aio_fsync() and aio_fdsync()
> operations, so just remove test for these two.
> 
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

Reviewed-by: Jan Stancek <jstancek@redhat.com>

Looks good to me.

Regards,
Jan


> ---
>  testcases/kernel/io/aio/aio02/aio_tio.c | 34
>  ---------------------------------
>  1 file changed, 34 deletions(-)
> 
> diff --git a/testcases/kernel/io/aio/aio02/aio_tio.c
> b/testcases/kernel/io/aio/aio02/aio_tio.c
> index 9dda462..34fa9ed 100644
> --- a/testcases/kernel/io/aio/aio02/aio_tio.c
> +++ b/testcases/kernel/io/aio/aio02/aio_tio.c
> @@ -111,8 +111,6 @@ int io_tio(char *pathname, int flag, int n, int
> operation)
>  	for (i = 0; i < AIO_MAXIO; i++) {
>  
>  		switch (operation) {
> -		case IO_CMD_FSYNC:
> -		case IO_CMD_FDSYNC:
>  		case IO_CMD_PWRITE:
>  			if (posix_memalign(&bufptr, alignment, AIO_BLKSIZE)) {
>  				perror(" posix_memalign failed ");
> @@ -179,22 +177,6 @@ int io_tio(char *pathname, int flag, int n, int
> operation)
>  			}
>  		}
>  		break;
> -	case IO_CMD_FSYNC:
> -		for (i = 0; i < AIO_MAXIO; i++) {
> -			res = io_fsync(myctx, iocbps[i], work_done, fd);
> -			if (res < 0) {
> -				io_error("io_fsync write", res);
> -			}
> -		}
> -		break;
> -	case IO_CMD_FDSYNC:
> -		for (i = 0; i < AIO_MAXIO; i++) {
> -			res = io_fdsync(myctx, iocbps[i], work_done, fd);
> -			if (res < 0) {
> -				io_error("io_fsync write", res);
> -			}
> -		}
> -		break;
>  	}
>  
>  	close(fd);
> @@ -253,22 +235,6 @@ int test_main(void)
>  		return status;
>  	}
>  
> -	tst_resm(TINFO, "Running test 7 \n");
> -	status = io_tio("file2",
> -			O_TRUNC | O_DIRECT | O_WRONLY | O_CREAT | O_LARGEFILE,
> -			AIO_MAXIO, IO_CMD_FSYNC);
> -	if (status) {
> -		return status;
> -	}
> -
> -	tst_resm(TINFO, "Running test 8 \n");
> -	status = io_tio("file2",
> -			O_TRUNC | O_DIRECT | O_WRONLY | O_CREAT | O_LARGEFILE,
> -			AIO_MAXIO, IO_CMD_FDSYNC);
> -	if (status) {
> -		return status;
> -	}
> -
>  	return status;
>  }
>  
> --
> 1.8.3.1.448.gfb7dfaa
> 
> 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] aio02: remove test for aio_fsync() and aio_fdsync()
       [not found] <1372322290-21498-1-git-send-email-gaowanlong@cn.fujitsu.com>
  2013-06-27  9:30 ` [LTP] [PATCH] aio02: remove test for aio_fsync() and aio_fdsync() Jan Stancek
@ 2013-06-27 12:43 ` chrubis
  1 sibling, 0 replies; 2+ messages in thread
From: chrubis @ 2013-06-27 12:43 UTC (permalink / raw)
  To: Wanlong Gao; +Cc: Garrett Cooper, LTP, Mike Frysinger

Hi!
> Linux filesystems doesn't support aio_fsync() and aio_fdsync()
> operations, so just remove test for these two.
> 
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

The patch is OK but the commit description is a bit misleading.

Do not mix the POSIX aio_* which is implemented in userspace in libc and
Linux kernel io_* interface that implements AIO in linux kernel. I would
use the IO_* constants in the commit message instead of the aio_*
functions which seems to misleadingly suggest the libc implementation.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-27 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1372322290-21498-1-git-send-email-gaowanlong@cn.fujitsu.com>
2013-06-27  9:30 ` [LTP] [PATCH] aio02: remove test for aio_fsync() and aio_fdsync() Jan Stancek
2013-06-27 12:43 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox