Message ID | 1638863781-2196-1-git-send-email-xuyang2018.jy@fujitsu.com |
---|---|
State | Accepted |
Headers | show |
Series | [v2] syscalls/statx05, 07: Move e4crypt, exportfs to tst_test structure | expand |
Hi Cyril Thanks for your review, merged. Best Regards Yang Xu > Reviewed-by: Cyril Hrubis<chrubis@suse.cz> > Signed-off-by: Yang Xu<xuyang2018.jy@fujitsu.com> > --- > v1-v2: keep e4crypt info in statx05 description instead of removing > testcases/kernel/syscalls/statx/statx05.c | 6 ++---- > testcases/kernel/syscalls/statx/statx07.c | 6 ++++-- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/testcases/kernel/syscalls/statx/statx05.c b/testcases/kernel/syscalls/statx/statx05.c > index a3184e7e3..86bd3ace1 100644 > --- a/testcases/kernel/syscalls/statx/statx05.c > +++ b/testcases/kernel/syscalls/statx/statx05.c > @@ -111,10 +111,7 @@ static void setup(void) > > ret = tst_system("echo qwery | e4crypt add_key "TESTDIR_FLAGGED); > > - if (WEXITSTATUS(ret) == 127) > - tst_brk(TCONF, "e4crypt not installed!"); > - > - if (WEXITSTATUS(ret)) > + if (ret) > tst_brk(TCONF, "e4crypt failed (CONFIG_EXT4_ENCRYPTION not set?)"); > } > > @@ -136,6 +133,7 @@ static struct tst_test test = { > .dev_fs_type = "ext4", > .needs_cmds = (const char *[]) { > "mkfs.ext4", > + "e4crypt", > NULL > } > }; > diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c > index 89de0c487..e1ae36a35 100644 > --- a/testcases/kernel/syscalls/statx/statx07.c > +++ b/testcases/kernel/syscalls/statx/statx07.c > @@ -135,8 +135,6 @@ static void setup(void) > exported = 1; > > ret = tst_system(cmd); > - if (WEXITSTATUS(ret) == 127) > - tst_brk(TCONF | TST_ERR, "%s not found", cmd); > if (ret) > tst_brk(TBROK | TST_ERR, "failed to exportfs"); > > @@ -172,4 +170,8 @@ static struct tst_test test = { > .needs_tmpdir = 1, > .dev_fs_type = "nfs", > .needs_root = 1, > + .needs_cmds = (const char *[]) { > + "exportfs", > + NULL > + } > };
diff --git a/testcases/kernel/syscalls/statx/statx05.c b/testcases/kernel/syscalls/statx/statx05.c index a3184e7e3..86bd3ace1 100644 --- a/testcases/kernel/syscalls/statx/statx05.c +++ b/testcases/kernel/syscalls/statx/statx05.c @@ -111,10 +111,7 @@ static void setup(void) ret = tst_system("echo qwery | e4crypt add_key "TESTDIR_FLAGGED); - if (WEXITSTATUS(ret) == 127) - tst_brk(TCONF, "e4crypt not installed!"); - - if (WEXITSTATUS(ret)) + if (ret) tst_brk(TCONF, "e4crypt failed (CONFIG_EXT4_ENCRYPTION not set?)"); } @@ -136,6 +133,7 @@ static struct tst_test test = { .dev_fs_type = "ext4", .needs_cmds = (const char *[]) { "mkfs.ext4", + "e4crypt", NULL } }; diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c index 89de0c487..e1ae36a35 100644 --- a/testcases/kernel/syscalls/statx/statx07.c +++ b/testcases/kernel/syscalls/statx/statx07.c @@ -135,8 +135,6 @@ static void setup(void) exported = 1; ret = tst_system(cmd); - if (WEXITSTATUS(ret) == 127) - tst_brk(TCONF | TST_ERR, "%s not found", cmd); if (ret) tst_brk(TBROK | TST_ERR, "failed to exportfs"); @@ -172,4 +170,8 @@ static struct tst_test test = { .needs_tmpdir = 1, .dev_fs_type = "nfs", .needs_root = 1, + .needs_cmds = (const char *[]) { + "exportfs", + NULL + } };