From: Andreas Dilger Date: Mon, 2 Jul 2018 21:06:32 +0000 (-0400) Subject: tests: make generated test scripts read-only X-Git-Tag: v1.44.3-rc2~8 X-Git-Url: https://git.whamcloud.com/?p=tools%2Fe2fsprogs.git;a=commitdiff_plain;h=6e2863e445044758518fc4c5276128610da4d203 tests: make generated test scripts read-only Make generated test scripts read-only, to avoid errors by developers editing the generated test scripts and then having them accidentally clobbered when "make" is run again. Change-Id: I60d417b816b7c559b5e05baf4167fc2cf2a871cf Signed-off-by: Andreas Dilger Signed-off-by: Theodore Ts'o --- diff --git a/tests/Makefile.in b/tests/Makefile.in index 4a19758..8c4d204 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -15,6 +15,7 @@ all:: @DO_TEST_SUITE@ test_one test_script test_one: $(srcdir)/test_one.in Makefile mke2fs.conf @echo "Creating test_one script..." + @[ -f test_one ] && chmod u+w test_one || true @echo "#!/bin/sh" > test_one @echo "HTREE=y" >> test_one @echo "QUOTA=y" >> test_one @@ -23,14 +24,15 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf @echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one @echo "DD=@DD@" >>test_one @cat $(srcdir)/test_one.in >> test_one - @chmod +x test_one + @chmod +x-w test_one test_script: test_one test_script.in Makefile mke2fs.conf @echo "Creating test_script..." + @[ -f test_script ] && chmod u+w test_script || true @echo "#!/bin/sh" > test_script @echo "SRCDIR=@srcdir@" >> test_script @cat $(srcdir)/test_script.in >> test_script - @chmod +x test_script + @chmod +x-w test_script mke2fs.conf: $(srcdir)/mke2fs.conf.in $(CP) $(srcdir)/mke2fs.conf.in mke2fs.conf