All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
@ 2017-09-27 22:47 naresh.kamboju
  2017-09-27 22:48 ` Sumit Semwal
  2017-09-29 11:45 ` Cyril Hrubis
  0 siblings, 2 replies; 7+ messages in thread
From: naresh.kamboju @ 2017-09-27 22:47 UTC (permalink / raw)
  To: ltp

From: Naresh Kamboju <naresh.kamboju@linaro.org>

Test utimensat failed on 4.4 is due to expected error is EACCES but got EPERM.

With the reference to backported patch changing the test code to set error code
EPERM when kernel version is above 4.4.27 and below 4.5.0

The patch backported on 4.4 details
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
branch: v4.4.27
commit id: b3b4283
vfs: move permission checking into notify_change() for utimes(NULL)

Bug reported on this case,
LKFT: linux-stable-4.4: LTP utimensat01 failed-EXPECTED: EACCES but got EPERM
https://bugs.linaro.org/show_bug.cgi?id=3142

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
---
 testcases/kernel/syscalls/utimensat/utimensat_tests.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
index 48154d6..46a0cc6 100755
--- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
+++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
@@ -32,7 +32,11 @@ fi
 
 # Starting with 4.8.0 operations on immutable files return EPERM instead of
 # EACCES.
-if tst_kvcmp -lt "4.8.0"; then
+# This patch has also been merged to stable 4.4 with
+# b3b4283 ("vfs: move permission checking into notify_change() for utimes(NULL)")
+if tst_kvcmp -ge "4.4.27" -a -lt "4.5.0"; then
+	imaccess=EPERM
+elif tst_kvcmp -lt "4.4.27"; then
 	imaccess=EACCES
 else
 	imaccess=EPERM
-- 
2.7.4


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

