Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pjdfstest: fix basic OSX support #10

Merged
merged 4 commits into from
Apr 2, 2017
Merged

Conversation

ngie-eign
Copy link
Collaborator

@ngie-eign ngie-eign commented Apr 2, 2017

This addresses some base issues which prevented pjdfstest from being compiled/run on OS X clients.

There are 14 failed test programs that need to be fixed on OS X still, in part due to:

  • bugs within OS X that will need to be brought up with Apple
  • buggy assumptions in the tests

Tested on: El Capitan (10.11.6)
Sponsored by: Dell EMC Isilon

...
Test Summary Report
-------------------
./chown/00.t    (Wstat: 0 Tests: 1323 Failed: 38)
  Failed tests:  1098, 1102, 1108, 1113, 1117, 1123, 1128
                1132, 1138, 1143, 1147, 1153, 1158, 1162
                1168, 1173, 1177, 1183, 1188, 1195, 1201
                1209, 1216, 1222, 1230, 1237, 1243, 1251
                1258, 1264, 1272, 1279, 1285, 1293, 1300
                1306, 1314, 1321
./chown/07.t    (Wstat: 0 Tests: 132 Failed: 19)
  Failed tests:  7, 12, 20, 27, 32, 40, 47, 52, 60, 67, 72
                80, 87, 92, 100, 107, 112, 120, 127
./ftruncate/12.t (Wstat: 0 Tests: 3 Failed: 1)
  Failed test:  2
./link/00.t     (Wstat: 0 Tests: 202 Failed: 46)
  Failed tests:  56-67, 70-72, 74, 76, 82-93, 96-98, 100
                102, 147-150, 152, 154-157, 159, 183, 190
./mkfifo/03.t   (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
./mknod/03.t    (Wstat: 256 Tests: 12 Failed: 7)
  Failed tests:  3, 5-7, 9-11
  Non-zero exit status: 1
./rename/00.t   (Wstat: 0 Tests: 150 Failed: 19)
  Failed tests:  38-40, 42, 44-45, 53-55, 57, 59-60, 96
                100, 104, 108, 112, 116, 120
./rename/09.t   (Wstat: 0 Tests: 2353 Failed: 16)
  Failed tests:  2269-2272, 2279-2281, 2284, 2289-2292, 2299-2301
                2304
./rename/10.t   (Wstat: 0 Tests: 2099 Failed: 8)
  Failed tests:  2056-2058, 2061, 2063-2065, 2068
./rename/21.t   (Wstat: 0 Tests: 16 Failed: 1)
  Failed test:  5
./symlink/03.t  (Wstat: 256 Tests: 6 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
./truncate/12.t (Wstat: 0 Tests: 3 Failed: 1)
  Failed test:  2
./unlink/00.t   (Wstat: 0 Tests: 112 Failed: 6)
  Failed tests:  37-39, 42-44
pinklady:~ ngie$ uname -a
Darwin pinklady.local 15.6.0 Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64 x86_64

@ngie-eign ngie-eign changed the title pjdfstest: fix OSX support pjdfstest: fix basic OSX support Apr 2, 2017
@ngie-eign ngie-eign requested a review from asomers April 2, 2017 18:34
@ngie-eign ngie-eign self-assigned this Apr 2, 2017
Only define HAS_MKFIFOAT/HAS_MKNODAT if not using OSX.

Fixes issue # 5
Print out the last column in the df output, instead of column # 6
This makes pjdfstest work for me on 10.11.6 (El Capitan)
Darwin functions like Linux/Solaris, not FreeBSD
@@ -96,8 +96,10 @@
#define HAS_FSTATAT
#define HAS_LINKAT
#define HAS_MKDIRAT
#ifndef __APPLE__
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This nests the OSX defines within the "other" list. I think it would be more clear if the defines went one OS at a time, eg

#ifdef __FreeBSD_version
...
#else ifdef __APPLE__
...
# else //all others
...
#endif

Though really, I think autoconf would be preferable.

Copy link
Collaborator Author

@ngie-eign ngie-eign Apr 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to be too invasive here with autoconf in the pull request. I'll do it in the next stage.

@@ -63,6 +63,12 @@ for type in regular fifo block char socket symlink; do
create_file ${type} ${n1} 0640 65534 65534
expect 0 symlink ${n1} ${n2}
case "${os}" in
Darwin)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be Darwin|Linux) and combine it with the Linux block below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but there aren't any guarantees that this will remain that way >_>... Just one step to making OS X work with pjdfstest.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sidenote: I still need to run the tests with OS X Sierra (10.12.x). I would assume that they "just work", but I'm not willing to bank on that 100%.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be fine with me if pjdfstest only passes on the latest version of each supported OS. Managing expected failures should be the responsibility of downstream consumers, IMHO.

Copy link
Collaborator

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your explanations make sense. This PR LGTM.

@ngie-eign ngie-eign merged commit d696f47 into pjd:master Apr 2, 2017
@ngie-eign ngie-eign deleted the fix-osx branch April 2, 2017 21:00
asomers added a commit to asomers/pjdfstest that referenced this pull request Feb 5, 2024
This test asserts that chflags will fail if securelevel=1 and certain
flags are already set.  Since it requires changing securelevel, we do it
in a jail, using the jail-rs crate.  Since we can't fork in a
multithreaded program, we instead execute /bin/chflags within the jail.

Issue pjd#10
asomers added a commit to asomers/pjdfstest that referenced this pull request Feb 5, 2024
This test asserts that chflags will fail if securelevel=1 and certain
flags are already set.  Since it requires changing securelevel, we do it
in a jail, using the jail-rs crate.  Since we can't fork in a
multithreaded program, we instead execute /bin/chflags within the jail.

Issue pjd#10
asomers added a commit to asomers/pjdfstest that referenced this pull request Feb 19, 2024
This test asserts that chflags will fail if securelevel=1 and certain
flags are already set.  Since it requires changing securelevel, we do it
in a jail, using the jail-rs crate.  Since we can't fork in a
multithreaded program, we instead execute /bin/chflags within the jail.

Issue pjd#10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants