overlay/013: do not expect failure
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 16 Apr 2018 10:41:41 +0000 (12:41 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Apr 2018 10:44:16 +0000 (18:44 +0800)
commit792514c38480f4617ee0b677d8076b60a41be71b
tree6d89c8d75c77583d872a27ad3eb05a387609ce7e
parentc0ae9162cac7131176580111f1f268dc7f266f7c
overlay/013: do not expect failure

Current test expects test_lower to fail with:

  truncate(test_lower) should have failed

While it is sort of okay to fail like that (the above expectation
basically acknowledges this weirdness in the overlayfs
implementation), it is by no means the only correct behavior: it is
also correct for the test to succeed (i.e. truncation fails with
ETXTBSY).

So add an option to t_truncate_self.c that allows both success and
failure, but obviously not SIGSEGV, which is what a we'd get in a
real failure mode.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/t_truncate_self.c
tests/overlay/013
tests/overlay/013.out