[S] Change in ...osmo-python-tests[master]: scripts/osmotestconfig.py: Fix tests failing due to attempted copy on...
Attention is currently required from: fixeria, pespin. arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/python/osmo-python-tests/+/30980 ) Change subject: scripts/osmotestconfig.py: Fix tests failing due to attempted copy on socket files ...................................................................... Patch Set 5: (1 comment) File scripts/osmotestconfig.py: https://gerrit.osmocom.org/c/python/osmo-python-tests/+/30980/comment/77e517... PS5, Line 80: ign = shutil.ignore_patterns('*.cfg', '*tmp_dummy_sock')
I also don't like the proposed approach, agreeing with @pespin that putting project specific filenam […] `shutil` (see [here](https://docs.python.org/3/library/shutil.html) for documentation) itself includes filename-pattern exclusion only it seems. I've just taken a look at the documentation and found this:
``` Changed in version 3.2: Added the copy_function argument to be able to provide a custom copy function. Added the ignore_dangling_symlinks argument to silence dangling symlinks errors when symlinks is false. ``` which I suppose would via (some library of) Python3 enable us to pass something like (pseudo-code...) ``` if src_file is a special file return else copy src_file to destination ``` as a custom copy function. Did a short online research and it appears that Python3 does not provide file type detection (feel free to correct me if I'm wrong), so a system call to System V `file` command could be used. Iirc the exception thrown from `shutil.copytree()` was all but specific about what was going on. Maybe some enhanced exception handling using the auditing event triggered would also do the trick, I don't know enough about this though. I still feel like the current change is a simple fix for now that won't break anything and can still be followed up upon easily with some more sophisticated solution if need be. -- To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/30980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Change-Id: I3a3cc7ed135b60b97eb901cfc20fdcb924e4f664 Gerrit-Change-Number: 30980 Gerrit-PatchSet: 5 Gerrit-Owner: arehbein <arehbein@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Comment-Date: Fri, 23 Jun 2023 18:05:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein@sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy@sysmocom.de> Comment-In-Reply-To: pespin <pespin@sysmocom.de> Gerrit-MessageType: comment
participants (1)
-
arehbein