11 Commits

Author SHA1 Message Date
Rob Landley
5f7faac453 Remove leftover uses of SKIPNEXT, indent skip groups so
they're more visually obvious, use a SKIP value that looks intentional and
not like file permissions, have skipnot() return whether or not test
succeeded.
2022-09-08 12:34:05 -05:00
Rob Landley
da60fb13dc Now that both sed instances are using -E, we don't need to call it twice. 2020-02-01 22:39:09 -06:00
Elliott Hughes
49912d6f47 chattr.test/lsattr.test: fix on more kernels/fses.
The tests now pass on all the systems available to me (cloud Android
with encrypted f2fs, current AOSP with regular f2fs, and current Debian
testing with ext4).
2020-02-01 22:37:36 -06:00
Rob Landley
b5be065121 Call sed twice instead of five times. 2020-01-31 21:06:42 -06:00
Elliott Hughes
f9a448aeb8 lsattr.test: clean up and fix.
My previous attempt to fix this worked for ext-with-extents on the
desktop, but not for f2fs-with-encryption on cloud Android devices.

This feels quite a bit cleaner, and has the benefit of actually working
everywhere I've tried it.

I've also added perfunctory testing of -p too, which was missing before.
2020-01-31 21:04:15 -06:00
Elliott Hughes
3d4a1f6a0e lsattr: fix tests.
I'm trying to switch Android over to toybox chattr/lsattr from
e2fsprogs. Remove those tests that relied on being able to use
chattr(1), remove the duplication that tested both a bare name and a
full path, take into account all the flags that lsattr can now output,
and cope with the fact that the exact flags you'll see depend on your
file system. (Unfortunately this means trusting lsattr in the lsattr
tests, which isn't ideal, but without a known environment I don't think
we can do any better.)
2020-01-28 02:00:04 -06:00
Rob Landley
d42656a543 Disable lsattr from "make tests" because behavior differs with filesystem.
Also, debian's lsattr is producing longer output lines with new fields,
possibly an ioctl switch from FS_IOC_GETFLAGS -> FS_IOC_FSGETXATTR? Anyway,
todo items here...
2019-05-12 16:20:12 -05:00
Rob Landley
336c44adca Factor out command name at the start of test name, have runtest.sh print it. 2016-03-02 15:20:04 -06:00
Rob Landley
b69e1efb27 Split lsattr/chattr tests. 2016-03-02 15:01:51 -06:00
Rob Landley
dec4669fa1 Set the executable bits on all the *.test files. (Wasn't consistent, is now.) 2015-05-12 13:24:26 -05:00
Rob Landley
387edf547e Move testsuite out of scripts/test into its own top level tests directory, and make ctrl-c kill "make test" more reliably. 2014-09-20 13:09:14 -05:00