Skip to content

Commit

Permalink
syscalls/execve04,creat07: skip for kernels 6.11 and later
Browse files Browse the repository at this point in the history
The behaviour is allowed since commit:
  2a010c412853 ("fs: don't block i_writecount during exec")
that landed in 6.11-rc1.

Closes: #1184

Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Li Wang <liwang@redhat.com>
  • Loading branch information
jstancek committed Aug 14, 2024
1 parent a67dc56 commit 12588ee
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions testcases/kernel/syscalls/creat/creat07.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ static void verify_creat(void)
SAFE_WAITPID(pid, NULL, 0);
}

static void setup(void)
{
if ((tst_kvercmp(6, 11, 0)) >= 0) {
tst_brk(TCONF, "Skipping test, write to executed file is "
"allowed since 6.11-rc1.\n"
"2a010c412853 (\"fs: don't block i_writecount during exec\")");
}
}

static struct tst_test test = {
.setup = setup,
.test_all = verify_creat,
.needs_checkpoints = 1,
.forks_child = 1,
Expand Down
10 changes: 10 additions & 0 deletions testcases/kernel/syscalls/execve/execve04.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,17 @@ static void do_child(void)
exit(0);
}

static void setup(void)
{
if ((tst_kvercmp(6, 11, 0)) >= 0) {
tst_brk(TCONF, "Skipping test, write to executed file is "
"allowed since 6.11-rc1.\n"
"2a010c412853 (\"fs: don't block i_writecount during exec\")");
}
}

static struct tst_test test = {
.setup = setup,
.test_all = verify_execve,
.forks_child = 1,
.child_needs_reinit = 1,
Expand Down

0 comments on commit 12588ee

Please sign in to comment.