#1772: Simfactory: potentially serious problem with CACHE directory in the simulations directory -------------------------+-------------------------------------------------- Reporter: bmundim | Owner: Type: defect | Status: new Priority: critical | Milestone: ET_2015_05 Component: SimFactory | Version: development version Resolution: | Keywords: CACHE -------------------------+--------------------------------------------------
Comment (by rhaas):
Actually the way Bruno does it may be better. The test really should be "did I get a hard link" (which is what I wanted) rather than "did I get something else that I got on this faulty system". One would have to check that eg python's stat called on a symlink which points to a file for which hard links exist does indeed report the number of hard links on the symlink and not those on the pointed to file. Ie. {{{ touch TestFile ln TestFile HardLinkToTestFile ln -s TestFile SymbolicLinkToTestFile python <<EOF import os print os.lstat("SymbolicLinkToTestFile") print os.stat("SymbolicLinkToTestFile") EOF }}} which at least on my workstation gives "st_nlinks = 2" for the "stat" call and "st_nlinks=1" for the "lstat" call (see {{{man 2 lstat}}} for the difference between the two).