From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Hrubis Date: Tue, 17 Jan 2017 12:38:19 +0100 Subject: [LTP] [PATCH 1/4] getcwd01.c: cleanup && convert to new API In-Reply-To: <1483949756-8685-1-git-send-email-yangx.jy@cn.fujitsu.com> References: <1483949756-8685-1-git-send-email-yangx.jy@cn.fujitsu.com> Message-ID: <20170117113818.GB10880@rei> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi! > add one test for ERANGE I'm not sure if the newly added check for ERANGE is good idea, since depending on ordering of the checks in kernel it may either reutrn ERANGE, if size is checked first, or EFAULT if the buffer pointer is checked first. It may start to fail for no good reason if the order of kernel chesk ends up reversed. Otherwise it looks fine. -- Cyril Hrubis chrubis@suse.cz