From: Thomas Veerman Date: Wed, 19 Sep 2012 14:58:32 +0000 (+0000) Subject: tests: don't chmod 777 everything upon cleanup X-Git-Tag: v3.2.1~313 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-dsfromkey.html?a=commitdiff_plain;h=6cb94cc91bf983e65d2f3132653adbe3c110dade;p=minix.git tests: don't chmod 777 everything upon cleanup rm -rf works just fine no matter what mode bits are set (modulo file ownership and current user id). Test 43 creates a symlink to / and the chmod operation would change file permissions outside of the test directory. --- diff --git a/test/common.c b/test/common.c index 8e78336f4..2da265d97 100644 --- a/test/common.c +++ b/test/common.c @@ -80,14 +80,6 @@ int test_nr; { char buf[128]; - /* "rm -rf dir" will not work unless all the subdirectories have suitable - * permissions. Minix chmod is not recursive so it is not easy to change - * all the permissions. I had to fix opendir() to stop the bash shell - * from hanging when it opendir()s fifos. - */ - sprintf(buf, "chmod 777 DIR_%02d DIR_%02d/* DIR_%02d/*/* >/dev/null 2>&1", - test_nr, test_nr, test_nr); - (void) system(buf); /* usually fails */ sprintf(buf, "rm -rf DIR_%02d >/dev/null 2>&1", test_nr); if (system(buf) != 0) printf("Warning: system(\"%s\") failed\n", buf); }