From: Semun Lee Date: Thu, 16 Jan 2020 01:02:21 +0000 (+0900) Subject: Fix to handle F_SETLKW64 in the test code X-Git-Tag: accepted/tizen/unified/20200116.104151^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F23%2F222523%2F1;p=platform%2Fcore%2Fsystem%2Fdlog.git Fix to handle F_SETLKW64 in the test code glibc is changed to call fcntl64 in a certain configuration. refer to: https://sourceware.org/git/?p=glibc.git;a=commit;h=06ab719d30b01da401150068054d3b8ea93dd12f Change-Id: Id89344430e0c85a4cf6e0bd7537c143add247d18 Signed-off-by: Semun Lee --- diff --git a/src/tests/logger.c b/src/tests/logger.c index 2527d40..921cdb0 100644 --- a/src/tests/logger.c +++ b/src/tests/logger.c @@ -327,7 +327,7 @@ int __real_fcntl(int fd, int cmd, ...); int __wrap_fcntl(int fd, int cmd, ...) { // We allow fcntl_correct == 0 for the same reason as in __wrap_open - if (fcntl_correct == 0 && cmd == F_SETLKW) { + if (fcntl_correct == 0 && (cmd == F_SETLKW || cmd == F_SETLKW64)) { va_list args; va_start(args, cmd); struct flock *flock = va_arg(args, struct flock *); @@ -364,7 +364,7 @@ int __wrap_fcntl64(int fd, int cmd, ...) assert(va_arg(args, int) == (O_APPEND | O_NOATIME | O_NONBLOCK)); va_end(args); return 0; - } else if (cmd == F_SETLKW && fcntl_correct != 0) { + } else if ((cmd == F_SETLKW || cmd == F_SETLKW64) && fcntl_correct != 0) { va_list args; va_start(args, cmd); struct flock *flock = va_arg(args, struct flock *);