Commit Graph

9 Commits

Author SHA1 Message Date
Xavier Deguillard
ff5efb194a test-data: remove snapshot 20190313
Summary:
Unfortunately, Mercurial changed a lot since then and is unable to understand
the data stored in it. Let's simply remove it, the 2021 snapshot is still
working and we should keep it as such.

Reviewed By: fanzeyi

Differential Revision: D34010250

fbshipit-source-id: 3c890a232d7c87576276933b1430adfe5e3a45f6
2022-02-04 13:50:48 -08:00
Zhengchao Liu
2e86cf8b6b fix fsck snapshot integration tests
Summary:
This test is broken due to Rust panic from hg (likely there was some change in hg and the original snapshot was from 2018). It's hard to know exactly what's causing this issue because 1) it's not from eden 2) this has been broken for a while so it's tricky to bisect.
To bring back the coverage and run on a modern repo, this diff:
 * generates a new snapshot (`buck run //eden/integration/snapshot:gen_snapshot -- basic`).
 * adds a step to translate hgrc because the path at snapshot generation time is in it.
 * migrates this test to the new snapshot

Reviewed By: kmancini

Differential Revision: D29670241

fbshipit-source-id: 1c5dccc673d516334de83582b32e2e3c9dc308f1
2021-07-14 16:20:04 -07:00
Chad Austin
9a4439189e enable treemanifest in snapshots
Summary:
The 2018-11 and 2019-03 snapshots were created with flatmanifest
repositories. Flatmanifest support is going away, so update them with
treemanifest repositories.

I untarred them and added an hgrc containing the following contents:

```
[extensions]
treemanifest =

[treemanifest]
treeonly = True

[remotefilelog]
reponame = snapshot
```

It's a bit janky to update a repo in place like this, but it means the
snapshot doesn't have to be recreated from scratch.

Reviewed By: simpkins

Differential Revision: D17103193

fbshipit-source-id: 62da8c2fe579d90281af83d4d8912cc64b09897b
2019-08-28 18:46:03 -07:00
Adam Simpkins
a328624182 generate a new version of the "basic" snapshot
Summary:
This checks in a new version of the "basic" snapshot file.

The change I am most interested in picking up is the recent change to make
sure that we always flush column family information in the RocksDB local
store.

I don't think there were too many other consequential changes to our on-disk
data structures since we last regenerated the snapshot in November.  The main
other change is that we no longer make the checkout mount point directories
read-only (D13515854).

Reviewed By: chadaustin

Differential Revision: D14452215

fbshipit-source-id: 87f1cdb61a91ed0f71333f2566ab6b5dac79f628
2019-03-18 11:36:42 -07:00
Adam Simpkins
ee47b3a85e add more files to the basic snapshot
Summary:
Add several more files to the basic snapshot, so we can test more cases
in the fsck tests:
- Materialized, new, and unmodified symlinks
- A deeper directory tree of directory inodes that are not materialized (still
  have a source control tree hash) but have children inodes allocated and are
  therefore present in the overlay.
- A socket in a slightly deeper directory so we can test behavior of sockets
  inside directories that have been corrupted..

As before I have replaced the older basic snapshot instead of adding a new
one, since the Eden data storage formats have not changed since the last
snapshot was created.

Reviewed By: chadaustin

Differential Revision: D13164658

fbshipit-source-id: d117c9cc336709044de212637c03140dfadd9a96
2018-11-26 12:28:52 -08:00
Adam Simpkins
4d8755e1a0 add some new subdirectories to the basic snapshot
Summary:
This updates the basic snapshot code to include a couple slightly deeper
directories.  I plan to use this in the fsck tests to verify handling of
orphan directories that contain subdirectories.

Normally it would be preferable to keep the old `basic-20181030` snapshot, and
simply add this new snapshot without than replacing the old one.  However, I
don't think we have made any meaningful changes to our on-disk storage formats
since the previous snapshot was generated, so it seems okay to just delete the
old snapshot.

Reviewed By: strager

Differential Revision: D13151861

fbshipit-source-id: e6b7583beecb5d9cc55271ad2dea8d36980542d1
2018-11-26 12:28:52 -08:00
Adam Simpkins
49a7c05d61 add code to test saved snapshots
Summary:
Update the snapshot framework code to add tests that mount saved snapshots
with the current edenfs build and verifies that they behave as expected.

This also changes the snapshot generation code a fair amount as well, in
order to be able to verify the snapshot data:
- We now more cleanly split out data that should be saved when the snapshot is
  first generated (such as the `.eden` state directory) and data that should
  be re-generated each time the snapshot is unpacked (such as the `/etc/eden`
  config directory and the system configuration for `hg`).
- The code is now capable of rewriting absolute paths in the Eden state files
  so it is usable in a new location after it has been unpacked.

This also updates the "basic" snapshot type to create a wider variety of types
of files and file changes, and to be able to verify the contents of a resumed
snapshot.

Reviewed By: strager

Differential Revision: D9955411

fbshipit-source-id: 76012c01016cf4d89dc611c5596a05f5e7f013ed
2018-10-31 12:10:27 -07:00
Adam Simpkins
7beb20cb36 put the overlay test data into a tar file
Summary:
The OverlayGoldMasterTest.can_load_overlay_v2 unit test is failing stress test
runs because it keeps overlay data checked into the source repository and runs
the tests directly against this directory.  This causes the tests to fail if
multiple test are run in parallel since they are all trying to use this same
directory simultaneously.

We need to make a copy of this directory rather than having the tests run
directly against the source tree to avoid locking issues.  The overlay code
can potentially also try to upgrade the overlay format when it opens the
directory.  This seems like another reason why it should not run directly
against the directory in the source repository.

This changes the test to make a copy of the overlay directory in a temporary
location, and run the tests against that directory.  As part of this change I
also bundled the original input into a tar file.

Reviewed By: chadaustin

Differential Revision: D8555716

fbshipit-source-id: bf24bd96a0a31c097d9cf8e0fbe8b0bfaf009943
2018-06-20 18:36:27 -07:00
Chad Austin
7953c2280d add gold master test for current overlay format
Summary:
To avoid regressing loading existing Overlay formats, add a gold
master test.

Reviewed By: wez

Differential Revision: D8329998

fbshipit-source-id: b969e38607dcc0cac6bb32da74aacd8bb036b0b3
2018-06-13 21:07:48 -07:00