* [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
  2017-09-27 22:47 [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0 naresh.kamboju
@ 2017-09-27 22:48 ` Sumit Semwal
  2017-09-29 11:45 ` Cyril Hrubis
  1 sibling, 0 replies; 7+ messages in thread
From: Sumit Semwal @ 2017-09-27 22:48 UTC (permalink / raw)
  To: ltp

Hi Naresh,


On 27 September 2017 at 15:47,  <naresh.kamboju@linaro.org> wrote:
> From: Naresh Kamboju <naresh.kamboju@linaro.org>
>
> Test utimensat failed on 4.4 is due to expected error is EACCES but got EPERM.
>
> With the reference to backported patch changing the test code to set error code
> EPERM when kernel version is above 4.4.27 and below 4.5.0
>
> The patch backported on 4.4 details
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> branch: v4.4.27
> commit id: b3b4283
> vfs: move permission checking into notify_change() for utimes(NULL)
>
> Bug reported on this case,
> LKFT: linux-stable-4.4: LTP utimensat01 failed-EXPECTED: EACCES but got EPERM
> https://bugs.linaro.org/show_bug.cgi?id=3142

Looks good to me; please feel free to add
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
>
> Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> ---
>  testcases/kernel/syscalls/utimensat/utimensat_tests.sh | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
> index 48154d6..46a0cc6 100755
> --- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
> +++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
> @@ -32,7 +32,11 @@ fi
>
>  # Starting with 4.8.0 operations on immutable files return EPERM instead of
>  # EACCES.
> -if tst_kvcmp -lt "4.8.0"; then
> +# This patch has also been merged to stable 4.4 with
> +# b3b4283 ("vfs: move permission checking into notify_change() for utimes(NULL)")
> +if tst_kvcmp -ge "4.4.27" -a -lt "4.5.0"; then
> +       imaccess=EPERM
> +elif tst_kvcmp -lt "4.4.27"; then
>         imaccess=EACCES
>  else
>         imaccess=EPERM
> --
> 2.7.4
>

Best,
Sumit.

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

* [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
  2017-09-27 22:47 [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0 naresh.kamboju
  2017-09-27 22:48 ` Sumit Semwal
@ 2017-09-29 11:45 ` Cyril Hrubis
  2017-09-29 12:08   ` Jan Stancek
  1 sibling, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2017-09-29 11:45 UTC (permalink / raw)
  To: ltp

Hi!
Jan: Since you suggested to go this way should I commit this with your
     Suggested-by: or Signed-off-by: ? Or will you do that yourself?

I would like to finally tag the release today in the evening, so that we
can move on the patches that are waiting in the queue...

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
  2017-09-29 11:45 ` Cyril Hrubis
@ 2017-09-29 12:08   ` Jan Stancek
  2017-09-29 12:27     ` Cyril Hrubis
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Stancek @ 2017-09-29 12:08 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> Hi!
> Jan: Since you suggested to go this way should I commit this with your
>      Suggested-by: or Signed-off-by: ? Or will you do that yourself?

Pushed.

Regards,
Jan

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

* [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
  2017-09-29 12:08   ` Jan Stancek
@ 2017-09-29 12:27     ` Cyril Hrubis
  2017-09-29 12:52       ` Jan Stancek
  0 siblings, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2017-09-29 12:27 UTC (permalink / raw)
  To: ltp

Hi!
Great thanks for pushing it.

Now the only patch to consider is the v2 for controllers/cpuset I've
send yesterday. I'm kind of undecided, it fixes the main issue, but
oncovers a bunch of smaller ones for me. The cpuset_sched_domain,
cpuset_load_balance, cpuset_memory and cpuset_memory_pressure fail for
me.

Have you tried that patch? Does it work for you?

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
  2017-09-29 12:27     ` Cyril Hrubis
@ 2017-09-29 12:52       ` Jan Stancek
  2017-09-29 13:22         ` Cyril Hrubis
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Stancek @ 2017-09-29 12:52 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> Hi!
> Great thanks for pushing it.
> 
> Now the only patch to consider is the v2 for controllers/cpuset I've
> send yesterday. I'm kind of undecided, it fixes the main issue, but
> oncovers a bunch of smaller ones for me. The cpuset_sched_domain,
> cpuset_load_balance, cpuset_memory and cpuset_memory_pressure fail for
> me.
> 
> Have you tried that patch? Does it work for you?

I think I tried v1 (very long time ago) on 3.10 kernel (RHEL7),
and I recall 1 or 2 failures, but that was unrelated to patch.

Regards,
Jan



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

* [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
  2017-09-29 12:52       ` Jan Stancek
@ 2017-09-29 13:22         ` Cyril Hrubis
  0 siblings, 0 replies; 7+ messages in thread
From: Cyril Hrubis @ 2017-09-29 13:22 UTC (permalink / raw)
  To: ltp

Hi!
> > Now the only patch to consider is the v2 for controllers/cpuset I've
> > send yesterday. I'm kind of undecided, it fixes the main issue, but
> > oncovers a bunch of smaller ones for me. The cpuset_sched_domain,
> > cpuset_load_balance, cpuset_memory and cpuset_memory_pressure fail for
> > me.
> > 
> > Have you tried that patch? Does it work for you?
> 
> I think I tried v1 (very long time ago) on 3.10 kernel (RHEL7),
> and I recall 1 or 2 failures, but that was unrelated to patch.

I've tried the patch on pre-systemd distro and it breaks the tests
there, so let's shelve the patch for now. I will get to it right after
the release is done and also look into the reset of the failures I'm
getting on 4.4 kernel, which is the one I've tested.

-- 
Cyril Hrubis
chrubis@suse.cz

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

end of thread, other threads:[~2017-09-29 13:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 22:47 [LTP] [PATCH v2] utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0 naresh.kamboju
2017-09-27 22:48 ` Sumit Semwal
2017-09-29 11:45 ` Cyril Hrubis
2017-09-29 12:08   ` Jan Stancek
2017-09-29 12:27     ` Cyril Hrubis
2017-09-29 12:52       ` Jan Stancek
2017-09-29 13:22         ` Cyril Hrubis

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.