Testing statx syscall * statx02.c: This file will check flag like AT_EMPTY_PATH, AT_SYMLINK_NOFOLLOW * AT_EMPTY_PATH: If pathname is an empty string, operate on the file referred to by dirfd. * AT_SYMLINK_NOFOLLOW:If pathname is a symbolic link, do not dereference it: instead return information about the link itself.
PATCH v7 2/4 Testing statx syscall * statx02.c: This file will check flag like AT_EMPTY_PATH, AT_SYMLINK_NOFOLLOW * AT_EMPTY_PATH: If pathname is an empty string, operate on the file referred to by dirfd. * AT_SYMLINK_NOFOLLOW:If pathname is a symbolic link, do not dereference it: instead return information about the link itself.
From: vaishnavid <[email protected]>
--- runtest/syscalls | 3 +- testcases/kernel/syscalls/statx/.gitignore | 1 + testcases/kernel/syscalls/statx/statx02.c | 144 +++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 testcases/kernel/syscalls/statx/statx02.c
runtest/syscalls +2 -1
@@ -1496,4 +1496,5 @@ memfd_create04 memfd_create04 copy_file_range01 copy_file_range01 -statx01 statx01 +statx01 statx01 +statx02 statx02
testcases/kernel/syscalls/statx/.gitignore +1 -0
@@ -1 +1,2 @@ /statx01 +/statx02
testcases/kernel/syscalls/statx/statx02.c new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH v7 2/4 Testing statx syscall * statx02.c: This file will check flag like AT_EMPTY_PATH, AT_SYMLINK_NOFOLLOW * AT_EMPTY_PATH: If pathname is an empty string, operate on the file referred to by dirfd. * AT_SYMLINK_NOFOLLOW:If pathname is a symbolic link, do not dereference it: instead return information about the link itself.
Hi!
Pushed with a few adjustements.
First of all, please make sure there is an empty line before the first line of the patch description and the paragraphs that describe the patch that follow. Otherwise the whole description will end up mangled into a single line like in this patch.
Quoted 14 lines
Signed-off-by Tarun.T.U <[email protected]>Signed-off-by Vaishnavi.D <[email protected]>--- runtest/syscalls | 3 +- testcases/kernel/syscalls/statx/.gitignore | 1 + testcases/kernel/syscalls/statx/statx02.c | 144 +++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 testcases/kernel/syscalls/statx/statx02.cruntest/syscalls +0
-0
runtest/syscalls memfd_create04 memfd_create04 · line 1500
Quoted 8 lines
runtest/syscalls +2
-1@@ -1496,4 +1496,5 @@ memfd_create04 memfd_create04 copy_file_range01 copy_file_range01 -statx01 statx01 +statx01 statx01 +statx02 statx02
Also please make sure that the file ends up with a newline, otherwise each newly added line produces ugly diffs like this one.
testcases/kernel/syscalls/statx/.gitignore line 2
Quoted 8 lines
testcases/kernel/syscalls/statx/.gitignore +1
-0@@ -1 +1,2 @@ /statx01 +/statx02
Here as well.
Quoted 14 lines
testcases/kernel/syscalls/statx/statx02.c new file +8
-0@@ -0,0 +1,144 @@ +// SPDX-License-Identifier: GPL-2.0 or later +/* +* Copyright (c) Zilogic Systems Pvt. Ltd., 2018 +* Email: [email protected] +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or
testcases/kernel/syscalls/statx/statx02.c line 18
Quoted 10 lines
testcases/kernel/syscalls/statx/statx02.c new file +10
-0+* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/
I've removed the long license and fixed SPDX identifier.
...
Quoted 10 lines
testcases/kernel/syscalls/statx/statx02.c new file +10
-0+static void test_empty_path (void ) +{ +struct statx buf; + +TEST (statx (file_fd,"" ,AT_EMPTY_PATH ,0 , &buf)); +if (TST_RET ==0 ) +tst_res (TPASS , +"statx(file_fd, \" \", AT_EMPTY_PATH, 0, &buf)" ); +else + tst_brk(TFAIL | TTERRNO,
testcases/kernel/syscalls/statx/statx02.c line 70
Quoted 10 lines
testcases/kernel/syscalls/statx/statx02.c new file +10
-0+ "statx(file_fd, \" \", AT_EMPTY_PATH, 0, &buff)"); + +if (buf.stx_size ==SIZE ) +tst_res (TPASS , +"stx_size(%" PRIu64") obtained is correct" , + buf.stx_size); +else +tst_res (TFAIL , +"stx_size(%" PRIu64") obtained is not same as expected(%u)" , + buf.stx_size,SIZE );
And removed the "obtained" here as well.
Quoted 3 lines
testcases/kernel/syscalls/statx/statx02.c new file +3
-0+ +} +
...
testcases/kernel/syscalls/statx/statx02.c line 119
Quoted 7 lines
testcases/kernel/syscalls/statx/statx02.c new file +7
-0+static void run (unsigned int i) +{ +struct tcase *t; + + t = &tcases[i]; + t->tfunc (); +}
And simplified this part.
And pushed, thanks!
Signature · 2 lines
Cyril Hrubis [email protected]