From b117b211ab6b265b017c0e0189c8b1cedca1522f Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Thu, 9 Jun 2022 17:48:37 +0300 Subject: [PATCH] zdtm/scm: add scm09 test with closed sender fd Signed-off-by: Pavel Tikhomirov --- test/zdtm/static/Makefile | 2 ++ test/zdtm/static/scm00.c | 3 +++ test/zdtm/static/scm09.c | 1 + 3 files changed, 6 insertions(+) create mode 120000 test/zdtm/static/scm09.c diff --git a/test/zdtm/static/Makefile b/test/zdtm/static/Makefile index 4a93659d4..a3c1ccf4b 100644 --- a/test/zdtm/static/Makefile +++ b/test/zdtm/static/Makefile @@ -199,6 +199,7 @@ TST_NOFILE := \ scm04 \ scm05 \ scm06 \ + scm09 \ aio00 \ aio01 \ fd \ @@ -593,6 +594,7 @@ vdso01: LDLIBS += -lrt scm01: CFLAGS += -DKEEP_SENT_FD scm02: CFLAGS += -DSEND_BOTH scm04: CFLAGS += -DSEPARATE +scm09: CFLAGS += -DCLOSE_SENDER_FD mntns_link_remap: CFLAGS += -DZDTM_LINK_REMAP mntns_shared_bind02: CFLAGS += -DSHARED_BIND02 mntns_root_bind02: CFLAGS += -DROOT_BIND02 diff --git a/test/zdtm/static/scm00.c b/test/zdtm/static/scm00.c index d66975582..670e6fd6a 100644 --- a/test/zdtm/static/scm00.c +++ b/test/zdtm/static/scm00.c @@ -105,6 +105,9 @@ int main(int argc, char **argv) p[1] = p[0]; p[0] = -1; #endif +#endif +#ifdef CLOSE_SENDER_FD + close(sk[0]); #endif test_daemon(); diff --git a/test/zdtm/static/scm09.c b/test/zdtm/static/scm09.c new file mode 120000 index 000000000..4cab0edd2 --- /dev/null +++ b/test/zdtm/static/scm09.c @@ -0,0 +1 @@ +scm00.c \ No newline at end of file