From patchwork Fri May 3 13:45:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 16631 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AAC5B23905 for ; Fri, 3 May 2013 13:45:38 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id b10sf2992934qen.9 for ; Fri, 03 May 2013 06:45:29 -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=LnxvpIK51pjgvow04yil2Mrlti7NKfCADSpFfr/SO90=; b=Br3fAgPS/KSqypwO9f2LySZ5FipALGS8OQNfyrMiG3iIylAcXa7KFn1EfN56Rye8Zw fnOjBpaVBZckHtyq01f3IMT6pXAh+Rp4JgzXmD4paLPxVqdCpDx3uqefIxqMURr5atVG +lZB4yvTJWAHsWMfRxL5Y5F/7x8HQR684UviPMR50ce20D6vvtK8O70GlQziMaXlouDP XCkYo+OeGJv4wtUqlyJFX0VwQyR6yur+0M8G8OuZef+ddTeq9WEM36J2UqqQj8FtfPcK ENWTsOFFJtKfsG4Cwv9hNWFlov6Y010jD9peWcu0yTBClc29+i5xTGH0M6J4tR92sr4P dbBQ== X-Received: by 10.236.183.98 with SMTP id p62mr8511083yhm.3.1367588728924; Fri, 03 May 2013 06:45:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.130.74 with SMTP id oc10ls1872069qeb.53.gmail; Fri, 03 May 2013 06:45:28 -0700 (PDT) X-Received: by 10.220.46.197 with SMTP id k5mr3684966vcf.40.1367588728714; Fri, 03 May 2013 06:45:28 -0700 (PDT) Received: from mail-vb0-x22f.google.com (mail-vb0-x22f.google.com [2607:f8b0:400c:c02::22f]) by mx.google.com with ESMTPS id sa4si5077670vdc.62.2013.05.03.06.45.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 May 2013 06:45:28 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22f 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:c02::22f; Received: by mail-vb0-f47.google.com with SMTP id x14so1342845vbb.20 for ; Fri, 03 May 2013 06:45:28 -0700 (PDT) X-Received: by 10.52.66.101 with SMTP id e5mr3113242vdt.57.1367588728609; Fri, 03 May 2013 06:45:28 -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 nf2csp23147veb; Fri, 3 May 2013 06:45:28 -0700 (PDT) X-Received: by 10.15.26.6 with SMTP id m6mr31870346eeu.4.1367588726495; Fri, 03 May 2013 06:45:26 -0700 (PDT) Received: from afflict.kos.to (afflict.kos.to. [92.243.29.197]) by mx.google.com with ESMTPS id f1si13673305eep.167.2013.05.03.06.45.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 03 May 2013 06:45:26 -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 4A16C26543; Fri, 3 May 2013 15:45:24 +0200 (CEST) From: riku.voipio@linaro.org To: ltp-list@lists.sourceforge.net Subject: [PATCH 2/3] Set invalid syscall as -1 instead of 0 Date: Fri, 3 May 2013 16:45:16 +0300 Message-Id: <1367588717-18162-3-git-send-email-riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQl9jPPcI7avPqYzePhh/8DFb+nTisw2xe5XO9WHI2iEY3aBnFeG/TLPd/OEDV53G8ZIas0g X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22f 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. 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 86cdc09..08a2669 100755 --- a/testcases/kernel/include/regen.sh +++ b/testcases/kernel/include/regen.sh @@ -27,7 +27,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 { \\ @@ -71,11 +71,12 @@ done echo -n "Generating stub list ... " echo "" >> "${output_pid}" echo "/* Common stubs */" >> "${output_pid}" +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 >> "${output_pid}" # ifndef $nr - # define $nr 0 + # define $nr __LTP__NR_INVALID_SYSCALL # endif EOF done