Commit Graph

25 Commits

Author SHA1 Message Date
Roland Vet
387e2a01ce Test 'fix'?
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-23 08:37:23 +01:00
Roland Vet
8a800c671e Replace 7 spaces and a tab with a tab.
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22 21:12:49 +01:00
Roland Vet
0728677cdc Fix dirent test: lines have changed
Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22 08:12:28 +01:00
Roland Vet
466802d8c7 Fix line check
Output has become much more verbose:

mounting version 1.6: btree_subvolume_children opts=ro,errors=continue,degraded,nochanges,norecovery,read_only
recovering from clean shutdown, journal seq 9
alloc_read... done
stripes_read... done
snapshots_read... done
u64s 16 type inode_v3 0:4096:U32_MAX len 0 ver 0:   mode=40755
  flags= (16300000)
  journal_seq=1
  bi_size=0
  bi_sectors=0

  bi_version=0bi_atime=90363614
  bi_ctime=91363625
  bi_mtime=91363625
  bi_otime=90363614
  bi_uid=0
  bi_gid=0
  bi_nlink=1
  bi_generation=0
  bi_dev=0
  bi_data_checksum=0
  bi_compression=0
  bi_project=0
  bi_background_compression=0
  bi_data_replicas=0
  bi_promote_target=0
  bi_foreground_target=0
  bi_background_target=0
  bi_erasure_code=0
  bi_fields_set=0
  bi_dir=0
  bi_dir_offset=0
  bi_subvol=1
  bi_parent_subvol=0
  bi_nocow=0

u64s 17 type inode_v3 0:4097:U32_MAX len 0 ver 0:   mode=40700
  flags= (15300000)
  journal_seq=1
  bi_size=0
  bi_sectors=0

  bi_version=0bi_atime=91363625
  bi_ctime=91363625
  bi_mtime=91363625
  bi_otime=91363625
  bi_uid=0
  bi_gid=0
  bi_nlink=0
  bi_generation=0
  bi_dev=0
  bi_data_checksum=0
  bi_compression=0
  bi_project=0
  bi_background_compression=0
  bi_data_replicas=0
  bi_promote_target=0
  bi_foreground_target=0
  bi_background_target=0
  bi_erasure_code=0
  bi_fields_set=0
  bi_dir=4096
  bi_dir_offset=453699834857023875
  bi_subvol=0
  bi_parent_subvol=0
  bi_nocow=0

Signed-off-by: Roland Vet <RlndVt@protonmail.com>
2024-02-22 08:12:28 +01:00
Thomas Bertschinger
f5baaf48e3 move Rust sources to top level, C sources into c_src
This moves the Rust sources out of rust_src/ and into the top level.
Running the bcachefs executable out of the development tree is now:

$ ./target/release/bcachefs command
or
$ cargo run --profile release -- command

instead of "./bcachefs command".

Building and installing is still:

$ make && make install

Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16 01:47:05 -05:00
Thomas Bertschinger
0a284fc4ff convert main() from C to Rust
This moves the main() function from C to Rust. It also updates the name
of the Rust package from "bcachefs-rust" to "bcachefs-tools".

Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16 01:46:41 -05:00
Brett Holman
a0b523a679 Add valgrind suppressions:
- urcu
- rebalance thread
2022-03-24 11:41:10 -06:00
Brett Holman
385dcecb96 Update valgrind suppressions file for urcu leak.
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
2021-10-12 20:22:45 -06:00
Brett Holman
60a6b2882e Clean up smoketest and pytests.
- Replace depreciated tempfile with mktemp in smoketest.
- Remove unused pytest imports and variables.
- Make path lookup less fragile. Allows pytest to run from any cwd.
- Prevent exeptions caused by calling functions/methods on None objects.
- Disable fuse tests in smoketest. These are broken and add noise.
- Add missing travis CI dependency.

Signed-off-by: Brett Holman <bholman.devel@gmail.com>
2021-10-11 20:24:12 -06:00
Kayla Fire
3f7b0b0832 pytest: remove arbitrary assertion 2021-10-05 11:44:57 -04:00
Justin Husted
3da3c4ff8b Disable fuse remount test w/valgrind
This test fails with valgrind due to leaks currently.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2021-06-05 01:51:43 -07:00
Justin Husted
1cddbe95f9 Make fuse tests fail on emergency ro or iter leak
Signed-off-by: Justin Husted <sigstop@gmail.com>
2021-06-05 01:49:41 -07:00
Justin Husted
bf4e896460 Fix python test_list
The test arbitrarily checked some printed output which changed.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2021-06-04 15:28:17 -07:00
Brett Holman
d937e485b6 add Valgrind suppression to ignore userspace-rcu leak 2021-06-04 16:12:13 -06:00
Jaanus Torp
4a81dc2fa3
Fixes tests which have broken since 'list' improvements
Improvements to the 'list' command broke the basic test assertion that the output should be only 2 lines. Now it's 95 lines. This PR fixes this test for now.

Thank you for the great work!
2020-08-22 14:30:50 +00:00
Justin Husted
5d79efdd19 bcachefs-tools: Fix test.
Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-28 20:10:02 -08:00
Justin Husted
1b74a2bba1 bcachefs-tools: fix test bug in valgrind handling.
Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-28 16:57:15 -08:00
Justin Husted
4d5e1942bd bachefs-tools: Fix broken test code.
A check was missing in some of the python test code, probably from a bad
cherry-pick.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-28 15:54:34 -08:00
Justin Husted
956a05a126 Make valgrind disabled by default in unit tests.
Since valgrind runtime support is disabled by default, we shouldn't run
the tests with valgrind by default.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-28 14:18:56 -08:00
Justin Husted
f574ca05f8 Clean up after failed unit tests better.
Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-14 16:58:43 -08:00
Justin Husted
780de81b36 Support remounting in fuse tests.
Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-18 15:36:36 -08:00
Justin Husted
049dd7b79e Make valgrind optional in tests.
Add an option to disable valgrind in the test suite, via the variable:

BCACHEFS_TEST_USE_VALGRIND=no

Additionally, note how to run tests in parallel in the INSTALL documentation.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-18 13:51:31 -08:00
Justin Husted
a00998c4cd Make fuse3 support optional and document.
The experimental fuse3 support is not complete yet, and fuse3 is new and
still difficult to install on some platforms.

Make it optional at compile time, and default to off.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-11 12:18:22 -08:00
Justin Husted
c3f09963af Implement basic fuse mount tests.
The purpose of these tests is to verify that bcachefs fuse support works
as expected, including gathering valgrind errors from the bcachefs
executable.

To do this, bcachefs is executed from a helper thread in the new
util.BFuse class, which goes about setting up and validating the
valgrind data as well as making sure the mount has completed
sufficiently before the test starts executing.

This also includes some basic functionality smoke tests which cover file
creation, timestamps, etc.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-09 19:00:56 -08:00
Justin Husted
61bc316a4d Initial version of bcachefs tests.
So far, these tests just test basic format, fsck, and list functions
under valgrind, as well as a few self-validation tests.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00