Commit Graph

16 Commits

Author SHA1 Message Date
Genevieve Helsel
247965ae33 fix flaky time test by rounding to nearest second
Summary:
we've seen flaky tests here on stress test runs, lets subtract time.time() by an epsilon of one to ensure that the comparison is only made within a second precision (time.time() worst case precision)

an example error: `AssertionError: 1595414015.5022793 not greater than or equal to 1595414015.5025299`
`AssertionError: 1595759609.439305 not greater than or equal to 1595759609.441682`

Reviewed By: chadaustin

Differential Revision: D22687496

fbshipit-source-id: 8e87148d620577e3198d2845d785a87a909cd1d3
2020-07-27 13:04:13 -07:00
Chad Austin
ec00e91309 disallow setting suid, sgid, and sticky bits
Summary:
FUSE_HANDLE_KILLPRIV expects that any write() call is handled by
clearing the setuid and setgid bits in the userspace. To avoid
implementing that behavior, disallow setting setuid or setgid in the
first place.

Reviewed By: xavierd

Differential Revision: D21333703

fbshipit-source-id: eb084ee8b00afe74c0da26e41c32c2cb742723da
2020-04-30 15:18:35 -07:00
Andres Suarez
fbdb46f5cb Tidy up license headers
Reviewed By: chadaustin

Differential Revision: D17872966

fbshipit-source-id: cd60a364a2146f0dadbeca693b1d4a5d7c97ff63
2019-10-11 05:28:23 -07:00
Adam Simpkins
9bfb48c921 update license headers in .py files
Summary:
Update the copyright & license headers in Python files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487088

fbshipit-source-id: 9f2138dff41048d2c35f15e09a04ae5a9c9c80dd
2019-06-19 17:02:46 -07:00
Adam Simpkins
20f211acb8 remove unused python imports
Summary: Remove a number of unused imports detected by the linter.

Reviewed By: wez

Differential Revision: D15776268

fbshipit-source-id: 221f45d275664d037bbabcac9858b40266b4833e
2019-06-12 14:00:57 -07:00
Lukasz Langa
deee232d74 Upgrade to 18.5b1
Summary: Mostly empty lines removed and added.  A few bugfixes on excessive line splitting.

Reviewed By: cooperlees

Differential Revision: D8198776

fbshipit-source-id: 4361faf4a2b9347d57fb6e1342c494575f2beb67
2018-05-30 01:11:47 -07:00
Chad Austin
df4dda2dfe allow changing uid/gid on files and directories
Summary:
Relax the restriction on changing uid/gid on inodes.  We'll see what
cans of worms this opens I guess.  (Landing this is low priority, but
might be important for making some of the existing tooling in fbsource
and www work.)

Reviewed By: simpkins

Differential Revision: D7768655

fbshipit-source-id: 95fe02fe7ddc001335dbdb34e16a989a85820240
2018-05-24 00:15:54 -07:00
Wez Furlong
c83849e5af enable Black python formatting and apply to eden
Summary: No functional changes

Reviewed By: simpkins

Differential Revision: D7945989

fbshipit-source-id: e267e6134d87570427b3fdf5974006dce5774113
2018-05-09 21:37:07 -07:00
Adam Simpkins
398a824aac add type annotations to more of the integration tests
Summary:
We already had type annotations on most of the `hg` integration tests.  This
adds them for the top-level (non-source-control-specific) tests.

typeseverywhere

Reviewed By: wez

Differential Revision: D7459281

fbshipit-source-id: 41266b232ded510d6b63dd3e62c272a0cd6a0e1a
2018-04-04 17:55:11 -07:00
Adam Simpkins
a21f0763ba restructure @eden_repo_test decorator to make mypy happy
Summary:
Update the eden_repo_test decorator so that it no longer automatically adds
`EdenRepoTestBase` as a parent class.  Individual test classes still specify
`EdenRepoTest` as their parent now.

This enables `mypy` to correctly figure out that the individual test classes
derive from `unittest.TestCase`.

This basically does the same thing as D6268258 for the top-level integration
tests.

Reviewed By: wez

Differential Revision: D7459280

fbshipit-source-id: 5d18bd241dad77d55541ac3fa1d169496ffe7003
2018-04-04 17:55:11 -07:00
Wez Furlong
7ab70a5493 adjust setattr expectations when run as root
Summary: Rather than EPERM we get EACCESS when running as root

Reviewed By: chadaustin

Differential Revision: D6853303

fbshipit-source-id: c6743c8d036a24255d2d31c560034c972a0253c7
2018-01-30 21:50:39 -08:00
Sergey Zhupanov
c2eb5f3f3f Added integration test validating umask is properly set on file creation by touch.
Summary: Added integration test validating umask is properly set on file creation by touch.

Reviewed By: wez

Differential Revision: D6749557

fbshipit-source-id: adb89ec996148ede95bdb23399745b39504ae8db
2018-01-18 21:23:21 -08:00
Jyothsna Konisa
916c129655 setting TimeStamps for TreeInode
Summary:
Updated time stamps of TreeInode accurately on mkdir,rmdir,mknode,symlink,create,unlink and readdir.
updated the `TreeInode::getattr` function to return in-memory timestamps.

Reviewed By: simpkins

Differential Revision: D5568183

fbshipit-source-id: c36f7fb767cd4342aab5cc983eea56e37cd2077e
2017-08-14 23:23:23 -07:00
Jyothsna Konisa
8bcd0f234c Setting TimeStamps for FileInode
Summary:
updating atime,ctime,mtime of FileInode on read, write and setattr system calls.
modified `FileInode::stat` function to return accurate inmemory timestamps.

Reviewed By: simpkins

Differential Revision: D5552666

fbshipit-source-id: 86d446f72908663f8db509b7b789d9f35d17df3a
2017-08-14 23:23:23 -07:00
Jyothsna Konisa
ef1509c49b integration tests for timestamps
Summary:
1. Added timestamp integration tests for directories.
2. Modified few existing tests.
3. Added tests for cheking timestamps for open files.

Reviewed By: simpkins

Differential Revision: D5294138

fbshipit-source-id: 013c086644b03d76e2df43523c4b7aef657484ca
2017-06-21 23:22:08 -07:00
Adam Simpkins
8884b46b3f move integration tests to eden/integration
Summary:
Move the integration tests from eden/fs/integration up one directory, to
eden/integration.

The main benefit is that this makes it easy to run just the edenfs unit tests
by running "buck test eden/fs/...".  These unit tests complete much more
quickly than the full set of integration tests, providing a faster test suite
to re-run repeatedly during development.  The integration tests can be run with
"buck test eden/integration/...", and the full set of tests can still be run
with "buck test eden/..."

Reviewed By: wez

Differential Revision: D4490247

fbshipit-source-id: 5ceb5a19526f56e1cb926f352fa30ad2f1212c05
2017-01-31 14:41:14 -08:00