Skip to content

Instantly share code, notes, and snippets.

View tonyhutter's full-sized avatar

Tony Hutter tonyhutter

  • LLNL
  • Livermore, CA USA
View GitHub Profile
[hutter@centos73 zfs-0.7.7]$ for i in {1..10} ; do echo $i && ./scripts/zfs-tests.sh -T many_small_files ; done
1
Test: /home/hutter/zfs-0.7.7/tests/zfs-tests/tests/functional/many_small_files/setup (run as root) [00:01] [PASS]
Test: /home/hutter/zfs-0.7.7/tests/zfs-tests/tests/functional/many_small_files/cp_test (run as root) [00:26] [FAIL]
Test: /home/hutter/zfs-0.7.7/tests/zfs-tests/tests/functional/many_small_files/random_creation (run as root) [01:32] [FAIL]
Test: /home/hutter/zfs-0.7.7/tests/zfs-tests/tests/functional/many_small_files/zap_collision (run as root) [00:18] [PASS]
Test: /home/hutter/zfs-0.7.7/tests/zfs-tests/tests/functional/many_small_files/cleanup (run as root) [00:03] [PASS]
Results Summary
FAIL 2
[hutter@centos73 zfs]$ for i in {1..10} ; do echo $i && ./scripts/zfs-tests.sh -T many_small_files ; done
1
Test: /home/hutter/zfs/tests/zfs-tests/tests/functional/many_small_files/setup (run as root) [00:01] [PASS]
Test: /home/hutter/zfs/tests/zfs-tests/tests/functional/many_small_files/cp_test (run as root) [00:22] [PASS]
Test: /home/hutter/zfs/tests/zfs-tests/tests/functional/many_small_files/random_creation (run as root) [01:33] [PASS]
Test: /home/hutter/zfs/tests/zfs-tests/tests/functional/many_small_files/zap_collision (run as root) [00:20] [PASS]
Test: /home/hutter/zfs/tests/zfs-tests/tests/functional/many_small_files/cleanup (run as root) [00:03] [PASS]
Results Summary
PASS 5
@tonyhutter
tonyhutter / fiefuzz.c
Created May 18, 2018 21:19
fuzz tester for ZFS fiemap ioctl
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
#include <linux/fiemap.h>
@tonyhutter
tonyhutter / testcase.patch
Created July 9, 2019 20:16
zpool status -v testcase
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile.am b/tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile.am
index aab4de0e7..5a5a2d0f5 100644
--- a/tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile.am
+++ b/tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile.am
@@ -7,4 +7,5 @@ dist_pkgdata_SCRIPTS = \
zpool_status_003_pos.ksh \
zpool_status_-c_disable.ksh \
zpool_status_-c_homedir.ksh \
- zpool_status_-c_searchpath.ksh
+ zpool_status_-c_searchpath.ksh \
@tonyhutter
tonyhutter / config_sync_syslog
Created July 15, 2019 16:18
syslog of config_sync events
Jul 11 13:11:26 node51 kernel: Buffer I/O error on dev dm-143, logical block 0, async page read
Jul 11 13:11:26 node51 kernel: blk_update_request: I/O error, dev dm-143, sector 0
Jul 11 13:11:26 node51 kernel: blk_update_request: I/O error, dev dm-143, sector 0
Jul 11 13:11:26 node51 zed[72655]: Finished "all-syslog.sh" eid=579 pid=21195 exit=0
Jul 11 13:11:26 node51 zed: eid=579 class=config_sync pool_guid=0x3ACA855F2C8ACCEE
Jul 11 13:11:26 node51 zed[72655]: Invoking "all-syslog.sh" eid=579 pid=21195
Jul 11 13:11:25 node51 zed[72655]: zfs_process_add: pool 'node51' vdev '/dev/disk/by-vdev/L29', phys 'L29' wholedisk 0, dm 0 (12283158883521536380)
Jul 11 13:11:25 node51 zed[72655]: zfs_iter_vdev: matched devid on dm-uuid-mpath-35000c500a6b30daf
Jul 11 13:11:25 node51 zed[72655]: zfs_iter_pool: evaluating vdevs on node51 (by devid)
Jul 11 13:11:25 node51 zed[72655]: Finished "all-syslog.sh" eid=578 pid=19577 exit=0
@tonyhutter
tonyhutter / gist:13ce6f1574c5875a7f557b68f56088a8
Created November 12, 2019 01:38
Fedora 31 test failures
PASS 1258
FAIL 60
SKIP 51
Running Time: 03:28:02
Percent passed: 91.9%
Log directory: /var/tmp/test_results/20191101T213456
Tests with results other than PASS that are expected:
FAIL cache/cache_010_neg (Known issue)
21 file written: fd 16405
24 file written: fd 16408
23 file written: fd 16407
26 file written: fd 16410
10 file written: fd 16394
16 file written: fd 16400
6 file written: fd 16390
17 file written: fd 16401
29 file written: fd 16413
26 file written: fd 16410
/*
* This function works like realpath() but uses string manipulation only.
* No filesystem operations are done. It returns a resolved, absolute
* path to a file or directory, with no "..", "./" or "//" in it. It
* does not resolve symlinks.
*
* path: The path to a file or directory. It can be a relative or absolute
* path. If it's a relative path then basedir must also be specified.
*
* resolved_path: If non-NULL, then store the resulting string in this buffer
@tonyhutter
tonyhutter / manifest.c
Last active June 8, 2020 20:17
parsing manifest lines
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/*
* Parse a line from the manifest in the form of:
*
* <src path> <whitespace separator> <dest path>
/////////////
// seg_tree.c
/////////////
/* Return the number of segments in the segment tree */
unsigned long seg_tree_count(struct seg_tree* seg_tree)
{
    seg_tree_rdlock(seg_tree);
    unsigned long count = seg_tree->count;
    seg_tree_unlock(seg_tree);