From: Dmitry V. Levin Date: Tue, 16 Apr 2019 00:27:42 +0000 (+0000) Subject: tests: robustify umount and umount2 tests against future kernel changes X-Git-Tag: v5.1~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=867dd7be21803a4599867e37cced135c09302597;p=strace tests: robustify umount and umount2 tests against future kernel changes Prepare for the rename of umount syscall to umount2 introduced by linux kernel commits v5.1-rc1~160^2~3^2~12 and v5.1-rc1~160^2~3^2~16 on alpha and ia64 architectures, respectively. * tests/umount.c: Check for __NR_umount == __NR_umount2. * tests/umount2.c: Likewise. --- diff --git a/tests/umount.c b/tests/umount.c index 9c709f22..0170ca8b 100644 --- a/tests/umount.c +++ b/tests/umount.c @@ -15,7 +15,7 @@ #ifdef __NR_oldumount # define TEST_SYSCALL_STR "oldumount" #else -# if defined __NR_umount && defined __NR_umount2 +# if defined __NR_umount && defined __NR_umount2 && __NR_umount != __NR_umount2 # define __NR_oldumount __NR_umount # define TEST_SYSCALL_STR "umount" # endif diff --git a/tests/umount2.c b/tests/umount2.c index a64c18d6..134eb349 100644 --- a/tests/umount2.c +++ b/tests/umount2.c @@ -12,7 +12,7 @@ #include #include -#ifdef __NR_umount2 +#if defined __NR_umount2 && (!defined __NR_umount || __NR_umount2 != __NR_umount) # define TEST_SYSCALL_STR "umount2" #else # define __NR_umount2 __NR_umount