syscalls/creat06: Fix the use of tst_brk() in cleanup
PATCH 1/1 syscalls/creat06: Fix the use of tst_brk() in cleanup
Calling tst_brk() from the test cleanup would cause infinite loop and segfault, we should call tst_res(TWARN) instead, and the tst_umount() calls tst_res(TWARN) already, so we just use the tst_umount() here.
Signed-off-by Guangwen Feng <[email protected]>
--- testcases/kernel/syscalls/creat/creat06.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
testcases/kernel/syscalls/creat/creat06.c +2 -4
@@ -172,10 +172,8 @@ static void test6_cleanup(void)static void cleanup (void ) { -if (mount_flag &&tst_umount ("mntpoint" ) <0 ) { -tst_brk (TBROK |TERRNO ,"umount device:%s failed" , - tst_device->dev); - } +if (mount_flag) +tst_umount ("mntpoint" ); }static struct tst_test test = {
Signature · 1 line
1.8.4.2
PATCH 1/1 syscalls/creat06: Fix the use of tst_brk() in cleanup
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]