X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fllapi_fid_test.c;h=e8433a1310867cf202cdd1161e4685ccbb39e639;hb=68e6eb752f0bbc6e400403a8be4ed671938af075;hp=6d08f61dc1a813889cd8d9ebec212b57c97bf858;hpb=2b10c0bde269e1d45ae9483a492ce171f05831a1;p=fs%2Flustre-release.git diff --git a/lustre/tests/llapi_fid_test.c b/lustre/tests/llapi_fid_test.c index 6d08f61..e8433a1 100644 --- a/lustre/tests/llapi_fid_test.c +++ b/lustre/tests/llapi_fid_test.c @@ -92,7 +92,10 @@ static void cleanup(void) rc = snprintf(cmd, sizeof(cmd), "rm -rf -- '%s'", mainpath); ASSERTF(rc > 0 && rc < sizeof(cmd), "invalid delete command for path '%s'", mainpath); - system(cmd); + rc = system(cmd); + ASSERTF(rc != -1, "Cannot execute rm command"); + ASSERTF(WEXITSTATUS(rc) == 0, + "rm command returned %d", WEXITSTATUS(rc)); } /* Helper - call path2fid, fd2fid and fid2path against an existing @@ -102,7 +105,7 @@ static void helper_fid2path(const char *filename, int fd) lustre_fid fid; lustre_fid fid2; lustre_fid fid3; - char fidstr[FID_LEN]; + char fidstr[FID_LEN + 1]; char path1[PATH_MAX]; char path2[PATH_MAX]; char path3[PATH_MAX]; @@ -238,7 +241,7 @@ static void test11(void) int rc; int fd; lustre_fid fid; - char fidstr[FID_LEN]; + char fidstr[FID_LEN + 1]; char path[PATH_MAX]; long long recno; int linkno; @@ -368,7 +371,7 @@ static void test30(void) char buf[PATH_MAX]; char buf2[PATH_MAX]; lustre_fid fid; - char fidstr[FID_LEN]; + char fidstr[FID_LEN + 1]; int rc; int i; int j; @@ -695,7 +698,7 @@ static void process_args(int argc, char *argv[]) int main(int argc, char *argv[]) { - char fsname[8]; + char fsname[8 + 1]; int rc; process_args(argc, argv);