From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: tytso@mit.edu, darrick.wong@oracle.com
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH 07/49] debugfs: create commands to edit extended attributes
Date: Mon, 10 Mar 2014 23:54:43 -0700 [thread overview]
Message-ID: <20140311065443.30585.57456.stgit@birch.djwong.org> (raw)
In-Reply-To: <20140311065356.30585.47192.stgit@birch.djwong.org>
Enhance debugfs to be able to display and modify extended attributes, and
create some simple tests for the extended attribute editing functions.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
debugfs/Makefile.in | 14 ++
debugfs/debug_cmds.ct | 12 ++
debugfs/debugfs.c | 62 ---------
debugfs/debugfs.h | 3
debugfs/xattrs.c | 297 ++++++++++++++++++++++++++++++++++++++++++++
tests/d_xattr_edits/expect | 51 ++++++++
tests/d_xattr_edits/name | 1
tests/d_xattr_edits/script | 135 ++++++++++++++++++++
8 files changed, 510 insertions(+), 65 deletions(-)
create mode 100644 debugfs/xattrs.c
create mode 100644 tests/d_xattr_edits/expect
create mode 100644 tests/d_xattr_edits/name
create mode 100644 tests/d_xattr_edits/script
diff --git a/debugfs/Makefile.in b/debugfs/Makefile.in
index e0c5597..16d6aa7 100644
--- a/debugfs/Makefile.in
+++ b/debugfs/Makefile.in
@@ -18,18 +18,18 @@ MK_CMDS= _SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds
DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o \
- filefrag.o extent_cmds.o extent_inode.o zap.o create_inode.o
+ filefrag.o extent_cmds.o extent_inode.o zap.o create_inode.o xattrs.o
RO_DEBUG_OBJS= ro_debug_cmds.o ro_debugfs.o util.o ncheck.o icheck.o ls.o \
lsdel.o logdump.o htree.o e2freefrag.o filefrag.o extent_cmds.o \
- extent_inode.o
+ extent_inode.o xattrs.o
SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c $(srcdir)/ls.c \
$(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \
$(srcdir)/dump.c $(srcdir)/set_fields.c ${srcdir}/logdump.c \
$(srcdir)/htree.c $(srcdir)/unused.c ${srcdir}/../misc/e2freefrag.c \
$(srcdir)/filefrag.c $(srcdir)/extent_inode.c $(srcdir)/zap.c \
- $(srcdir)/../misc/create_inode.c
+ $(srcdir)/../misc/create_inode.c $(srcdir)/xattrs.c
LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
$(LIBUUID) $(SYSLIBS)
@@ -285,3 +285,11 @@ create_inode.o: $(srcdir)/../misc/create_inode.c \
$(top_builddir)/lib/ext2fs/ext2_err.h \
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
$(srcdir)/../misc/nls-enable.h
+xattrs.o: $(srcdir)/xattrs.c $(srcdir)/debugfs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
+ $(srcdir)/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
+ $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
diff --git a/debugfs/debug_cmds.ct b/debugfs/debug_cmds.ct
index 96ff00f..666032b 100644
--- a/debugfs/debug_cmds.ct
+++ b/debugfs/debug_cmds.ct
@@ -190,5 +190,17 @@ request do_zap_block, "Zap block: fill with 0, pattern, flip bits etc.",
request do_block_dump, "Dump contents of a block",
block_dump, bd;
+request do_list_xattr, "List extended attributes of an inode",
+ ea_list;
+
+request do_get_xattr, "Get an extended attribute of an inode",
+ ea_get;
+
+request do_set_xattr, "Set an extended attribute of an inode",
+ ea_set;
+
+request do_rm_xattr, "Remove an extended attribute of an inode",
+ ea_rm;
+
end;
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index d50bb42..a5cd007 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -492,27 +492,6 @@ static int list_blocks_proc(ext2_filsys fs EXT2FS_ATTR((unused)),
return 0;
}
-static void dump_xattr_string(FILE *out, const char *str, int len)
-{
- int printable = 0;
- int i;
-
- /* check: is string "printable enough?" */
- for (i = 0; i < len; i++)
- if (isprint(str[i]))
- printable++;
-
- if (printable <= len*7/8)
- printable = 0;
-
- for (i = 0; i < len; i++)
- if (printable)
- fprintf(out, isprint(str[i]) ? "%c" : "\\%03o",
- (unsigned char)str[i]);
- else
- fprintf(out, "%02x ", (unsigned char)str[i]);
-}
-
static void internal_dump_inode_extra(FILE *out,
const char *prefix EXT2FS_ATTR((unused)),
ext2_ino_t inode_num EXT2FS_ATTR((unused)),
@@ -532,47 +511,6 @@ static void internal_dump_inode_extra(FILE *out,
}
}
-/* Dump extended attributes */
-static int dump_attr(char *name, char *value, size_t value_len, void *data)
-{
- FILE *out = data;
-
- fprintf(out, " ");
- dump_xattr_string(out, name, strlen(name));
- fprintf(out, " = \"");
- dump_xattr_string(out, value, value_len);
- fprintf(out, "\" (%zu)\n", value_len);
-
- return 0;
-}
-
-static void dump_inode_attributes(FILE *out, ext2_ino_t ino)
-{
- struct ext2_xattr_handle *h;
- size_t sz;
- errcode_t err;
-
- err = ext2fs_xattrs_open(current_fs, ino, &h);
- if (err)
- return;
-
- err = ext2fs_xattrs_read(h);
- if (err)
- goto out;
-
- err = ext2fs_xattrs_count(h, &sz);
- if (err || sz == 0)
- goto out;
-
- fprintf(out, "Extended attributes:\n");
- err = ext2fs_xattrs_iterate(h, dump_attr, out);
- if (err)
- goto out;
-
-out:
- err = ext2fs_xattrs_close(&h);
-}
-
static void dump_blocks(FILE *f, const char *prefix, ext2_ino_t inode)
{
struct list_blocks_struct lb;
diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h
index 5e3b256..3c27f82 100644
--- a/debugfs/debugfs.h
+++ b/debugfs/debugfs.h
@@ -175,6 +175,9 @@ extern void do_filefrag(int argc, char *argv[]);
/* util.c */
extern time_t string_to_time(const char *arg);
+/* xattrs.c */
+void dump_inode_attributes(FILE *out, ext2_ino_t ino);
+
/* zap.c */
extern void do_zap_block(int argc, char **argv);
extern void do_block_dump(int argc, char **argv);
diff --git a/debugfs/xattrs.c b/debugfs/xattrs.c
new file mode 100644
index 0000000..0a29521
--- /dev/null
+++ b/debugfs/xattrs.c
@@ -0,0 +1,297 @@
+/*
+ * xattrs.c --- Modify extended attributes via debugfs.
+ *
+ * Copyright (C) 2014 Oracle. This file may be redistributed
+ * under the terms of the GNU Public License.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+extern int optind;
+extern char *optarg;
+#endif
+#include <ctype.h>
+
+#include "debugfs.h"
+
+/* Dump extended attributes */
+static void dump_xattr_string(FILE *out, const char *str, int len)
+{
+ int printable = 0;
+ int i;
+
+ /* check: is string "printable enough?" */
+ for (i = 0; i < len; i++)
+ if (isprint(str[i]))
+ printable++;
+
+ if (printable <= len*7/8)
+ printable = 0;
+
+ for (i = 0; i < len; i++)
+ if (printable)
+ fprintf(out, isprint(str[i]) ? "%c" : "\\%03o",
+ (unsigned char)str[i]);
+ else
+ fprintf(out, "%02x ", (unsigned char)str[i]);
+}
+
+static int dump_attr(char *name, char *value, size_t value_len, void *data)
+{
+ FILE *out = data;
+
+ fprintf(out, " ");
+ dump_xattr_string(out, name, strlen(name));
+ fprintf(out, " = \"");
+ dump_xattr_string(out, value, value_len);
+ fprintf(out, "\" (%zu)\n", value_len);
+
+ return 0;
+}
+
+void dump_inode_attributes(FILE *out, ext2_ino_t ino)
+{
+ struct ext2_xattr_handle *h;
+ size_t sz;
+ errcode_t err;
+
+ err = ext2fs_xattrs_open(current_fs, ino, &h);
+ if (err)
+ return;
+
+ err = ext2fs_xattrs_read(h);
+ if (err)
+ goto out;
+
+ err = ext2fs_xattrs_count(h, &sz);
+ if (err || sz == 0)
+ goto out;
+
+ fprintf(out, "Extended attributes:\n");
+ err = ext2fs_xattrs_iterate(h, dump_attr, out);
+ if (err)
+ goto out;
+
+out:
+ err = ext2fs_xattrs_close(&h);
+}
+
+void do_list_xattr(int argc, char **argv)
+{
+ ext2_ino_t ino;
+
+ if (argc != 2) {
+ printf("%s: Usage: %s <file>\n", argv[0],
+ argv[0]);
+ return;
+ }
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+
+ dump_inode_attributes(stdout, ino);
+}
+
+void do_get_xattr(int argc, char **argv)
+{
+ ext2_ino_t ino;
+ struct ext2_xattr_handle *h;
+ FILE *fp = NULL;
+ char *buf = NULL;
+ size_t buflen;
+ int i;
+ errcode_t err;
+
+ reset_getopt();
+ while ((i = getopt(argc, argv, "f:")) != -1) {
+ switch (i) {
+ case 'f':
+ fp = fopen(optarg, "w");
+ if (fp == NULL) {
+ perror(optarg);
+ return;
+ }
+ break;
+ default:
+ printf("%s: Usage: %s <file> <attr> [-f outfile]\n",
+ argv[0], argv[0]);
+ return;
+ }
+ }
+
+ if (optind != argc - 2) {
+ printf("%s: Usage: %s <file> <attr> [-f outfile]\n", argv[0],
+ argv[0]);
+ return;
+ }
+
+ if (check_fs_open(argv[0]))
+ return;
+
+ ino = string_to_inode(argv[optind]);
+ if (!ino)
+ return;
+
+ err = ext2fs_xattrs_open(current_fs, ino, &h);
+ if (err)
+ return;
+
+ err = ext2fs_xattrs_read(h);
+ if (err)
+ goto out;
+
+ err = ext2fs_xattr_get(h, argv[optind + 1], (void **)&buf, &buflen);
+ if (err)
+ goto out;
+
+ if (fp) {
+ fwrite(buf, buflen, 1, fp);
+ fclose(fp);
+ } else {
+ dump_xattr_string(stdout, buf, buflen);
+ printf("\n");
+ }
+
+ if (buf)
+ ext2fs_free_mem(&buf);
+out:
+ ext2fs_xattrs_close(&h);
+ if (err)
+ com_err(argv[0], err, "while getting extended attribute");
+}
+
+void do_set_xattr(int argc, char **argv)
+{
+ ext2_ino_t ino;
+ struct ext2_xattr_handle *h;
+ FILE *fp = NULL;
+ char *buf = NULL;
+ size_t buflen;
+ int i;
+ errcode_t err;
+
+ reset_getopt();
+ while ((i = getopt(argc, argv, "f:")) != -1) {
+ switch (i) {
+ case 'f':
+ fp = fopen(optarg, "r");
+ if (fp == NULL) {
+ perror(optarg);
+ return;
+ }
+ break;
+ default:
+ printf("%s: Usage: %s <file> <attr> [-f infile | "
+ "value]\n", argv[0], argv[0]);
+ return;
+ }
+ }
+
+ if (optind != argc - 2 && optind != argc - 3) {
+ printf("%s: Usage: %s <file> <attr> [-f infile | value>]\n",
+ argv[0], argv[0]);
+ return;
+ }
+
+ if (check_fs_open(argv[0]))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+ if (check_fs_bitmaps(argv[0]))
+ return;
+
+ ino = string_to_inode(argv[optind]);
+ if (!ino)
+ return;
+
+ err = ext2fs_xattrs_open(current_fs, ino, &h);
+ if (err)
+ return;
+
+ err = ext2fs_xattrs_read(h);
+ if (err)
+ goto out;
+
+ if (fp) {
+ err = ext2fs_get_mem(current_fs->blocksize, &buf);
+ if (err)
+ goto out;
+ buflen = fread(buf, 1, current_fs->blocksize, fp);
+ } else {
+ buf = argv[optind + 2];
+ buflen = strlen(argv[optind + 2]);
+ }
+
+ err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
+ if (err)
+ goto out;
+
+ err = ext2fs_xattrs_write(h);
+ if (err)
+ goto out;
+
+out:
+ if (fp) {
+ fclose(fp);
+ ext2fs_free_mem(&buf);
+ }
+ ext2fs_xattrs_close(&h);
+ if (err)
+ com_err(argv[0], err, "while setting extended attribute");
+}
+
+void do_rm_xattr(int argc, char **argv)
+{
+ ext2_ino_t ino;
+ struct ext2_xattr_handle *h;
+ int i;
+ errcode_t err;
+
+ if (argc < 3) {
+ printf("%s: Usage: %s <file> <attrs>...\n", argv[0], argv[0]);
+ return;
+ }
+
+ if (check_fs_open(argv[0]))
+ return;
+ if (check_fs_read_write(argv[0]))
+ return;
+ if (check_fs_bitmaps(argv[0]))
+ return;
+
+ ino = string_to_inode(argv[1]);
+ if (!ino)
+ return;
+
+ err = ext2fs_xattrs_open(current_fs, ino, &h);
+ if (err)
+ return;
+
+ err = ext2fs_xattrs_read(h);
+ if (err)
+ goto out;
+
+ for (i = 2; i < argc; i++) {
+ size_t buflen;
+ char *buf;
+
+ err = ext2fs_xattr_remove(h, argv[i]);
+ if (err)
+ goto out;
+ }
+
+ err = ext2fs_xattrs_write(h);
+ if (err)
+ goto out;
+out:
+ ext2fs_xattrs_close(&h);
+ if (err)
+ com_err(argv[0], err, "while removing extended attribute");
+}
diff --git a/tests/d_xattr_edits/expect b/tests/d_xattr_edits/expect
new file mode 100644
index 0000000..10e30c1
--- /dev/null
+++ b/tests/d_xattr_edits/expect
@@ -0,0 +1,51 @@
+debugfs edit extended attributes
+mke2fs -Fq -b 1024 test.img 512
+Exit status is 0
+ea_set / user.joe smith
+Exit status is 0
+ea_set / user.moo FEE_FIE_FOE_FUMMMMMM
+Exit status is 0
+ea_list /
+Extended attributes:
+ user.joe = "smith" (5)
+ user.moo = "FEE_FIE_FOE_FUMMMMMM" (20)
+Exit status is 0
+ea_get / user.moo
+FEE_FIE_FOE_FUMMMMMM
+Exit status is 0
+ea_get / nosuchea
+ea_get: Extended attribute key not found while getting extended attribute
+Exit status is 0
+ea_rm / user.moo
+Exit status is 0
+ea_rm / nosuchea
+ea_rm: Extended attribute key not found while removing extended attribute
+Exit status is 0
+ea_list /
+Extended attributes:
+ user.joe = "smith" (5)
+Exit status is 0
+ea_get / user.moo
+ea_get: Extended attribute key not found while getting extended attribute
+Exit status is 0
+ea_rm / user.joe
+Exit status is 0
+ea_list /
+Exit status is 0
+ea_set / user.file_based_xattr -f d_xattr_edits.tmp
+Exit status is 0
+ea_list /
+Extended attributes:
+ user.file_based_xattr = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567\012" (108)
+Exit status is 0
+ea_get / user.file_based_xattr -f d_xattr_edits.ver.tmp
+Exit status is 0
+Compare big attribute
+e2fsck -yf -N test_filesys
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 11/64 files (0.0% non-contiguous), 29/512 blocks
+Exit status is 0
diff --git a/tests/d_xattr_edits/name b/tests/d_xattr_edits/name
new file mode 100644
index 0000000..c0c428c
--- /dev/null
+++ b/tests/d_xattr_edits/name
@@ -0,0 +1 @@
+edit extended attributes in debugfs
diff --git a/tests/d_xattr_edits/script b/tests/d_xattr_edits/script
new file mode 100644
index 0000000..1e33716
--- /dev/null
+++ b/tests/d_xattr_edits/script
@@ -0,0 +1,135 @@
+if test -x $DEBUGFS_EXE; then
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
+
+TEST_DATA=$test_name.tmp
+VERIFY_DATA=$test_name.ver.tmp
+
+echo "debugfs edit extended attributes" > $OUT
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT
+
+$MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+echo "ea_set / user.joe smith" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_set / user.joe smith" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_set / user.moo FEE_FIE_FOE_FUMMMMMM" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_set / user.moo FEE_FIE_FOE_FUMMMMMM" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_list /" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_list /" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_get / user.moo" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_get / user.moo" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_get / nosuchea" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_get / nosuchea" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_rm / user.moo" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_rm / user.moo" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_rm / nosuchea" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_rm / nosuchea" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_list /" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_list /" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_get / user.moo" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_get / user.moo" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_rm / user.joe" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_rm / user.joe" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_list /" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_list /" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567" > $TEST_DATA
+echo "ea_set / user.file_based_xattr -f $TEST_DATA" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_set / user.file_based_xattr -f $TEST_DATA" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_list /" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_list /" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "ea_get / user.file_based_xattr -f $VERIFY_DATA" > $OUT.new
+$DEBUGFS -w $TMPFILE -R "ea_get / user.file_based_xattr -f $VERIFY_DATA" >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo "Compare big attribute" > $OUT.new
+diff -u $TEST_DATA $VERIFY_DATA >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
+$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
+#
+# Do the verification
+#
+
+rm -f $TMPFILE $OUT.new
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
+
+else #if test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped"
+fi
next prev parent reply other threads:[~2014-03-11 6:54 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 6:53 [PATCH 00/49] e2fsprogs patchbomb 3/14 Darrick J. Wong
2014-03-11 6:54 ` [PATCH 01/49] create_inode: clean up return mess in do_write_internal Darrick J. Wong
2014-03-11 20:30 ` Andreas Dilger
2014-03-11 20:41 ` Darrick J. Wong
2014-03-11 21:08 ` Theodore Ts'o
2014-03-12 3:24 ` Theodore Ts'o
2014-03-11 6:54 ` [PATCH 02/49] create_inode: minor cleanups Darrick J. Wong
2014-03-11 20:31 ` Andreas Dilger
2014-03-12 3:25 ` Theodore Ts'o
2014-03-12 3:27 ` Theodore Ts'o
2014-03-11 6:54 ` [PATCH 03/49] create_inode: whitespace fixes Darrick J. Wong
2014-03-12 3:27 ` Theodore Ts'o
2014-03-11 6:54 ` [PATCH 04/49] create_inode: move debugfs internal state back to debugfs Darrick J. Wong
2014-03-12 3:31 ` Theodore Ts'o
2014-03-11 6:54 ` [PATCH 05/49] create_inode: handle hard link inum mappings per populate_fs invocation Darrick J. Wong
2014-03-12 3:46 ` Theodore Ts'o
2014-03-11 6:54 ` [PATCH 06/49] libext2fs: support modifying arbitrary extended attributes (v5) Darrick J. Wong
2014-03-12 3:51 ` Theodore Ts'o
2014-03-11 6:54 ` Darrick J. Wong [this message]
2014-03-12 3:51 ` [PATCH 07/49] debugfs: create commands to edit extended attributes Theodore Ts'o
2014-03-11 6:54 ` [PATCH 08/49] e2fsck: don't rehash inline directories Darrick J. Wong
2014-03-13 3:52 ` Theodore Ts'o
2014-03-13 5:38 ` Darrick J. Wong
2014-03-13 12:13 ` Theodore Ts'o
2014-03-11 6:54 ` [PATCH 09/49] libext2fs: don't fail when doing a strict rewrite of inline data Darrick J. Wong
2014-03-14 13:19 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 10/49] libext2fs: fix iblocks correctly when expanding an inline_data file Darrick J. Wong
2014-03-12 16:38 ` Andreas Dilger
2014-03-12 17:01 ` Darrick J. Wong
2014-03-14 13:25 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 11/49] e2fsck: zero errcode when checking inline data blocks Darrick J. Wong
2014-03-14 13:26 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 12/49] libext2fs: during inlinedata expand, don't corrupt inode Darrick J. Wong
2014-03-14 13:29 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 13/49] libext2fs: repair side effects when iterating dirents in inline dirs Darrick J. Wong
2014-03-14 13:30 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 14/49] resize2fs: add inline dirs for remapping Darrick J. Wong
2014-03-14 13:31 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 15/49] all: Introduce cppcheck static checking for make C=1 Darrick J. Wong
2014-03-14 13:33 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 16/49] misc: cppcheck cleanups Darrick J. Wong
2014-03-14 13:34 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 17/49] libext2fs: fix 64bit overflow in ext2fs_block_alloc_stats_range Darrick J. Wong
2014-03-14 13:35 ` Theodore Ts'o
2014-03-11 6:55 ` [PATCH 18/49] misc: fix header complaints and resource leaks in e2fsprogs Darrick J. Wong
2014-03-14 13:39 ` Theodore Ts'o
2014-03-14 13:53 ` Theodore Ts'o
2014-03-14 19:23 ` Darrick J. Wong
2014-03-11 6:55 ` [PATCH 19/49] libext2fs: fix memory leak when drastically shrinking extent tree depth Darrick J. Wong
2014-03-14 13:56 ` Theodore Ts'o
2014-03-11 6:56 ` [PATCH 20/49] libext2fs: fix parents when modifying extents Darrick J. Wong
2014-03-14 14:01 ` Theodore Ts'o
2014-03-14 20:13 ` Darrick J. Wong
2014-03-15 15:46 ` Theodore Ts'o
2014-03-17 16:59 ` Darrick J. Wong
2014-03-11 6:56 ` [PATCH 21/49] e2fsck: print runs of duplicate blocks instead of all of them Darrick J. Wong
2014-03-15 16:19 ` Theodore Ts'o
2014-03-11 6:56 ` [PATCH 22/49] e2fsck: verify checksums after checking everything else Darrick J. Wong
2014-03-11 6:56 ` [PATCH 23/49] e2fsck: fix the extended attribute checksum error message Darrick J. Wong
2014-03-11 6:56 ` [PATCH 24/49] e2fsck: insert a missing dirent tail for checksums if possible Darrick J. Wong
2014-03-11 6:56 ` [PATCH 25/49] e2fsck: write dir blocks after new inode when reconstructing root/lost+found Darrick J. Wong
2014-03-11 6:56 ` [PATCH 26/49] tests: add test for corrupted checksummed root directory block Darrick J. Wong
2014-03-11 6:56 ` [PATCH 27/49] dumpe2fs: add switch to disable checksum verification Darrick J. Wong
2014-03-11 6:56 ` [PATCH 28/49] mke2fs: set block_validity as a default mount option Darrick J. Wong
2014-03-11 6:57 ` [PATCH 29/49] libext2fs: support allocating uninit blocks in bmap2() Darrick J. Wong
2014-03-11 6:57 ` [PATCH 30/49] libext2fs: file IO routines should handle uninit blocks Darrick J. Wong
2014-03-11 6:57 ` [PATCH 31/49] resize2fs: convert fs to and from 64bit mode Darrick J. Wong
2014-03-11 6:57 ` [PATCH 32/49] resize2fs: when toggling 64bit, don't free in-use bg data clusters Darrick J. Wong
2014-03-11 6:57 ` [PATCH 33/49] resize2fs: adjust reserved_gdt_blocks when changing group descriptor size Darrick J. Wong
2014-03-11 6:57 ` [PATCH 34/49] libext2fs: have UNIX IO manager use pread/pwrite Darrick J. Wong
2014-03-11 6:57 ` [PATCH 35/49] ext2fs: add readahead method to improve scanning Darrick J. Wong
2014-03-17 22:07 ` Andreas Dilger
2014-03-11 6:57 ` [PATCH 36/49] libext2fs: allow clients to read-ahead metadata Darrick J. Wong
2014-03-17 23:11 ` Andreas Dilger
2014-03-11 6:57 ` [PATCH 37/49] e2fsck: read-ahead metadata during passes 1, 2, and 4 Darrick J. Wong
2014-03-17 23:10 ` Andreas Dilger
2014-03-18 4:42 ` Darrick J. Wong
2014-03-18 6:50 ` Darrick J. Wong
2014-03-11 6:58 ` [PATCH 38/49] libext2fs: when appending to a file, don't split an index block in equal halves Darrick J. Wong
2014-03-11 6:58 ` [PATCH 39/49] libext2fs: find inode goal when allocating blocks Darrick J. Wong
2014-03-11 6:58 ` [PATCH 40/49] libext2fs: find a range of empty blocks Darrick J. Wong
2014-03-11 6:58 ` [PATCH 41/49] libext2fs: provide a function to set inode size Darrick J. Wong
2014-03-11 6:58 ` [PATCH 42/49] libext2fs: implement fallocate Darrick J. Wong
2014-03-11 6:58 ` [PATCH 44/49] fuse2fs: translate ACL structures Darrick J. Wong
2014-03-11 6:58 ` [PATCH 45/49] fuse2fs: handle 64-bit dates correctly Darrick J. Wong
2014-03-11 6:58 ` [PATCH 46/49] fuse2fs: implement fallocate Darrick J. Wong
2014-03-11 6:59 ` [PATCH 48/49] tests: enable using fuse2fs with metadata checksum test Darrick J. Wong
2014-03-11 6:59 ` [PATCH 49/49] tests: test date handling Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140311065443.30585.57456.stgit@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).