generic: test invalid swap file activation
authorOmar Sandoval <osandov@fb.com>
Wed, 16 May 2018 20:38:49 +0000 (13:38 -0700)
committerEryu Guan <guaneryu@gmail.com>
Wed, 23 May 2018 02:53:04 +0000 (10:53 +0800)
commitd84c105170190c20fa850f85f6630700101d1bf5
tree0ff02cb18a6d27a9ffe607d9b0152dee36dc8fb0
parent37e5788a55a69aca1b2b2f501c1d6c6060dd3495
generic: test invalid swap file activation

Swap files cannot have holes, and they must at least two pages.
swapon(8) and mkswap(8) have stricter restrictions, so add versions
of those commands without any restrictions.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
.gitignore
src/Makefile
src/mkswap.c [new file with mode: 0644]
src/swapon.c [new file with mode: 0644]
tests/generic/495 [new file with mode: 0755]
tests/generic/495.out [new file with mode: 0644]
tests/generic/group