* [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp
@ 2019-11-20 3:14 Jackie Liu
2019-11-20 3:14 ` [PATCH liburing 2/3] Avoid redefined warning of "SIGSTKSZ" Jackie Liu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jackie Liu @ 2019-11-20 3:14 UTC (permalink / raw)
To: axboe; +Cc: io-uring
jackieliu@aarch64:~/liburing$ make -C test
...
/tmp/ccoJ4CQ4.o: In function `main':
/home/jackieliu/liburing/test/500f9fbadef8-test.c:41: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
test/500f9fbadef8-test.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/test/500f9fbadef8-test.c b/test/500f9fbadef8-test.c
index 88602ad..b480944 100644
--- a/test/500f9fbadef8-test.c
+++ b/test/500f9fbadef8-test.c
@@ -38,10 +38,9 @@ int main(int argc, char *argv[])
}
sprintf(buf, "./XXXXXX");
- mktemp(buf);
- fd = open(buf, O_WRONLY | O_DIRECT | O_CREAT, 0644);
+ fd = mkostemp(buf, O_WRONLY | O_DIRECT | O_CREAT);
if (fd < 0) {
- perror("mkstemp");
+ perror("mkostemp");
return 1;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH liburing 2/3] Avoid redefined warning of "SIGSTKSZ"
2019-11-20 3:14 [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp Jackie Liu
@ 2019-11-20 3:14 ` Jackie Liu
2019-11-20 3:14 ` [PATCH liburing 3/3] built liburing.so and test binary first when runtests Jackie Liu
2019-11-20 3:36 ` [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jackie Liu @ 2019-11-20 3:14 UTC (permalink / raw)
To: axboe; +Cc: io-uring
ucontext-cp.c:24:0: warning: "SIGSTKSZ" redefined
#define SIGSTKSZ 8192
In file included from /usr/include/signal.h:316:0,
from ucontext-cp.c:13:
/usr/include/aarch64-linux-gnu/bits/sigstack.h:30:0: note: this is the location of the previous definition
#define SIGSTKSZ 16384
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
examples/ucontext-cp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/ucontext-cp.c b/examples/ucontext-cp.c
index 3e95b15..d521e94 100644
--- a/examples/ucontext-cp.c
+++ b/examples/ucontext-cp.c
@@ -21,7 +21,9 @@
#define QD 64
#define BS 1024
+#ifndef SIGSTKSZ
#define SIGSTKSZ 8192
+#endif
typedef struct {
struct io_uring *ring;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH liburing 3/3] built liburing.so and test binary first when runtests
2019-11-20 3:14 [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp Jackie Liu
2019-11-20 3:14 ` [PATCH liburing 2/3] Avoid redefined warning of "SIGSTKSZ" Jackie Liu
@ 2019-11-20 3:14 ` Jackie Liu
2019-11-20 3:36 ` [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jackie Liu @ 2019-11-20 3:14 UTC (permalink / raw)
To: axboe; +Cc: io-uring
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
Makefile | 2 +-
test/Makefile | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 8af1c3a..9e13218 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ all:
@$(MAKE) -C test
@$(MAKE) -C examples
-runtests:
+runtests: all
@$(MAKE) -C test runtests
runtests-loop:
@$(MAKE) -C test runtests-loop
diff --git a/test/Makefile b/test/Makefile
index 97e88ea..60ae08f 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -41,7 +41,7 @@ accept-link: XCFLAGS = -lpthread
clean:
rm -f $(all_targets) $(test_objs)
-runtests:
+runtests: all
@./runtests.sh $(all_targets)
-runtests-loop:
+runtests-loop: all
@./runtests-loop.sh $(all_targets)
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp
2019-11-20 3:14 [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp Jackie Liu
2019-11-20 3:14 ` [PATCH liburing 2/3] Avoid redefined warning of "SIGSTKSZ" Jackie Liu
2019-11-20 3:14 ` [PATCH liburing 3/3] built liburing.so and test binary first when runtests Jackie Liu
@ 2019-11-20 3:36 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2019-11-20 3:36 UTC (permalink / raw)
To: Jackie Liu; +Cc: io-uring
On 11/19/19 8:14 PM, Jackie Liu wrote:
> jackieliu@aarch64:~/liburing$ make -C test
> ...
> /tmp/ccoJ4CQ4.o: In function `main':
> /home/jackieliu/liburing/test/500f9fbadef8-test.c:41: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
Applied 1-3, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-20 3:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 3:14 [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp Jackie Liu
2019-11-20 3:14 ` [PATCH liburing 2/3] Avoid redefined warning of "SIGSTKSZ" Jackie Liu
2019-11-20 3:14 ` [PATCH liburing 3/3] built liburing.so and test binary first when runtests Jackie Liu
2019-11-20 3:36 ` [PATCH liburing 1/3] mktemp is dangerous, better use mkostemp Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.