Actions
Bug #13765
openzfs_clone_010_pos fails with newer python
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
I noticed that zfs_clone_010_pos fails with:
File "<string>", line 1 print "x" * 200 ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("x" * 200)?
The cause is the following:
log_must zfs clone $fs@snap $fs/$TESTCLONE$(python -c 'print "x" * 200').$i
The OmniOS VM is running python 3.9.4.
As suggested by the error message, changing this to:
log_must zfs clone $fs@snap $fs/$TESTCLONE$(python -c 'print ("x" * 200)').$i
Eliminates the errors and the test passes. I also ran python2.7 -c 'print ("x" * 200)'
(which runs without errors and outputs the expected string) to verify that older python is also happy with the change.
Updated by Yuri Pankov about 1 year ago
We just changed it to the following to get rid of python dependency entirely (at least for that test case):
log_must $ZFS clone $fs@snap $fs/$TESTCLONE$(printf "%0.sx" {1..200}).$i
Updated by Jason King about 1 year ago
Who/what repo is 'we'? That is not in illumos-gate, and there wasn't an obvious open ticket for this already.
Actions