All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] utimensat: fix immutable file retcodes for 4.8.0 and newer.
@ 2016-09-01  9:06 Artem Savkov
  2016-09-05 11:30 ` Jan Stancek
  2016-10-03 11:29 ` Jan Stancek
  0 siblings, 2 replies; 3+ messages in thread
From: Artem Savkov @ 2016-09-01  9:06 UTC (permalink / raw)
  To: ltp

Kernel 4.8.0 contains patch "337684a fs: return EPERM on immutable inode" that
makes operations on immutable files return EPERM instead of EACCESS.

Adjust utimensat test to check new retcode for kernels 4.8.0 and newer.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
---
 testcases/kernel/syscalls/utimensat/utimensat_tests.sh | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
index 4ae8651..708d454 100755
--- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
+++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
@@ -30,6 +30,15 @@ if tst_kvercmp 2 6 22 ; then
 	tst_brkm TCONF "System kernel version is less than 2.6.22,cannot execute test"
 fi
 
+# Starting with 4.8.0 operations on immutable files return EPERM instead of
+# EACCES.
+if tst_kvercmp 4 8 0; then
+	imaccess=EACCES
+else
+	imaccess=EPERM
+fi
+
+
 RESULT_FILE=$TMPDIR/utimensat.result
 
 TEST_DIR=$TMPDIR/utimensat_tests
@@ -415,10 +424,10 @@ echo "Testing immutable file, owned by self"
 echo
 
 echo "***** Testing times==NULL case *****"
-run_test -W "" 600 "+i" "" EACCES
+run_test -W "" 600 "+i" "" $imaccess
 
 echo "***** Testing times=={ UTIME_NOW, UTIME_NOW } case *****"
-run_test -W "" 600 "+i" "0 n 0 n" EACCES
+run_test -W "" 600 "+i" "0 n 0 n" $imaccess
 
 echo "***** Testing times=={ UTIME_OMIT, UTIME_OMIT } case *****"
 run_test -W "" 600 "+i" "0 o 0 o" SUCCESS n n
@@ -441,10 +450,10 @@ echo "Testing immutable append-only file, owned by self"
 echo
 
 echo "***** Testing times==NULL case *****"
-run_test -W "" 600 "+ai" "" EACCES
+run_test -W "" 600 "+ai" "" $imaccess
 
 echo "***** Testing times=={ UTIME_NOW, UTIME_NOW } case *****"
-run_test -W "" 600 "+ai" "0 n 0 n" EACCES
+run_test -W "" 600 "+ai" "0 n 0 n" $imaccess
 
 echo "***** Testing times=={ UTIME_OMIT, UTIME_OMIT } case *****"
 run_test -W "" 600 "+ai" "0 o 0 o" SUCCESS n n
-- 
2.7.4


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

* [LTP] [PATCH] utimensat: fix immutable file retcodes for 4.8.0 and newer.
  2016-09-01  9:06 [LTP] [PATCH] utimensat: fix immutable file retcodes for 4.8.0 and newer Artem Savkov
@ 2016-09-05 11:30 ` Jan Stancek
  2016-10-03 11:29 ` Jan Stancek
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Stancek @ 2016-09-05 11:30 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> From: "Artem Savkov" <asavkov@redhat.com>
> To: ltp@lists.linux.it
> Cc: chrubis@suse.cz, jstancek@redhat.com, "Artem Savkov" <asavkov@redhat.com>
> Sent: Thursday, 1 September, 2016 11:06:13 AM
> Subject: [PATCH] utimensat: fix immutable file retcodes for 4.8.0 and newer.
> 
> Kernel 4.8.0 contains patch "337684a fs: return EPERM on immutable inode"
> that
> makes operations on immutable files return EPERM instead of EACCESS.
> 
> Adjust utimensat test to check new retcode for kernels 4.8.0 and newer.
> 
> Signed-off-by: Artem Savkov <asavkov@redhat.com>
> ---

Looks good. 4.8 hasn't been released yet, so this patch is only in
-rc builds so far. We don't try to mirror -rc changes as closely
since things are sometimes unstable/get reverted/etc. So as fyi,
we'll probably push this only after 4.8 gets released.

Regards,
Jan

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

* [LTP] [PATCH] utimensat: fix immutable file retcodes for 4.8.0 and newer.
  2016-09-01  9:06 [LTP] [PATCH] utimensat: fix immutable file retcodes for 4.8.0 and newer Artem Savkov
  2016-09-05 11:30 ` Jan Stancek
@ 2016-10-03 11:29 ` Jan Stancek
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Stancek @ 2016-10-03 11:29 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> From: "Artem Savkov" <asavkov@redhat.com>
> To: ltp@lists.linux.it
> Cc: chrubis@suse.cz, jstancek@redhat.com, "Artem Savkov" <asavkov@redhat.com>
> Sent: Thursday, 1 September, 2016 11:06:13 AM
> Subject: [PATCH] utimensat: fix immutable file retcodes for 4.8.0 and newer.
> 
> Kernel 4.8.0 contains patch "337684a fs: return EPERM on immutable inode"
> that
> makes operations on immutable files return EPERM instead of EACCESS.
> 
> Adjust utimensat test to check new retcode for kernels 4.8.0 and newer.
> 
> Signed-off-by: Artem Savkov <asavkov@redhat.com>

Pushed.

Thanks,
Jan

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

end of thread, other threads:[~2016-10-03 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01  9:06 [LTP] [PATCH] utimensat: fix immutable file retcodes for 4.8.0 and newer Artem Savkov
2016-09-05 11:30 ` Jan Stancek
2016-10-03 11:29 ` Jan Stancek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.