utimensat01: fix kvers arrary boundary
To get rid of errors:
8 utimensat01.c:295: INFO: Testing variant: syscall with old kernel spec 9 tst_test.c:1300: BROK: Test killed by SIGSEGV!
and,
BROK: utimensat01.c:293: mkdir(test_dir,0700) failed: EEXIST (17)
Signed-off-by Li Wang <[email protected]>
--- testcases/kernel/syscalls/utimensat/utimensat01.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/utimensat/utimensat01.c +3 -1
@@ -161,6 +161,7 @@ static void update_error(struct test_case *tc)static struct tst_kern_exv kvers[] = {/* Ubuntu kernel has patch b3b4283 since 4.4.0-48.69 */ {"UBUNTU" ,"4.4.0-48.69" }, + {NULL ,NULL }, };if (tc->exp_err !=-1 )
@@ -295,7 +296,8 @@ static void setup(void)tst_res (TINFO ,"Testing variant: %s" , variants[tst_variant].desc); bad_addr =tst_get_bad_addr (NULL ); -SAFE_MKDIR (TEST_DIR ,0700 ); +if (access (TEST_DIR ,R_OK )) +SAFE_MKDIR (TEST_DIR ,0700 );for (i =0 ; i <ARRAY_SIZE (tcase); i++)update_error (&tcase[i]);
Signature · 1 line
2.21.1