From patchwork Mon May 6 13:22:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 16720 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1E93020F2F for ; Mon, 6 May 2013 13:23:27 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id l18sf5445516wgh.4 for ; Mon, 06 May 2013 06:23:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=qTwq7DwifRWmTkTLlGqWeXYkLxEm2VG3nt7fdEh1t0M=; b=p1uTZgfogDlWKlZbN1px5/bcfNzJoa3XR65NAhXxA9sHpi6u3SjKfSe5j20Zxp6caK jr+Z3bU3lXtIS8UhscE4Yp6uvjFZ4l58nUI5pJfCrSMYy/U/cMo/TPSLklMNJ38dl/bU mIeuIyDx1JDSnCa5RS32NMGlJwBfOK7SWO8TjcqN2QAQ3eUW2BSN1CfBaSFWD8CjC7OQ jTbkIVI0MDqFtxBc/0Qp/vnJ4ZXfrJXRQ+y15r3ZklpVZt4aYxr+S4haxmc8MbsUrwXM aWItFDX5gnVBw/TDF9P+Kh5FiEUS/4dO85LMK/bUlGFnZ9ytYTO4NIHbpjjE51mO58kQ dlkw== X-Received: by 10.180.10.196 with SMTP id k4mr13281649wib.6.1367846589630; Mon, 06 May 2013 06:23:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.39.236 with SMTP id s12ls631607wik.31.canary; Mon, 06 May 2013 06:23:09 -0700 (PDT) X-Received: by 10.194.47.176 with SMTP id e16mr25206248wjn.46.1367846589547; Mon, 06 May 2013 06:23:09 -0700 (PDT) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [2607:f8b0:400c:c01::22e]) by mx.google.com with ESMTPS id d17si2453038wiv.34.2013.05.06.06.23.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 May 2013 06:23:09 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22e; Received: by mail-ve0-f174.google.com with SMTP id pb11so3145153veb.5 for ; Mon, 06 May 2013 06:23:08 -0700 (PDT) X-Received: by 10.221.0.199 with SMTP id nn7mr6830641vcb.14.1367846588369; Mon, 06 May 2013 06:23:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp47738veb; Mon, 6 May 2013 06:23:07 -0700 (PDT) X-Received: by 10.180.76.230 with SMTP id n6mr8772395wiw.28.1367846585546; Mon, 06 May 2013 06:23:05 -0700 (PDT) Received: from afflict.kos.to (afflict.kos.to. [92.243.29.197]) by mx.google.com with ESMTPS id fq4si2447193wib.74.2013.05.06.06.23.04 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 06 May 2013 06:23:05 -0700 (PDT) Received-SPF: neutral (google.com: 92.243.29.197 is neither permitted nor denied by best guess record for domain of riku.voipio@linaro.org) client-ip=92.243.29.197; Received: from aimless.elisa-laajakaista.fi (a91-156-57-234.elisa-laajakaista.fi [91.156.57.234]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id AE84626544; Mon, 6 May 2013 15:23:03 +0200 (CEST) From: riku.voipio@linaro.org To: ltp-list@lists.sourceforge.net Subject: [PATCH 2/4] [v2] Set invalid syscall as -1 instead of 0 Date: Mon, 6 May 2013 16:22:59 +0300 Message-Id: <1367846581-18599-3-git-send-email-riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmWmVnkmQFJKCJ8cfCXjg09k1L2ZymNdiWtLckevxZAZm/ZMAp9iwhhhwT5blhKgmiZpNIc X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Riku Voipio System call number 0 might be in use in selected syscalls. v2: Adapt to latest upstream Signed-off-by: Riku Voipio --- testcases/kernel/include/regen.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/include/regen.sh b/testcases/kernel/include/regen.sh index 3319703..3e9f0e7 100755 --- a/testcases/kernel/include/regen.sh +++ b/testcases/kernel/include/regen.sh @@ -36,7 +36,7 @@ cat << EOF > "${output_pid}" #define ltp_syscall(NR, ...) ({ \\ int __ret; \\ - if (NR == 0) { \\ + if (NR == __LTP__NR_INVALID_SYSCALL) { \\ errno = ENOSYS; \\ __ret = -1; \\ } else { \\ @@ -90,11 +90,12 @@ echo "Generating stub list ... " ( echo echo "/* Common stubs */" +echo "#define __LTP__NR_INVALID_SYSCALL -1" >> "${output_pid}" for nr in $(awk '{print $1}' "${srcdir}/"*.in | sort -u) ; do nr="__NR_${nr}" cat <<-EOF # ifndef ${nr} - # define ${nr} 0 + # define ${nr} __LTP__NR_INVALID_SYSCALL # endif EOF done