public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4] syscalls/copy_file_range: add/restructured tests
Date: Mon, 20 May 2019 16:31:35 +0200	[thread overview]
Message-ID: <20190520143135.GA27341@dell5510> (raw)
In-Reply-To: <20190506201948.GA9828@dell5510>

Hi Christian, Cyril,

Before applying (with following diff), just 2 questions:

./copy_file_range02
tst_test.c:1096: INFO: Timeout per run is 0h 05m 00s
copy_file_range.h:30: INFO: Testing libc copy_file_range()
copy_file_range.h:47: CONF: libc copy_file_range() not supported!
1) I know I was the one who asked to use .test_variants, but it probably does
not make sense to use it until glibc (or some other libc) adds copy_file_range()
wrapper.

tst_test.c:1096: INFO: Timeout per run is 0h 05m 00s
copy_file_range.h:33: INFO: Testing tst copy_file_range()
copy_file_range01.c:194: PASS: copy_file_range completed all 144 copy jobs successfully!



2) Glibc adds internal implementation of copy_file_range(), used as fallback
when kernel < 4.5 (which brought copy_file_range()) [1]. I guess there is no way
to use it explicitly :(.

Kind regards,
Petr

[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f;hp=6cb86fd21ca6fdfc31042cda8c37f96c46b8a4da

diff --git configure.ac configure.ac
index 1d825dc1e..5dc85728a 100644
--- configure.ac
+++ configure.ac
@@ -60,6 +60,7 @@ AC_CHECK_HEADERS([ \
 ])
 
 AC_CHECK_FUNCS([ \
+    copy_file_range \
     epoll_pwait \
     execveat \
     fallocate \
@@ -198,7 +199,6 @@ LTP_CHECK_BUILTIN_CLEAR_CACHE
 LTP_CHECK_CAPABILITY_SUPPORT
 LTP_CHECK_CC_WARN_OLDSTYLE
 LTP_CHECK_CLONE_SUPPORTS_7_ARGS
-LTP_CHECK_COPY_FILE_RANGE
 LTP_CHECK_CRYPTO
 LTP_CHECK_FIDEDUPE
 LTP_CHECK_FORTIFY_SOURCE
diff --git m4/ltp-copy_file_range.m4 m4/ltp-copy_file_range.m4
deleted file mode 100644
index 2d87e8900..000000000
--- m4/ltp-copy_file_range.m4
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl SPDX-License-Identifier: GPL-2.0-or-later
-dnl Copyright (c) 2019 SUSE LLC
-dnl Author: Christian Amann <camann@suse.com>
-
-AC_DEFUN([LTP_CHECK_COPY_FILE_RANGE],[
-AC_CHECK_FUNCS(copy_file_range,,)
-])
diff --git testcases/kernel/syscalls/copy_file_range/copy_file_range.h testcases/kernel/syscalls/copy_file_range/copy_file_range.h
index d2ef1348b..b6d132978 100644
--- testcases/kernel/syscalls/copy_file_range/copy_file_range.h
+++ testcases/kernel/syscalls/copy_file_range/copy_file_range.h
@@ -44,7 +44,7 @@ static int sys_copy_file_range(int fd_in, loff_t *off_in,
 		return copy_file_range(fd_in, off_in,
 				fd_out, off_out, len, flags);
 #else
-		tst_brk(TCONF, "libc copy_file_range() not supported!");
+		tst_brk(TCONF, "libc copy_file_range() not supported");
 #endif
 		break;
 	case 1:
diff --git testcases/kernel/syscalls/copy_file_range/copy_file_range03.c testcases/kernel/syscalls/copy_file_range/copy_file_range03.c
index 18e411af2..253eb57ad 100644
--- testcases/kernel/syscalls/copy_file_range/copy_file_range03.c
+++ testcases/kernel/syscalls/copy_file_range/copy_file_range03.c
@@ -45,7 +45,7 @@ static void verify_copy_file_range_timestamp(void)
 	if (timestamp == updated_timestamp)
 		tst_brk(TFAIL, "copy_file_range did not update timestamp.");
 
-	tst_res(TPASS, "copy_file_range sucessfully updated the timestamp!");
+	tst_res(TPASS, "copy_file_range sucessfully updated the timestamp");
 }
 
 static void cleanup(void)

  reply	other threads:[~2019-05-20 14:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 10:54 [LTP] [PATCH v4] syscalls/copy_file_range: add/restructured tests Christian Amann
2019-05-06 10:57 ` Christian Amann
2019-05-06 20:19   ` Petr Vorel
2019-05-20 14:31     ` Petr Vorel [this message]
2019-05-20 14:46       ` Cyril Hrubis
2019-05-20 15:24         ` Petr Vorel
2019-05-20 16:45           ` Amir Goldstein
2019-05-20 17:30             ` Petr Vorel
2019-05-21 11:40             ` Cyril Hrubis
2019-05-21 12:50               ` Amir Goldstein
2019-05-21 13:08                 ` Cyril Hrubis
2019-05-22 19:03               ` Petr Vorel
2019-05-23  8:44                 ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190520143135.GA27341@dell5510 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox