#440: depcheck uses /tmp on f18 and f19 systems, filling up tmpfs and crashing --------------------+----------------------- Reporter: tflink | Owner: jskladan Type: defect | Status: new Priority: major | Milestone: Depcheck Component: tests | Resolution: Keywords: | Blocked By: Blocking: | --------------------+-----------------------
Comment (by tflink): This is the patch I've been using in stg. It does seem to be working but I'm not really sure this is needed anymore. I've disabled tmp-on-tmpfs for all the autoqa clients because they were still having problems filling up /tmp and crashing. Either way, the patch is: {{{ [33m2398168[m -[31m (HEAD, master, develop)[m changing all temp file creation in depcheck to use /var/tmp instead of /tmp. Fixes #440 [32m(22 hours ago) [1;34m<Tim Flink>[m diff --git a/tests/depcheck/depcheck.py b/tests/depcheck/depcheck.py index c176f45..b429b71 100644 --- a/tests/depcheck/depcheck.py +++ b/tests/depcheck/depcheck.py @@ -184,7 +184,7 @@ class depcheck(AutoQATest): fd.close() # Run the test - fd = tempfile.NamedTemporaryFile(delete=False) + fd = tempfile.NamedTemporaryFile(delete=False, dir='/var/tmp/') pickle.dump({'accepted': cmd_accepted, 'to_test': cmd_test}, fd) fd.close() diff --git a/tests/depcheck/depcheck_lib.py b/tests/depcheck/depcheck_lib.py index e600323..d226638 100644 --- a/tests/depcheck/depcheck_lib.py +++ b/tests/depcheck/depcheck_lib.py @@ -284,7 +284,7 @@ def do_depcheck(repo, package_files, accepted=[], profile=False, test_dir=None, if accepted: # create a tempdir if one has not been already passed in if accepted_dir is None: - accepted_dir = tempfile.mkdtemp(prefix='depcheck-accepted.') + accepted_dir = tempfile.mkdtemp(prefix='depcheck-accepted.', dir='/var/tmp/') # mash the accepted packages into a proto-updates repo for p in accepted: @@ -332,7 +332,7 @@ def do_depcheck(repo, package_files, accepted=[], profile=False, test_dir=None, # Set up a temp dir we can mash in if one hasn't been passed in # (so we don't delete our input files) if test_dir is None: - test_dir = tempfile.mkdtemp(prefix='depcheck.') + test_dir = tempfile.mkdtemp(prefix='depcheck.', dir='/var/tmp/') for p in package_files: os.symlink(os.path.realpath(p), os.path.join(test_dir, os.path.basename(p))) # mash away, you can mash away.. stay all day.. if you want to @@ -386,8 +386,8 @@ def depcheck_main(repo, package_files, accepted=[], profile=False): files, print the results, and return a tuple (retval, problems, accept)''' # create temp dirs for depcheck repositories - temp_dir = tempfile.mkdtemp(prefix='depcheck.') - acc_dir = tempfile.mkdtemp(prefix='depcheck-accepted.') + temp_dir = tempfile.mkdtemp(prefix='depcheck.', dir='/var/tmp') + acc_dir = tempfile.mkdtemp(prefix='depcheck-accepted.', dir='/var/tmp') print "Temp dirs %s and %s created." % (temp_dir, acc_dir) try: diff --git a/tests/depcheck/depcheck_pretty.py b/tests/depcheck/depcheck_pretty.py index 07ac36e..b76a5c1 100644 --- a/tests/depcheck/depcheck_pretty.py +++ b/tests/depcheck/depcheck_pretty.py @@ -20,7 +20,7 @@ class DepcheckPretty(object): {'orc-0.4.14-1.fc14' : ['orc-devel-0.4.14-1.fc14.i686.rpm', 'orc-0.4.14-1.fc14.i686.rpm']} """ - f, fname = mkstemp() + f, fname = mkstemp(dir='/var/tmp') f = open(fname, 'w') f.write(depcheck_output) f.close() }}} -- Ticket URL: <https://fedorahosted.org/autoqa/ticket/440#comment:4> AutoQA <http://autoqa.fedorahosted.org> Automated QA project _______________________________________________ qa-devel mailing list qa-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/qa-devel