dosemu2 / fdpp

FreeDOS plus-plus, 64bit DOS
GNU General Public License v3.0
198 stars 18 forks source link

rfe: add share.exe functionality #134

Closed stsp closed 4 years ago

stsp commented 4 years ago

Since we do not provide share.exe, it would be better if people not to google around for one.

stsp commented 4 years ago

https://github.com/FDOS/share

stsp commented 4 years ago

Hi Andrew, could you please check if the share works in branch "share"? If not - please upload the test-case.

andrewbird commented 4 years ago

I just started writing the share tests, so will probably be tomorrow sometime.

andrewbird commented 4 years ago

Doesn't seem to work for me unfortunately. I wanted to try testlock.zip share test (test 3), but it's failing on basic locking too. For an easy example try my simple test case in travis-ci-15 branch

python3 test/test_dos.py PPDOSGITTestCase.test_fat_ds3_lock_twice
stsp commented 4 years ago
$ python3 test/test_dos.py PPDOSGITTestCase.test_fat_ds3_lock_twice
None                                                                             ... Traceback (most recent call last):
  File "test/test_dos.py", line 5009, in <module>
    unittest.main(testRunner=MyTestRunner, verbosity=2)
  File "/usr/lib64/python3.7/unittest/main.py", line 101, in __init__
    self.runTests()
  File "/usr/lib64/python3.7/unittest/main.py", line 271, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/lib64/python3.7/unittest/runner.py", line 176, in run
    test(result)
  File "/usr/lib64/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python3.7/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib64/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python3.7/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib64/python3.7/unittest/case.py", line 676, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python3.7/unittest/case.py", line 601, in run
    result.startTest(self)
  File "/home/stas/src/dosemu2-devel/test/common_framework.py", line 272, in startTest
    name = test.id().replace('__main__', test.pname)
  File "/usr/lib64/python3.7/unittest/loader.py", line 32, in __getattr__
    return super(_FailedTest, self).__getattr__(name)
AttributeError: 'super' object has no attribute '__getattr__'

What does this mean?

andrewbird commented 4 years ago

Did you use the travis-ci-15 branch, as that looks like a very poor way of saying the test doesn't exist?

stsp commented 4 years ago

Thanks! Got it to work on fat (and not on mfs??)

andrewbird commented 4 years ago

I have it working on Mfs here, but only using Linux OFD locks which aren't portable. Trying to code up a more generic solution, but finding it hard!

stsp commented 4 years ago

What is the problem with lockf()?

andrewbird commented 4 years ago

So the test is now working for me too on FAT.

Regarding lockf() at least on Linux it's implemented on top of fcntl() locking, but the man pages are unclear if they suffer from the same problems:

I don't like the way that lockf() locks from the current fd position, but I guess we could store the position and restore when applying the lock.

Probably best to move this discussion to the https://github.com/dosemu2/dosemu2/issues/270 ticket now.